diff --git a/static/1.25.1/api/jpm/cc.html b/static/1.25.1/api/jpm/cc.html index e03530bb..8160d2f1 100644 --- a/static/1.25.1/api/jpm/cc.html +++ b/static/1.25.1/api/jpm/cc.html @@ -109,35 +109,35 @@

Index

cc/archive-c cc/compile-c cc/create-buffer-c cc/create-buffer-c-impl cc/create-executable cc/embed-name cc/entry-name cc/entry-replace cc/link-c cc/make-bin-source cc/make-define cc/make-defines cc/modpath-to-meta cc/modpath-to-static cc/out-path


cc/archive-c function source
(archive-c opts target & objects)
 
-Link object files together to make a static library.
Community Examples

cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
+Link object files together to make a static library.

cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
 
-Compile a C file into an object file.
Community Examples

cc/create-buffer-c function source
(create-buffer-c source dest name)
+Compile a C file into an object file.

cc/create-buffer-c function source
(create-buffer-c source dest name)
 
-Inline raw byte file as a c file.
Community Examples

cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
+Inline raw byte file as a c file.

cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
 
-
Community Examples

cc/create-executable function source
(create-executable opts source dest no-core)
+

cc/create-executable function source
(create-executable opts source dest no-core)
 
-Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.
Community Examples

cc/embed-name function source
(embed-name path)
+Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.

cc/embed-name function source
(embed-name path)
 
-Rename a janet symbol for embedding.
Community Examples

cc/entry-name function source
(entry-name name)
+Rename a janet symbol for embedding.

cc/entry-name function source
(entry-name name)
 
-Name of symbol that enters static compilation of a module.
Community Examples

cc/entry-replace function source
(entry-replace name)
+Name of symbol that enters static compilation of a module.

cc/entry-replace function source
(entry-replace name)
 
-Escape special characters in the entry-name
Community Examples

cc/link-c function source
(link-c has-cpp opts target & objects)
+Escape special characters in the entry-name

cc/link-c function source
(link-c has-cpp opts target & objects)
 
-Link C or C++ object files together to make a native module.
Community Examples

cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
+Link C or C++ object files together to make a native module.

cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
 
-
Community Examples

cc/make-define function source
(make-define define value)
+

cc/make-define function source
(make-define define value)
 
-Generate strings for adding custom defines to the compiler.
Community Examples

cc/make-defines function source
(make-defines defines)
+Generate strings for adding custom defines to the compiler.

cc/make-defines function source
(make-defines defines)
 
-Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.
Community Examples

cc/modpath-to-meta function source
(modpath-to-meta path)
+Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.

cc/modpath-to-meta function source
(modpath-to-meta path)
 
-Get the meta file path (.meta.janet) corresponding to a native module path (.so).
Community Examples

cc/modpath-to-static function source
(modpath-to-static path)
+Get the meta file path (.meta.janet) corresponding to a native module path (.so).

cc/modpath-to-static function source
(modpath-to-static path)
 
-Get the static library (.a) path corresponding to a native module path (.so).
Community Examples

cc/out-path function source
(out-path path from-ext to-ext)
+Get the static library (.a) path corresponding to a native module path (.so).

cc/out-path function source
(out-path path from-ext to-ext)
 
-Take a source file path and convert it to an output path.
Community Examples
+Take a source file path and convert it to an output path.
Build Rules C Source Generation diff --git a/static/1.25.1/api/jpm/cgen.html b/static/1.25.1/api/jpm/cgen.html index be908aba..0191eab6 100644 --- a/static/1.25.1/api/jpm/cgen.html +++ b/static/1.25.1/api/jpm/cgen.html @@ -109,13 +109,13 @@

Index

cgen/add-loader cgen/ir cgen/mangle cgen/print-ir


cgen/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

cgen/ir macro source
(ir & body)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

cgen/ir macro source
(ir & body)
 
-Macro that automatically quotes the body provided and calls (print-ir ...) on the body.
Community Examples

cgen/mangle function source
(mangle token)
+Macro that automatically quotes the body provided and calls (print-ir ...) on the body.

cgen/mangle function source
(mangle token)
 
-Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.
Community Examples

cgen/print-ir function source
(print-ir ir)
+Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.

cgen/print-ir function source
(print-ir ir)
 
-Compile the CGEN IR to C and print it to (dyn :out).
Community Examples
+Compile the CGEN IR to C and print it to (dyn :out).
C Compiler Command Line Interface diff --git a/static/1.25.1/api/jpm/cli.html b/static/1.25.1/api/jpm/cli.html index 50cc8f3e..3ebc2c63 100644 --- a/static/1.25.1/api/jpm/cli.html +++ b/static/1.25.1/api/jpm/cli.html @@ -109,11 +109,11 @@

Index

cli/jpm cli/main cli/run cli/setup


cli/jpm macro source
(jpm & argv)
 
-A Macro User Interface for jpm to be used from a repl in a way similar to the command line.
Community Examples

cli/main function source
(main & argv)
+A Macro User Interface for jpm to be used from a repl in a way similar to the command line.

cli/main function source
(main & argv)
 
-Script entry.
Community Examples

cli/run function source
(run & args)
+Script entry.

cli/run function source
(run & args)
 
-Run CLI commands.
Community Examples

cli/setup function source
(setup args)
+Run CLI commands.

cli/setup function source
(setup args)
 
 Load configuration from the command line, environment variables, and
 configuration files. Returns array of non-configuration arguments as well.
@@ -121,7 +121,7 @@ 

Index 1. Commmand line settings 2. The value of `(dyn :jpm-config)` 3. Environment variables - 4. Config file settings (default-config if non specified)

Community Examples
+ 4. Config file settings (default-config if non specified)
C Source Generation Commands diff --git a/static/1.25.1/api/jpm/commands.html b/static/1.25.1/api/jpm/commands.html index 6a84b2e4..0f2f8580 100644 --- a/static/1.25.1/api/jpm/commands.html +++ b/static/1.25.1/api/jpm/commands.html @@ -109,43 +109,43 @@

Index

commands/build commands/clean commands/configure commands/deps commands/enable-local-mode commands/help commands/install commands/jpm-debug-repl commands/list-installed commands/list-pkgs commands/list-rules commands/new-c-project commands/new-project commands/quickbin commands/set-tree commands/show-paths commands/show-rule-tree commands/test commands/update-pkgs


commands/build function source
(build)
 
-
Community Examples

commands/clean function source
(clean)
+

commands/clean function source
(clean)
 
-
Community Examples

commands/configure function source
(configure &opt path)
+

commands/configure function source
(configure &opt path)
 
-Setup an out-of-tree build with certain configuration options.
Community Examples

commands/deps function source
(deps)
+Setup an out-of-tree build with certain configuration options.

commands/deps function source
(deps)
 
-
Community Examples

commands/enable-local-mode function source
(enable-local-mode)
+

commands/enable-local-mode function source
(enable-local-mode)
 
-Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/
Community Examples

commands/help function source
(help)
+Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/

commands/help function source
(help)
 
-
Community Examples

commands/install function source
(install & repo)
+

commands/install function source
(install & repo)
 
-
Community Examples

commands/jpm-debug-repl function source
(jpm-debug-repl)
+

commands/jpm-debug-repl function source
(jpm-debug-repl)
 
-
Community Examples

commands/list-installed function source
(list-installed)
+

commands/list-installed function source
(list-installed)
 
-
Community Examples

commands/list-pkgs function source
(list-pkgs &opt search)
+

commands/list-pkgs function source
(list-pkgs &opt search)
 
-
Community Examples

commands/list-rules function source
(list-rules &opt ctx)
+

commands/list-rules function source
(list-rules &opt ctx)
 
-
Community Examples

commands/new-c-project function source
(new-c-project name)
+

commands/new-c-project function source
(new-c-project name)
 
-Create a new C project
Community Examples

commands/new-project function source
(new-project name)
+Create a new C project

commands/new-project function source
(new-project name)
 
-Create a new project
Community Examples

commands/quickbin function source
(quickbin input output)
+Create a new project

commands/quickbin function source
(quickbin input output)
 
-
Community Examples

commands/set-tree function source
(set-tree tree)
+

commands/set-tree function source
(set-tree tree)
 
-Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.
Community Examples

commands/show-paths function source
(show-paths)
+Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.

commands/show-paths function source
(show-paths)
 
-
Community Examples

commands/show-rule-tree function source
(show-rule-tree &opt root depth)
+

commands/show-rule-tree function source
(show-rule-tree &opt root depth)
 
-
Community Examples

commands/test function source
(test)
+

commands/test function source
(test)
 
-
Community Examples

commands/update-pkgs function source
(update-pkgs)
+

commands/update-pkgs function source
(update-pkgs)
 
-
Community Examples
+
Command Line Interface Config diff --git a/static/1.25.1/api/jpm/config.html b/static/1.25.1/api/jpm/config.html index 87da66a1..bc5835b2 100644 --- a/static/1.25.1/api/jpm/config.html +++ b/static/1.25.1/api/jpm/config.html @@ -107,109 +107,109 @@

Config

Index

-

config/builtin-configs config/config-checkers config/config-docs config/config-options config/config-parsers config/config-set config/defconf config/dyn:ar config/dyn:auto-shebang config/dyn:binpath config/dyn:build-type config/dyn:buildpath config/dyn:c++ config/dyn:c++-link config/dyn:cc config/dyn:cc-link config/dyn:cflags config/dyn:cflags-verbose config/dyn:config-file config/dyn:cppflags config/dyn:curlpath config/dyn:dest-dir config/dyn:dynamic-cflags config/dyn:dynamic-lflags config/dyn:gitpath config/dyn:headerpath config/dyn:is-msvc config/dyn:janet config/dyn:janet-cflags config/dyn:janet-lflags config/dyn:ldflags config/dyn:lflags config/dyn:libpath config/dyn:local config/dyn:manpath config/dyn:modext config/dyn:modpath config/dyn:nocolor config/dyn:offline config/dyn:optimize config/dyn:pkglist config/dyn:silent config/dyn:statext config/dyn:tarpath config/dyn:test config/dyn:tree config/dyn:update-pkgs config/dyn:use-batch-shell config/dyn:verbose config/dyn:workers config/load-config config/load-config-file config/load-default config/load-options config/opt config/read-env-variables config/save-config config/shorthand-mapping


config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.
Community Examples

config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).
Community Examples

config/config-docs table source
Table of all of the help text for each config option.
Community Examples

config/config-options table source
A table of possible options for enum option types.
Community Examples

config/config-parsers table source
A table of all of the dynamic config bindings to parsers.
Community Examples

config/config-set table source
Listing of all config dyns.
Community Examples

config/defconf macro source
(defconf kw &opt parser docs options)
+

config/builtin-configs config/config-checkers config/config-docs config/config-options config/config-parsers config/config-set config/defconf config/dyn:ar config/dyn:auto-shebang config/dyn:binpath config/dyn:build-type config/dyn:buildpath config/dyn:c++ config/dyn:c++-link config/dyn:cc config/dyn:cc-link config/dyn:cflags config/dyn:cflags-verbose config/dyn:config-file config/dyn:cppflags config/dyn:curlpath config/dyn:dest-dir config/dyn:dynamic-cflags config/dyn:dynamic-lflags config/dyn:gitpath config/dyn:headerpath config/dyn:is-msvc config/dyn:janet config/dyn:janet-cflags config/dyn:janet-lflags config/dyn:ldflags config/dyn:lflags config/dyn:libpath config/dyn:local config/dyn:manpath config/dyn:modext config/dyn:modpath config/dyn:nocolor config/dyn:offline config/dyn:optimize config/dyn:pkglist config/dyn:silent config/dyn:statext config/dyn:tarpath config/dyn:test config/dyn:tree config/dyn:update-pkgs config/dyn:use-batch-shell config/dyn:verbose config/dyn:workers config/load-config config/load-config-file config/load-default config/load-options config/opt config/read-env-variables config/save-config config/shorthand-mapping


config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.

config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).

config/config-docs table source
Table of all of the help text for each config option.

config/config-options table source
A table of possible options for enum option types.

config/config-parsers table source
A table of all of the dynamic config bindings to parsers.

config/config-set table source
Listing of all config dyns.

config/defconf macro source
(defconf kw &opt parser docs options)
 
-Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.
Community Examples

config/dyn:ar function source
(dyn:ar &opt dflt)
+Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.

config/dyn:ar function source
(dyn:ar &opt dflt)
 
-
Community Examples

config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
+

config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
 
-
Community Examples

config/dyn:binpath function source
(dyn:binpath &opt dflt)
+

config/dyn:binpath function source
(dyn:binpath &opt dflt)
 
-
Community Examples

config/dyn:build-type function source
(dyn:build-type &opt dflt)
+

config/dyn:build-type function source
(dyn:build-type &opt dflt)
 
-
Community Examples

config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
+

config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
 
-
Community Examples

config/dyn:c++ function source
(dyn:c++ &opt dflt)
+

config/dyn:c++ function source
(dyn:c++ &opt dflt)
 
-
Community Examples

config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
+

config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
 
-
Community Examples

config/dyn:cc function source
(dyn:cc &opt dflt)
+

config/dyn:cc function source
(dyn:cc &opt dflt)
 
-
Community Examples

config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
+

config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
 
-
Community Examples

config/dyn:cflags function source
(dyn:cflags &opt dflt)
+

config/dyn:cflags function source
(dyn:cflags &opt dflt)
 
-
Community Examples

config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
+

config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
 
-
Community Examples

config/dyn:config-file function source
(dyn:config-file &opt dflt)
+

config/dyn:config-file function source
(dyn:config-file &opt dflt)
 
-
Community Examples

config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
+

config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
 
-
Community Examples

config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
+

config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
 
-
Community Examples

config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
+

config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
 
-
Community Examples

config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
+

config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
 
-
Community Examples

config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
+

config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
 
-
Community Examples

config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
+

config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
 
-
Community Examples

config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
+

config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
 
-
Community Examples

config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
+

config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
 
-
Community Examples

config/dyn:janet function source
(dyn:janet &opt dflt)
+

config/dyn:janet function source
(dyn:janet &opt dflt)
 
-
Community Examples

config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
+

config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
 
-
Community Examples

config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
+

config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
 
-
Community Examples

config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
+

config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
 
-
Community Examples

config/dyn:lflags function source
(dyn:lflags &opt dflt)
+

config/dyn:lflags function source
(dyn:lflags &opt dflt)
 
-
Community Examples

config/dyn:libpath function source
(dyn:libpath &opt dflt)
+

config/dyn:libpath function source
(dyn:libpath &opt dflt)
 
-
Community Examples

config/dyn:local function source
(dyn:local &opt dflt)
+

config/dyn:local function source
(dyn:local &opt dflt)
 
-
Community Examples

config/dyn:manpath function source
(dyn:manpath &opt dflt)
+

config/dyn:manpath function source
(dyn:manpath &opt dflt)
 
-
Community Examples

config/dyn:modext function source
(dyn:modext &opt dflt)
+

config/dyn:modext function source
(dyn:modext &opt dflt)
 
-
Community Examples

config/dyn:modpath function source
(dyn:modpath &opt dflt)
+

config/dyn:modpath function source
(dyn:modpath &opt dflt)
 
-
Community Examples

config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
+

config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
 
-
Community Examples

config/dyn:offline function source
(dyn:offline &opt dflt)
+

config/dyn:offline function source
(dyn:offline &opt dflt)
 
-
Community Examples

config/dyn:optimize function source
(dyn:optimize &opt dflt)
+

config/dyn:optimize function source
(dyn:optimize &opt dflt)
 
-
Community Examples

config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
+

config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
 
-
Community Examples

config/dyn:silent function source
(dyn:silent &opt dflt)
+

config/dyn:silent function source
(dyn:silent &opt dflt)
 
-
Community Examples

config/dyn:statext function source
(dyn:statext &opt dflt)
+

config/dyn:statext function source
(dyn:statext &opt dflt)
 
-
Community Examples

config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
+

config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
 
-
Community Examples

config/dyn:test function source
(dyn:test &opt dflt)
+

config/dyn:test function source
(dyn:test &opt dflt)
 
-
Community Examples

config/dyn:tree function source
(dyn:tree &opt dflt)
+

config/dyn:tree function source
(dyn:tree &opt dflt)
 
-
Community Examples

config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
+

config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
 
-
Community Examples

config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
+

config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
 
-
Community Examples

config/dyn:verbose function source
(dyn:verbose &opt dflt)
+

config/dyn:verbose function source
(dyn:verbose &opt dflt)
 
-
Community Examples

config/dyn:workers function source
(dyn:workers &opt dflt)
+

config/dyn:workers function source
(dyn:workers &opt dflt)
 
-
Community Examples

config/load-config function source
(load-config settings &opt override)
+

config/load-config function source
(load-config settings &opt override)
 
-Load a configuration from a table or struct.
Community Examples

config/load-config-file function source
(load-config-file path &opt override)
+Load a configuration from a table or struct.

config/load-config-file function source
(load-config-file path &opt override)
 
-Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.
Community Examples

config/load-default function source
(load-default &opt override)
+Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.

config/load-default function source
(load-default &opt override)
 
-Load the default configuration.
Community Examples

config/load-options function source
(load-options &opt path)
+Load the default configuration.

config/load-options function source
(load-options &opt path)
 
-Load a file that contains config options that can be set. If no such file exists, then do nothing.
Community Examples

config/opt function source
(opt opts key &opt dflt)
+Load a file that contains config options that can be set. If no such file exists, then do nothing.

config/opt function source
(opt opts key &opt dflt)
 
-Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.
Community Examples

config/read-env-variables function source
(read-env-variables)
+Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.

config/read-env-variables function source
(read-env-variables)
 
-Read environment variables that correspond to config variables into dyns.
Community Examples

config/save-config function source
(save-config path)
+Read environment variables that correspond to config variables into dyns.

config/save-config function source
(save-config path)
 
-Write the current configuration information to a file.
Community Examples

config/shorthand-mapping struct source
Map some single characters to long options.
Community Examples
+Write the current configuration information to a file.

config/shorthand-mapping struct source
Map some single characters to long options.
Commands Configuration Generation diff --git a/static/1.25.1/api/jpm/dagbuild.html b/static/1.25.1/api/jpm/dagbuild.html index 231ac279..4575b7e1 100644 --- a/static/1.25.1/api/jpm/dagbuild.html +++ b/static/1.25.1/api/jpm/dagbuild.html @@ -109,9 +109,9 @@

Index

dagbuild/pdag dagbuild/pmap


dagbuild/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.
Community Examples

dagbuild/pmap function source
(pmap f data)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.

dagbuild/pmap function source
(pmap f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Community Examples
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Configuration Generation Project Management diff --git a/static/1.25.1/api/jpm/index.html b/static/1.25.1/api/jpm/index.html index 6c81ef18..7266d7d0 100644 --- a/static/1.25.1/api/jpm/index.html +++ b/static/1.25.1/api/jpm/index.html @@ -109,299 +109,299 @@

Index

jpm/cc/archive-c jpm/cc/compile-c jpm/cc/create-buffer-c jpm/cc/create-buffer-c-impl jpm/cc/create-executable jpm/cc/embed-name jpm/cc/entry-name jpm/cc/entry-replace jpm/cc/link-c jpm/cc/make-bin-source jpm/cc/make-define jpm/cc/make-defines jpm/cc/modpath-to-meta jpm/cc/modpath-to-static jpm/cc/out-path jpm/cgen/add-loader jpm/cgen/ir jpm/cgen/mangle jpm/cgen/print-ir jpm/commands/build jpm/commands/clean jpm/commands/configure jpm/commands/deps jpm/commands/enable-local-mode jpm/commands/help jpm/commands/install jpm/commands/jpm-debug-repl jpm/commands/list-installed jpm/commands/list-pkgs jpm/commands/list-rules jpm/commands/new-c-project jpm/commands/new-project jpm/commands/quickbin jpm/commands/set-tree jpm/commands/show-paths jpm/commands/show-rule-tree jpm/commands/test jpm/commands/update-pkgs jpm/config/builtin-configs jpm/config/config-checkers jpm/config/config-docs jpm/config/config-options jpm/config/config-parsers jpm/config/config-set jpm/config/defconf jpm/config/dyn:ar jpm/config/dyn:auto-shebang jpm/config/dyn:binpath jpm/config/dyn:build-type jpm/config/dyn:buildpath jpm/config/dyn:c++ jpm/config/dyn:c++-link jpm/config/dyn:cc jpm/config/dyn:cc-link jpm/config/dyn:cflags jpm/config/dyn:cflags-verbose jpm/config/dyn:config-file jpm/config/dyn:cppflags jpm/config/dyn:curlpath jpm/config/dyn:dest-dir jpm/config/dyn:dynamic-cflags jpm/config/dyn:dynamic-lflags jpm/config/dyn:gitpath jpm/config/dyn:headerpath jpm/config/dyn:is-msvc jpm/config/dyn:janet jpm/config/dyn:janet-cflags jpm/config/dyn:janet-lflags jpm/config/dyn:ldflags jpm/config/dyn:lflags jpm/config/dyn:libpath jpm/config/dyn:local jpm/config/dyn:manpath jpm/config/dyn:modext jpm/config/dyn:modpath jpm/config/dyn:nocolor jpm/config/dyn:offline jpm/config/dyn:optimize jpm/config/dyn:pkglist jpm/config/dyn:silent jpm/config/dyn:statext jpm/config/dyn:tarpath jpm/config/dyn:test jpm/config/dyn:tree jpm/config/dyn:update-pkgs jpm/config/dyn:use-batch-shell jpm/config/dyn:verbose jpm/config/dyn:workers jpm/config/load-config jpm/config/load-config-file jpm/config/load-default jpm/config/load-options jpm/config/opt jpm/config/read-env-variables jpm/config/save-config jpm/config/shorthand-mapping jpm/dagbuild/pdag jpm/dagbuild/pmap jpm/make-config/auto jpm/make-config/generate-config jpm/pm/bundle-install jpm/pm/curl jpm/pm/do-rule jpm/pm/download-bundle jpm/pm/download-git-bundle jpm/pm/download-tar-bundle jpm/pm/git jpm/pm/import-rules jpm/pm/load-lockfile jpm/pm/load-project-meta jpm/pm/make-jpm-env jpm/pm/make-lockfile jpm/pm/out-of-tree-config jpm/pm/post-deps jpm/pm/require-jpm jpm/pm/resolve-bundle jpm/pm/tar jpm/pm/update-git-bundle jpm/pm/update-installed jpm/rules/add-body jpm/rules/add-dep jpm/rules/add-input jpm/rules/add-output jpm/rules/add-thunk jpm/rules/build-rules jpm/rules/getrules jpm/rules/phony jpm/rules/rule jpm/rules/sh-phony jpm/rules/sh-rule jpm/rules/sh-task jpm/rules/task jpm/scaffold/scaffold-project jpm/shutil/abspath jpm/shutil/basename jpm/shutil/clear-cache jpm/shutil/clear-manifest jpm/shutil/clexe-shell jpm/shutil/copy jpm/shutil/copyfile jpm/shutil/create-dirs jpm/shutil/devnull jpm/shutil/dirname jpm/shutil/drop1-shell jpm/shutil/exec-slurp jpm/shutil/filepath-replace jpm/shutil/find-build-dir jpm/shutil/find-cache jpm/shutil/find-manifest jpm/shutil/find-manifest-dir jpm/shutil/is-win jpm/shutil/path-splitter jpm/shutil/rimraf jpm/shutil/rm jpm/shutil/shell


jpm/cc/archive-c function source
(archive-c opts target & objects)
 
-Link object files together to make a static library.
Community Examples

jpm/cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
+Link object files together to make a static library.

jpm/cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
 
-Compile a C file into an object file.
Community Examples

jpm/cc/create-buffer-c function source
(create-buffer-c source dest name)
+Compile a C file into an object file.

jpm/cc/create-buffer-c function source
(create-buffer-c source dest name)
 
-Inline raw byte file as a c file.
Community Examples

jpm/cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
+Inline raw byte file as a c file.

jpm/cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
 
-
Community Examples

jpm/cc/create-executable function source
(create-executable opts source dest no-core)
+

jpm/cc/create-executable function source
(create-executable opts source dest no-core)
 
-Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.
Community Examples

jpm/cc/embed-name function source
(embed-name path)
+Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.

jpm/cc/embed-name function source
(embed-name path)
 
-Rename a janet symbol for embedding.
Community Examples

jpm/cc/entry-name function source
(entry-name name)
+Rename a janet symbol for embedding.

jpm/cc/entry-name function source
(entry-name name)
 
-Name of symbol that enters static compilation of a module.
Community Examples

jpm/cc/entry-replace function source
(entry-replace name)
+Name of symbol that enters static compilation of a module.

jpm/cc/entry-replace function source
(entry-replace name)
 
-Escape special characters in the entry-name
Community Examples

jpm/cc/link-c function source
(link-c has-cpp opts target & objects)
+Escape special characters in the entry-name

jpm/cc/link-c function source
(link-c has-cpp opts target & objects)
 
-Link C or C++ object files together to make a native module.
Community Examples

jpm/cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
+Link C or C++ object files together to make a native module.

jpm/cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
 
-
Community Examples

jpm/cc/make-define function source
(make-define define value)
+

jpm/cc/make-define function source
(make-define define value)
 
-Generate strings for adding custom defines to the compiler.
Community Examples

jpm/cc/make-defines function source
(make-defines defines)
+Generate strings for adding custom defines to the compiler.

jpm/cc/make-defines function source
(make-defines defines)
 
-Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.
Community Examples

jpm/cc/modpath-to-meta function source
(modpath-to-meta path)
+Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.

jpm/cc/modpath-to-meta function source
(modpath-to-meta path)
 
-Get the meta file path (.meta.janet) corresponding to a native module path (.so).
Community Examples

jpm/cc/modpath-to-static function source
(modpath-to-static path)
+Get the meta file path (.meta.janet) corresponding to a native module path (.so).

jpm/cc/modpath-to-static function source
(modpath-to-static path)
 
-Get the static library (.a) path corresponding to a native module path (.so).
Community Examples

jpm/cc/out-path function source
(out-path path from-ext to-ext)
+Get the static library (.a) path corresponding to a native module path (.so).

jpm/cc/out-path function source
(out-path path from-ext to-ext)
 
-Take a source file path and convert it to an output path.
Community Examples

jpm/cgen/add-loader function source
(add-loader)
+Take a source file path and convert it to an output path.

jpm/cgen/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

jpm/cgen/ir macro source
(ir & body)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

jpm/cgen/ir macro source
(ir & body)
 
-Macro that automatically quotes the body provided and calls (print-ir ...) on the body.
Community Examples

jpm/cgen/mangle function source
(mangle token)
+Macro that automatically quotes the body provided and calls (print-ir ...) on the body.

jpm/cgen/mangle function source
(mangle token)
 
-Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.
Community Examples

jpm/cgen/print-ir function source
(print-ir ir)
+Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.

jpm/cgen/print-ir function source
(print-ir ir)
 
-Compile the CGEN IR to C and print it to (dyn :out).
Community Examples

jpm/commands/build function source
(build)
+Compile the CGEN IR to C and print it to (dyn :out).

jpm/commands/build function source
(build)
 
-
Community Examples

jpm/commands/clean function source
(clean)
+

jpm/commands/clean function source
(clean)
 
-
Community Examples

jpm/commands/configure function source
(configure &opt path)
+

jpm/commands/configure function source
(configure &opt path)
 
-Setup an out-of-tree build with certain configuration options.
Community Examples

jpm/commands/deps function source
(deps)
+Setup an out-of-tree build with certain configuration options.

jpm/commands/deps function source
(deps)
 
-
Community Examples

jpm/commands/enable-local-mode function source
(enable-local-mode)
+

jpm/commands/enable-local-mode function source
(enable-local-mode)
 
-Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/
Community Examples

jpm/commands/help function source
(help)
+Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/

jpm/commands/help function source
(help)
 
-
Community Examples

jpm/commands/install function source
(install & repo)
+

jpm/commands/install function source
(install & repo)
 
-
Community Examples

jpm/commands/jpm-debug-repl function source
(jpm-debug-repl)
+

jpm/commands/jpm-debug-repl function source
(jpm-debug-repl)
 
-
Community Examples

jpm/commands/list-installed function source
(list-installed)
+

jpm/commands/list-installed function source
(list-installed)
 
-
Community Examples

jpm/commands/list-pkgs function source
(list-pkgs &opt search)
+

jpm/commands/list-pkgs function source
(list-pkgs &opt search)
 
-
Community Examples

jpm/commands/list-rules function source
(list-rules &opt ctx)
+

jpm/commands/list-rules function source
(list-rules &opt ctx)
 
-
Community Examples

jpm/commands/new-c-project function source
(new-c-project name)
+

jpm/commands/new-c-project function source
(new-c-project name)
 
-Create a new C project
Community Examples

jpm/commands/new-project function source
(new-project name)
+Create a new C project

jpm/commands/new-project function source
(new-project name)
 
-Create a new project
Community Examples

jpm/commands/quickbin function source
(quickbin input output)
+Create a new project

jpm/commands/quickbin function source
(quickbin input output)
 
-
Community Examples

jpm/commands/set-tree function source
(set-tree tree)
+

jpm/commands/set-tree function source
(set-tree tree)
 
-Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.
Community Examples

jpm/commands/show-paths function source
(show-paths)
+Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.

jpm/commands/show-paths function source
(show-paths)
 
-
Community Examples

jpm/commands/show-rule-tree function source
(show-rule-tree &opt root depth)
+

jpm/commands/show-rule-tree function source
(show-rule-tree &opt root depth)
 
-
Community Examples

jpm/commands/test function source
(test)
+

jpm/commands/test function source
(test)
 
-
Community Examples

jpm/commands/update-pkgs function source
(update-pkgs)
+

jpm/commands/update-pkgs function source
(update-pkgs)
 
-
Community Examples

jpm/config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.
Community Examples

jpm/config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).
Community Examples

jpm/config/config-docs table source
Table of all of the help text for each config option.
Community Examples

jpm/config/config-options table source
A table of possible options for enum option types.
Community Examples

jpm/config/config-parsers table source
A table of all of the dynamic config bindings to parsers.
Community Examples

jpm/config/config-set table source
Listing of all config dyns.
Community Examples

jpm/config/defconf macro source
(defconf kw &opt parser docs options)
+

jpm/config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.

jpm/config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).

jpm/config/config-docs table source
Table of all of the help text for each config option.

jpm/config/config-options table source
A table of possible options for enum option types.

jpm/config/config-parsers table source
A table of all of the dynamic config bindings to parsers.

jpm/config/config-set table source
Listing of all config dyns.

jpm/config/defconf macro source
(defconf kw &opt parser docs options)
 
-Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.
Community Examples

jpm/config/dyn:ar function source
(dyn:ar &opt dflt)
+Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.

jpm/config/dyn:ar function source
(dyn:ar &opt dflt)
 
-
Community Examples

jpm/config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
+

jpm/config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
 
-
Community Examples

jpm/config/dyn:binpath function source
(dyn:binpath &opt dflt)
+

jpm/config/dyn:binpath function source
(dyn:binpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:build-type function source
(dyn:build-type &opt dflt)
+

jpm/config/dyn:build-type function source
(dyn:build-type &opt dflt)
 
-
Community Examples

jpm/config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
+

jpm/config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:c++ function source
(dyn:c++ &opt dflt)
+

jpm/config/dyn:c++ function source
(dyn:c++ &opt dflt)
 
-
Community Examples

jpm/config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
+

jpm/config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
 
-
Community Examples

jpm/config/dyn:cc function source
(dyn:cc &opt dflt)
+

jpm/config/dyn:cc function source
(dyn:cc &opt dflt)
 
-
Community Examples

jpm/config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
+

jpm/config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
 
-
Community Examples

jpm/config/dyn:cflags function source
(dyn:cflags &opt dflt)
+

jpm/config/dyn:cflags function source
(dyn:cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
+

jpm/config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
 
-
Community Examples

jpm/config/dyn:config-file function source
(dyn:config-file &opt dflt)
+

jpm/config/dyn:config-file function source
(dyn:config-file &opt dflt)
 
-
Community Examples

jpm/config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
+

jpm/config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
+

jpm/config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
+

jpm/config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
 
-
Community Examples

jpm/config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
+

jpm/config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
+

jpm/config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
+

jpm/config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
+

jpm/config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
+

jpm/config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet function source
(dyn:janet &opt dflt)
+

jpm/config/dyn:janet function source
(dyn:janet &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
+

jpm/config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
+

jpm/config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
+

jpm/config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:lflags function source
(dyn:lflags &opt dflt)
+

jpm/config/dyn:lflags function source
(dyn:lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:libpath function source
(dyn:libpath &opt dflt)
+

jpm/config/dyn:libpath function source
(dyn:libpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:local function source
(dyn:local &opt dflt)
+

jpm/config/dyn:local function source
(dyn:local &opt dflt)
 
-
Community Examples

jpm/config/dyn:manpath function source
(dyn:manpath &opt dflt)
+

jpm/config/dyn:manpath function source
(dyn:manpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:modext function source
(dyn:modext &opt dflt)
+

jpm/config/dyn:modext function source
(dyn:modext &opt dflt)
 
-
Community Examples

jpm/config/dyn:modpath function source
(dyn:modpath &opt dflt)
+

jpm/config/dyn:modpath function source
(dyn:modpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
+

jpm/config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
 
-
Community Examples

jpm/config/dyn:offline function source
(dyn:offline &opt dflt)
+

jpm/config/dyn:offline function source
(dyn:offline &opt dflt)
 
-
Community Examples

jpm/config/dyn:optimize function source
(dyn:optimize &opt dflt)
+

jpm/config/dyn:optimize function source
(dyn:optimize &opt dflt)
 
-
Community Examples

jpm/config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
+

jpm/config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
 
-
Community Examples

jpm/config/dyn:silent function source
(dyn:silent &opt dflt)
+

jpm/config/dyn:silent function source
(dyn:silent &opt dflt)
 
-
Community Examples

jpm/config/dyn:statext function source
(dyn:statext &opt dflt)
+

jpm/config/dyn:statext function source
(dyn:statext &opt dflt)
 
-
Community Examples

jpm/config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
+

jpm/config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:test function source
(dyn:test &opt dflt)
+

jpm/config/dyn:test function source
(dyn:test &opt dflt)
 
-
Community Examples

jpm/config/dyn:tree function source
(dyn:tree &opt dflt)
+

jpm/config/dyn:tree function source
(dyn:tree &opt dflt)
 
-
Community Examples

jpm/config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
+

jpm/config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
 
-
Community Examples

jpm/config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
+

jpm/config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
 
-
Community Examples

jpm/config/dyn:verbose function source
(dyn:verbose &opt dflt)
+

jpm/config/dyn:verbose function source
(dyn:verbose &opt dflt)
 
-
Community Examples

jpm/config/dyn:workers function source
(dyn:workers &opt dflt)
+

jpm/config/dyn:workers function source
(dyn:workers &opt dflt)
 
-
Community Examples

jpm/config/load-config function source
(load-config settings &opt override)
+

jpm/config/load-config function source
(load-config settings &opt override)
 
-Load a configuration from a table or struct.
Community Examples

jpm/config/load-config-file function source
(load-config-file path &opt override)
+Load a configuration from a table or struct.

jpm/config/load-config-file function source
(load-config-file path &opt override)
 
-Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.
Community Examples

jpm/config/load-default function source
(load-default &opt override)
+Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.

jpm/config/load-default function source
(load-default &opt override)
 
-Load the default configuration.
Community Examples

jpm/config/load-options function source
(load-options &opt path)
+Load the default configuration.

jpm/config/load-options function source
(load-options &opt path)
 
-Load a file that contains config options that can be set. If no such file exists, then do nothing.
Community Examples

jpm/config/opt function source
(opt opts key &opt dflt)
+Load a file that contains config options that can be set. If no such file exists, then do nothing.

jpm/config/opt function source
(opt opts key &opt dflt)
 
-Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.
Community Examples

jpm/config/read-env-variables function source
(read-env-variables)
+Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.

jpm/config/read-env-variables function source
(read-env-variables)
 
-Read environment variables that correspond to config variables into dyns.
Community Examples

jpm/config/save-config function source
(save-config path)
+Read environment variables that correspond to config variables into dyns.

jpm/config/save-config function source
(save-config path)
 
-Write the current configuration information to a file.
Community Examples

jpm/config/shorthand-mapping struct source
Map some single characters to long options.
Community Examples

jpm/dagbuild/pdag function source
(pdag f dag &opt n-workers)
+Write the current configuration information to a file.

jpm/config/shorthand-mapping struct source
Map some single characters to long options.

jpm/dagbuild/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.
Community Examples

jpm/dagbuild/pmap function source
(pmap f data)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.

jpm/dagbuild/pmap function source
(pmap f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Community Examples

jpm/make-config/auto function source
(auto)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.

jpm/make-config/auto function source
(auto)
 
-Get an autodetected config.
Community Examples

jpm/make-config/generate-config function source
(generate-config &opt destdir silent as-data)
+Get an autodetected config.

jpm/make-config/generate-config function source
(generate-config &opt destdir silent as-data)
 
-Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Community Examples

jpm/pm/bundle-install function source
(bundle-install bundle &opt no-deps)
+Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.

jpm/pm/bundle-install function source
(bundle-install bundle &opt no-deps)
 
-Install a bundle from a git repository.
Community Examples

jpm/pm/curl function source
(curl & args)
+Install a bundle from a git repository.

jpm/pm/curl function source
(curl & args)
 
-Make a call to curl
Community Examples

jpm/pm/do-rule function source
(do-rule target)
+Make a call to curl

jpm/pm/do-rule function source
(do-rule target)
 
-Evaluate a given rule in a one-off manner.
Community Examples

jpm/pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
+Evaluate a given rule in a one-off manner.

jpm/pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
 
-Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.
Community Examples

jpm/pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
+Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.

jpm/pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
 
-Download a git bundle from a remote respository
Community Examples

jpm/pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
+Download a git bundle from a remote respository

jpm/pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
 
-Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.
Community Examples

jpm/pm/git function source
(git & args)
+Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.

jpm/pm/git function source
(git & args)
 
-Make a call to git.
Community Examples

jpm/pm/import-rules function source
(import-rules path &opt base-env)
+Make a call to git.

jpm/pm/import-rules function source
(import-rules path &opt base-env)
 
-Import another file that defines more rules. This ruleset is merged into the current ruleset.
Community Examples

jpm/pm/load-lockfile function source
(load-lockfile &opt filename)
+Import another file that defines more rules. This ruleset is merged into the current ruleset.

jpm/pm/load-lockfile function source
(load-lockfile &opt filename)
 
-Load packages from a lockfile.
Community Examples

jpm/pm/load-project-meta function source
(load-project-meta &opt path)
+Load packages from a lockfile.

jpm/pm/load-project-meta function source
(load-project-meta &opt path)
 
-Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.
Community Examples

jpm/pm/make-jpm-env function source
(make-jpm-env &opt base-env)
+Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.

jpm/pm/make-jpm-env function source
(make-jpm-env &opt base-env)
 
-Create an environment that is preloaded with jpm symbols.
Community Examples

jpm/pm/make-lockfile function source
(make-lockfile &opt filename)
+Create an environment that is preloaded with jpm symbols.

jpm/pm/make-lockfile function source
(make-lockfile &opt filename)
 
-
Community Examples

jpm/pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
+

jpm/pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
 
-Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.
Community Examples

jpm/pm/post-deps macro source
(post-deps & body)
+Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.

jpm/pm/post-deps macro source
(post-deps & body)
 
-Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.
Community Examples

jpm/pm/require-jpm function source
(require-jpm path &opt base-env)
+Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.

jpm/pm/require-jpm function source
(require-jpm path &opt base-env)
 
-Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.
Community Examples

jpm/pm/resolve-bundle function source
(resolve-bundle bundle)
+Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.

jpm/pm/resolve-bundle function source
(resolve-bundle bundle)
 
-Convert any bundle string/table to the normalized table form.
Community Examples

jpm/pm/tar function source
(tar & args)
+Convert any bundle string/table to the normalized table form.

jpm/pm/tar function source
(tar & args)
 
-Make a call to tar.
Community Examples

jpm/pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
+Make a call to tar.

jpm/pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
 
-Fetch latest tag version from remote repository
Community Examples

jpm/pm/update-installed function source
(update-installed)
+Fetch latest tag version from remote repository

jpm/pm/update-installed function source
(update-installed)
 
-Update all previously installed packages to their latest versions.
Community Examples

jpm/rules/add-body macro source
(add-body target & body)
+Update all previously installed packages to their latest versions.

jpm/rules/add-body macro source
(add-body target & body)
 
-Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.
Community Examples

jpm/rules/add-dep function source
(add-dep target dep)
+Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.

jpm/rules/add-dep function source
(add-dep target dep)
 
-Alias for `add-input`
Community Examples

jpm/rules/add-input function source
(add-input target input)
+Alias for `add-input`

jpm/rules/add-input function source
(add-input target input)
 
-Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.
Community Examples

jpm/rules/add-output function source
(add-output target output)
+Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.

jpm/rules/add-output function source
(add-output target output)
 
-Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.
Community Examples

jpm/rules/add-thunk function source
(add-thunk target thunk)
+Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.

jpm/rules/add-thunk function source
(add-thunk target thunk)
 
-Append a thunk to a target's recipe.
Community Examples

jpm/rules/build-rules function source
(build-rules rules targets &opt n-workers)
+Append a thunk to a target's recipe.

jpm/rules/build-rules function source
(build-rules rules targets &opt n-workers)
 
-Given a graph of all rules, extract a work graph that will build out-of-date files.
Community Examples

jpm/rules/getrules function source
(getrules)
+Given a graph of all rules, extract a work graph that will build out-of-date files.

jpm/rules/getrules function source
(getrules)
 
-
Community Examples

jpm/rules/phony macro source
(phony target deps & body)
+

jpm/rules/phony macro source
(phony target deps & body)
 
-Alias for `task`.
Community Examples

jpm/rules/rule macro source
(rule target deps & body)
+Alias for `task`.

jpm/rules/rule macro source
(rule target deps & body)
 
-Add a rule to the rule graph.
Community Examples

jpm/rules/sh-phony macro source
(sh-phony target deps & body)
+Add a rule to the rule graph.

jpm/rules/sh-phony macro source
(sh-phony target deps & body)
 
-Alias for `sh-task`.
Community Examples

jpm/rules/sh-rule macro source
(sh-rule target deps & body)
+Alias for `sh-task`.

jpm/rules/sh-rule macro source
(sh-rule target deps & body)
 
-Add a rule that invokes a shell command, and fails if the command returns non-zero.
Community Examples

jpm/rules/sh-task macro source
(sh-task target deps & body)
+Add a rule that invokes a shell command, and fails if the command returns non-zero.

jpm/rules/sh-task macro source
(sh-task target deps & body)
 
-Add a task that invokes a shell command, and fails if the command returns non-zero.
Community Examples

jpm/rules/task macro source
(task target deps & body)
+Add a task that invokes a shell command, and fails if the command returns non-zero.

jpm/rules/task macro source
(task target deps & body)
 
-Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
Community Examples

jpm/scaffold/scaffold-project function source
(scaffold-project name &opt options)
+Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).

jpm/scaffold/scaffold-project function source
(scaffold-project name &opt options)
 
-Generate a standardized project scaffold.
Community Examples

jpm/shutil/abspath function source
(abspath path)
+Generate a standardized project scaffold.

jpm/shutil/abspath function source
(abspath path)
 
-Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).
Community Examples

jpm/shutil/basename function source
(basename path)
+Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).

jpm/shutil/basename function source
(basename path)
 
-Get the filename of a path without any leading directory components.
Community Examples

jpm/shutil/clear-cache function source
(clear-cache)
+Get the filename of a path without any leading directory components.

jpm/shutil/clear-cache function source
(clear-cache)
 
-Clear the global git cache.
Community Examples

jpm/shutil/clear-manifest function source
(clear-manifest)
+Clear the global git cache.

jpm/shutil/clear-manifest function source
(clear-manifest)
 
-Clear the global installation manifest.
Community Examples

jpm/shutil/clexe-shell function source
(clexe-shell & args)
+Clear the global installation manifest.

jpm/shutil/clexe-shell function source
(clexe-shell & args)
 
-
Community Examples

jpm/shutil/copy function source
(copy src dest)
+

jpm/shutil/copy function source
(copy src dest)
 
-Copy a file or directory recursively from one location to another.
Community Examples

jpm/shutil/copyfile function source
(copyfile src dest)
+Copy a file or directory recursively from one location to another.

jpm/shutil/copyfile function source
(copyfile src dest)
 
-Copy a file one location to another.
Community Examples

jpm/shutil/create-dirs function source
(create-dirs dest)
+Copy a file one location to another.

jpm/shutil/create-dirs function source
(create-dirs dest)
 
-Create all directories needed for a file (mkdir -p).
Community Examples

jpm/shutil/devnull function source
(devnull)
+Create all directories needed for a file (mkdir -p).

jpm/shutil/devnull function source
(devnull)
 
-
Community Examples

jpm/shutil/dirname function source
(dirname path)
+

jpm/shutil/dirname function source
(dirname path)
 
-Get the directory of a file without the filename.
Community Examples

jpm/shutil/drop1-shell function source
(drop1-shell std args)
+Get the directory of a file without the filename.

jpm/shutil/drop1-shell function source
(drop1-shell std args)
 
-Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.
Community Examples

jpm/shutil/exec-slurp function source
(exec-slurp & args)
+Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.

jpm/shutil/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

jpm/shutil/filepath-replace function source
(filepath-replace repo)
+Read stdout of subprocess and return it trimmed in a string.

jpm/shutil/filepath-replace function source
(filepath-replace repo)
 
-Remove special characters from a string or path to make it into a path segment.
Community Examples

jpm/shutil/find-build-dir function source
(find-build-dir)
+Remove special characters from a string or path to make it into a path segment.

jpm/shutil/find-build-dir function source
(find-build-dir)
 
-Gets the build directory to output files to.
Community Examples

jpm/shutil/find-cache function source
(find-cache)
+Gets the build directory to output files to.

jpm/shutil/find-cache function source
(find-cache)
 
-Return the path to the global cache.
Community Examples

jpm/shutil/find-manifest function source
(find-manifest name)
+Return the path to the global cache.

jpm/shutil/find-manifest function source
(find-manifest name)
 
-Get the full path of a manifest file given a package name.
Community Examples

jpm/shutil/find-manifest-dir function source
(find-manifest-dir)
+Get the full path of a manifest file given a package name.

jpm/shutil/find-manifest-dir function source
(find-manifest-dir)
 
-Get the path to the directory containing manifests for installed packages.
Community Examples

jpm/shutil/is-win function source
(is-win)
+Get the path to the directory containing manifests for installed packages.

jpm/shutil/is-win function source
(is-win)
 
-Check if we should assume a DOS-like shell or default to posix shell.
Community Examples

jpm/shutil/path-splitter core/peg source
split paths on / and \.
Community Examples

jpm/shutil/rimraf function source
(rimraf path)
+Check if we should assume a DOS-like shell or default to posix shell.

jpm/shutil/path-splitter core/peg source
split paths on / and \.

jpm/shutil/rimraf function source
(rimraf path)
 
-Hard delete directory tree
Community Examples

jpm/shutil/rm function source
(rm path)
+Hard delete directory tree

jpm/shutil/rm function source
(rm path)
 
-Remove a directory and all sub directories.
Community Examples

jpm/shutil/shell function source
(shell & args)
+Remove a directory and all sub directories.

jpm/shutil/shell function source
(shell & args)
 
-Do a shell command
Community Examples
+Do a shell command
Integer Types Module Build Rules diff --git a/static/1.25.1/api/jpm/make-config.html b/static/1.25.1/api/jpm/make-config.html index a7ce7c84..b684a296 100644 --- a/static/1.25.1/api/jpm/make-config.html +++ b/static/1.25.1/api/jpm/make-config.html @@ -109,9 +109,9 @@

Index

make-config/auto make-config/generate-config


make-config/auto function source
(auto)
 
-Get an autodetected config.
Community Examples

make-config/generate-config function source
(generate-config &opt destdir silent as-data)
+Get an autodetected config.

make-config/generate-config function source
(generate-config &opt destdir silent as-data)
 
-Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Community Examples
+Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Config DAG Build diff --git a/static/1.25.1/api/jpm/pm.html b/static/1.25.1/api/jpm/pm.html index 554c3eda..3728f64a 100644 --- a/static/1.25.1/api/jpm/pm.html +++ b/static/1.25.1/api/jpm/pm.html @@ -109,43 +109,43 @@

Index

pm/bundle-install pm/curl pm/do-rule pm/download-bundle pm/download-git-bundle pm/download-tar-bundle pm/git pm/import-rules pm/load-lockfile pm/load-project-meta pm/make-jpm-env pm/make-lockfile pm/out-of-tree-config pm/post-deps pm/require-jpm pm/resolve-bundle pm/tar pm/update-git-bundle pm/update-installed


pm/bundle-install function source
(bundle-install bundle &opt no-deps)
 
-Install a bundle from a git repository.
Community Examples

pm/curl function source
(curl & args)
+Install a bundle from a git repository.

pm/curl function source
(curl & args)
 
-Make a call to curl
Community Examples

pm/do-rule function source
(do-rule target)
+Make a call to curl

pm/do-rule function source
(do-rule target)
 
-Evaluate a given rule in a one-off manner.
Community Examples

pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
+Evaluate a given rule in a one-off manner.

pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
 
-Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.
Community Examples

pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
+Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.

pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
 
-Download a git bundle from a remote respository
Community Examples

pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
+Download a git bundle from a remote respository

pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
 
-Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.
Community Examples

pm/git function source
(git & args)
+Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.

pm/git function source
(git & args)
 
-Make a call to git.
Community Examples

pm/import-rules function source
(import-rules path &opt base-env)
+Make a call to git.

pm/import-rules function source
(import-rules path &opt base-env)
 
-Import another file that defines more rules. This ruleset is merged into the current ruleset.
Community Examples

pm/load-lockfile function source
(load-lockfile &opt filename)
+Import another file that defines more rules. This ruleset is merged into the current ruleset.

pm/load-lockfile function source
(load-lockfile &opt filename)
 
-Load packages from a lockfile.
Community Examples

pm/load-project-meta function source
(load-project-meta &opt path)
+Load packages from a lockfile.

pm/load-project-meta function source
(load-project-meta &opt path)
 
-Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.
Community Examples

pm/make-jpm-env function source
(make-jpm-env &opt base-env)
+Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.

pm/make-jpm-env function source
(make-jpm-env &opt base-env)
 
-Create an environment that is preloaded with jpm symbols.
Community Examples

pm/make-lockfile function source
(make-lockfile &opt filename)
+Create an environment that is preloaded with jpm symbols.

pm/make-lockfile function source
(make-lockfile &opt filename)
 
-
Community Examples

pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
+

pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
 
-Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.
Community Examples

pm/post-deps macro source
(post-deps & body)
+Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.

pm/post-deps macro source
(post-deps & body)
 
-Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.
Community Examples

pm/require-jpm function source
(require-jpm path &opt base-env)
+Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.

pm/require-jpm function source
(require-jpm path &opt base-env)
 
-Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.
Community Examples

pm/resolve-bundle function source
(resolve-bundle bundle)
+Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.

pm/resolve-bundle function source
(resolve-bundle bundle)
 
-Convert any bundle string/table to the normalized table form.
Community Examples

pm/tar function source
(tar & args)
+Convert any bundle string/table to the normalized table form.

pm/tar function source
(tar & args)
 
-Make a call to tar.
Community Examples

pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
+Make a call to tar.

pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
 
-Fetch latest tag version from remote repository
Community Examples

pm/update-installed function source
(update-installed)
+Fetch latest tag version from remote repository

pm/update-installed function source
(update-installed)
 
-Update all previously installed packages to their latest versions.
Community Examples
+Update all previously installed packages to their latest versions.
DAG Build Project Scaffolding diff --git a/static/1.25.1/api/jpm/rules.html b/static/1.25.1/api/jpm/rules.html index 204b0d3d..a8957248 100644 --- a/static/1.25.1/api/jpm/rules.html +++ b/static/1.25.1/api/jpm/rules.html @@ -109,31 +109,31 @@

Index

rules/add-body rules/add-dep rules/add-input rules/add-output rules/add-thunk rules/build-rules rules/getrules rules/phony rules/rule rules/sh-phony rules/sh-rule rules/sh-task rules/task


rules/add-body macro source
(add-body target & body)
 
-Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.
Community Examples

rules/add-dep function source
(add-dep target dep)
+Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.

rules/add-dep function source
(add-dep target dep)
 
-Alias for `add-input`
Community Examples

rules/add-input function source
(add-input target input)
+Alias for `add-input`

rules/add-input function source
(add-input target input)
 
-Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.
Community Examples

rules/add-output function source
(add-output target output)
+Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.

rules/add-output function source
(add-output target output)
 
-Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.
Community Examples

rules/add-thunk function source
(add-thunk target thunk)
+Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.

rules/add-thunk function source
(add-thunk target thunk)
 
-Append a thunk to a target's recipe.
Community Examples

rules/build-rules function source
(build-rules rules targets &opt n-workers)
+Append a thunk to a target's recipe.

rules/build-rules function source
(build-rules rules targets &opt n-workers)
 
-Given a graph of all rules, extract a work graph that will build out-of-date files.
Community Examples

rules/getrules function source
(getrules)
+Given a graph of all rules, extract a work graph that will build out-of-date files.

rules/getrules function source
(getrules)
 
-
Community Examples

rules/phony macro source
(phony target deps & body)
+

rules/phony macro source
(phony target deps & body)
 
-Alias for `task`.
Community Examples

rules/rule macro source
(rule target deps & body)
+Alias for `task`.

rules/rule macro source
(rule target deps & body)
 
-Add a rule to the rule graph.
Community Examples

rules/sh-phony macro source
(sh-phony target deps & body)
+Add a rule to the rule graph.

rules/sh-phony macro source
(sh-phony target deps & body)
 
-Alias for `sh-task`.
Community Examples

rules/sh-rule macro source
(sh-rule target deps & body)
+Alias for `sh-task`.

rules/sh-rule macro source
(sh-rule target deps & body)
 
-Add a rule that invokes a shell command, and fails if the command returns non-zero.
Community Examples

rules/sh-task macro source
(sh-task target deps & body)
+Add a rule that invokes a shell command, and fails if the command returns non-zero.

rules/sh-task macro source
(sh-task target deps & body)
 
-Add a task that invokes a shell command, and fails if the command returns non-zero.
Community Examples

rules/task macro source
(task target deps & body)
+Add a task that invokes a shell command, and fails if the command returns non-zero.

rules/task macro source
(task target deps & body)
 
-Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
Community Examples
+Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
JPM C Compiler diff --git a/static/1.25.1/api/jpm/scaffold.html b/static/1.25.1/api/jpm/scaffold.html index 101633b6..6c7411ba 100644 --- a/static/1.25.1/api/jpm/scaffold.html +++ b/static/1.25.1/api/jpm/scaffold.html @@ -109,7 +109,7 @@

Index

scaffold/scaffold-project


scaffold/scaffold-project function source
(scaffold-project name &opt options)
 
-Generate a standardized project scaffold.
Community Examples
+Generate a standardized project scaffold.
Project Management Shell Utilities diff --git a/static/1.25.1/api/jpm/shutil.html b/static/1.25.1/api/jpm/shutil.html index c0f64fb2..e94f9531 100644 --- a/static/1.25.1/api/jpm/shutil.html +++ b/static/1.25.1/api/jpm/shutil.html @@ -109,47 +109,47 @@

Index

shutil/abspath shutil/basename shutil/clear-cache shutil/clear-manifest shutil/clexe-shell shutil/copy shutil/copyfile shutil/create-dirs shutil/devnull shutil/dirname shutil/drop1-shell shutil/exec-slurp shutil/filepath-replace shutil/find-build-dir shutil/find-cache shutil/find-manifest shutil/find-manifest-dir shutil/is-win shutil/path-splitter shutil/rimraf shutil/rm shutil/shell


shutil/abspath function source
(abspath path)
 
-Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).
Community Examples

shutil/basename function source
(basename path)
+Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).

shutil/basename function source
(basename path)
 
-Get the filename of a path without any leading directory components.
Community Examples

shutil/clear-cache function source
(clear-cache)
+Get the filename of a path without any leading directory components.

shutil/clear-cache function source
(clear-cache)
 
-Clear the global git cache.
Community Examples

shutil/clear-manifest function source
(clear-manifest)
+Clear the global git cache.

shutil/clear-manifest function source
(clear-manifest)
 
-Clear the global installation manifest.
Community Examples

shutil/clexe-shell function source
(clexe-shell & args)
+Clear the global installation manifest.

shutil/clexe-shell function source
(clexe-shell & args)
 
-
Community Examples

shutil/copy function source
(copy src dest)
+

shutil/copy function source
(copy src dest)
 
-Copy a file or directory recursively from one location to another.
Community Examples

shutil/copyfile function source
(copyfile src dest)
+Copy a file or directory recursively from one location to another.

shutil/copyfile function source
(copyfile src dest)
 
-Copy a file one location to another.
Community Examples

shutil/create-dirs function source
(create-dirs dest)
+Copy a file one location to another.

shutil/create-dirs function source
(create-dirs dest)
 
-Create all directories needed for a file (mkdir -p).
Community Examples

shutil/devnull function source
(devnull)
+Create all directories needed for a file (mkdir -p).

shutil/devnull function source
(devnull)
 
-
Community Examples

shutil/dirname function source
(dirname path)
+

shutil/dirname function source
(dirname path)
 
-Get the directory of a file without the filename.
Community Examples

shutil/drop1-shell function source
(drop1-shell std args)
+Get the directory of a file without the filename.

shutil/drop1-shell function source
(drop1-shell std args)
 
-Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.
Community Examples

shutil/exec-slurp function source
(exec-slurp & args)
+Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.

shutil/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

shutil/filepath-replace function source
(filepath-replace repo)
+Read stdout of subprocess and return it trimmed in a string.

shutil/filepath-replace function source
(filepath-replace repo)
 
-Remove special characters from a string or path to make it into a path segment.
Community Examples

shutil/find-build-dir function source
(find-build-dir)
+Remove special characters from a string or path to make it into a path segment.

shutil/find-build-dir function source
(find-build-dir)
 
-Gets the build directory to output files to.
Community Examples

shutil/find-cache function source
(find-cache)
+Gets the build directory to output files to.

shutil/find-cache function source
(find-cache)
 
-Return the path to the global cache.
Community Examples

shutil/find-manifest function source
(find-manifest name)
+Return the path to the global cache.

shutil/find-manifest function source
(find-manifest name)
 
-Get the full path of a manifest file given a package name.
Community Examples

shutil/find-manifest-dir function source
(find-manifest-dir)
+Get the full path of a manifest file given a package name.

shutil/find-manifest-dir function source
(find-manifest-dir)
 
-Get the path to the directory containing manifests for installed packages.
Community Examples

shutil/is-win function source
(is-win)
+Get the path to the directory containing manifests for installed packages.

shutil/is-win function source
(is-win)
 
-Check if we should assume a DOS-like shell or default to posix shell.
Community Examples

shutil/path-splitter core/peg source
split paths on / and \.
Community Examples

shutil/rimraf function source
(rimraf path)
+Check if we should assume a DOS-like shell or default to posix shell.

shutil/path-splitter core/peg source
split paths on / and \.

shutil/rimraf function source
(rimraf path)
 
-Hard delete directory tree
Community Examples

shutil/rm function source
(rm path)
+Hard delete directory tree

shutil/rm function source
(rm path)
 
-Remove a directory and all sub directories.
Community Examples

shutil/shell function source
(shell & args)
+Remove a directory and all sub directories.

shutil/shell function source
(shell & args)
 
-Do a shell command
Community Examples
+Do a shell command
Project Scaffolding Math Module diff --git a/static/1.25.1/api/spork/base64.html b/static/1.25.1/api/spork/base64.html index 45ed5ff6..2220acf0 100644 --- a/static/1.25.1/api/spork/base64.html +++ b/static/1.25.1/api/spork/base64.html @@ -110,9 +110,9 @@

Index

base64/decode base64/encode


base64/decode function source
(decode s)
 
 Converts a base64 encoded string to its binary representation of any format
-(UTF-8, binary, ..).
Community Examples

base64/encode function source
(encode s)
+(UTF-8, binary, ..).

base64/encode function source
(encode s)
 
-Converts a string of any format (UTF-8, binary, ..) to base64 encoding.
Community Examples
+Converts a string of any format (UTF-8, binary, ..) to base64 encoding.

Argument Parsing Cron diff --git a/static/1.25.1/api/spork/cron.html b/static/1.25.1/api/spork/cron.html index c999f0c4..08b00e8b 100644 --- a/static/1.25.1/api/spork/cron.html +++ b/static/1.25.1/api/spork/cron.html @@ -109,11 +109,11 @@

Index

cron/check cron/next-timestamp cron/parse-cron


cron/check function source
(check cron &opt time local)
 
-Check if a given time matches a cron specifier.
Community Examples

cron/next-timestamp function source
(next-timestamp cron &opt time local)
+Check if a given time matches a cron specifier.

cron/next-timestamp function source
(next-timestamp cron &opt time local)
 
-Given a cron schedule, get the next instance on the cron tab after time
Community Examples

cron/parse-cron function source
(parse-cron str)
+Given a cron schedule, get the next instance on the cron tab after time

cron/parse-cron function source
(parse-cron str)
 
-Parse a cron string into a valid cron schedule object
Community Examples
+Parse a cron string into a valid cron schedule object
Base64 EV Utilities diff --git a/static/1.25.1/api/spork/ev-utils.html b/static/1.25.1/api/spork/ev-utils.html index c5829698..b22854ae 100644 --- a/static/1.25.1/api/spork/ev-utils.html +++ b/static/1.25.1/api/spork/ev-utils.html @@ -109,25 +109,25 @@

Index

ev-utils/go-nursery ev-utils/join-nursery ev-utils/multithread-service ev-utils/nursery ev-utils/pcall ev-utils/pdag ev-utils/pmap ev-utils/pmap-full ev-utils/pmap-limited ev-utils/spawn-nursery


ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
 
-Spawn a fiber into a nursery, similar to ev/go.
Community Examples

ev-utils/join-nursery function source
(join-nursery nurse)
+Spawn a fiber into a nursery, similar to ev/go.

ev-utils/join-nursery function source
(join-nursery nurse)
 
-Suspend the current fiber until the nursery is emptied.
Community Examples

ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
+Suspend the current fiber until the nursery is emptied.

ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
 
-Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.
Community Examples

ev-utils/nursery function source
(nursery)
+Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.

ev-utils/nursery function source
(nursery)
 
-Group a number of fibers into a single object for structured concurrency
Community Examples

ev-utils/pcall function source
(pcall f n)
+Group a number of fibers into a single object for structured concurrency

ev-utils/pcall function source
(pcall f n)
 
-Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.
Community Examples

ev-utils/pdag function source
(pdag f dag &opt n-workers)
+Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.

ev-utils/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.
Community Examples

ev-utils/pmap function source
(pmap f data &opt n-workers)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.

ev-utils/pmap function source
(pmap f data &opt n-workers)
 
-Map `f` over data in parallel, optionally limiting parallelism to `n` workers.
Community Examples

ev-utils/pmap-full function source
(pmap-full f data)
+Map `f` over data in parallel, optionally limiting parallelism to `n` workers.

ev-utils/pmap-full function source
(pmap-full f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.
Community Examples

ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.

ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
 
-Similar to pmap-full, but only runs work n-ways parallel.
Community Examples

ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
+Similar to pmap-full, but only runs work n-ways parallel.

ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
 
-Similar to ev/spawn but associate spawned fibers with a nursery
Community Examples
+Similar to ev/spawn but associate spawned fibers with a nursery
Cron Format diff --git a/static/1.25.1/api/spork/fmt.html b/static/1.25.1/api/spork/fmt.html index 573ad1ba..3090460b 100644 --- a/static/1.25.1/api/spork/fmt.html +++ b/static/1.25.1/api/spork/fmt.html @@ -109,11 +109,11 @@

Index

fmt/format fmt/format-file fmt/format-print


fmt/format function source
(format source)
 
-Format a string of source code to a buffer.
Community Examples

fmt/format-file function source
(format-file file)
+Format a string of source code to a buffer.

fmt/format-file function source
(format-file file)
 
-Format a file
Community Examples

fmt/format-print function source
(format-print source)
+Format a file

fmt/format-print function source
(format-print source)
 
-Format a string of source code and print the result.
Community Examples
+Format a string of source code and print the result.
EV Utilities Generators diff --git a/static/1.25.1/api/spork/generators.html b/static/1.25.1/api/spork/generators.html index e5b49ae6..30dff787 100644 --- a/static/1.25.1/api/spork/generators.html +++ b/static/1.25.1/api/spork/generators.html @@ -109,35 +109,35 @@

Index

generators/concat generators/cycle generators/drop generators/drop-until generators/drop-while generators/filter generators/from-iterable generators/map generators/mapcat generators/range generators/run generators/take generators/take-until generators/take-while generators/to-array


generators/concat function source
(concat & xs)
 
-Concatenate one or more generators or iterables into a single generator.
Community Examples

generators/cycle function source
(cycle ds)
+Concatenate one or more generators or iterables into a single generator.

generators/cycle function source
(cycle ds)
 
-Repeatedly yield the elements of `ds`, looping back to the beginning when finished.
Community Examples

generators/drop function source
(drop n ds)
+Repeatedly yield the elements of `ds`, looping back to the beginning when finished.

generators/drop function source
(drop n ds)
 
-Drop `n` elements from `ds`.
Community Examples

generators/drop-until function source
(drop-until p ds)
+Drop `n` elements from `ds`.

generators/drop-until function source
(drop-until p ds)
 
-Drop elements from `ds` until `p` is true.
Community Examples

generators/drop-while function source
(drop-while p ds)
+Drop elements from `ds` until `p` is true.

generators/drop-while function source
(drop-while p ds)
 
-Drop elements from `ds` while `p` is true.
Community Examples

generators/filter function source
(filter p ds)
+Drop elements from `ds` while `p` is true.

generators/filter function source
(filter p ds)
 
-Create a generator that filters `ds` with `p`.
Community Examples

generators/from-iterable function source
(from-iterable ds)
+Create a generator that filters `ds` with `p`.

generators/from-iterable function source
(from-iterable ds)
 
-Create a new generator around any iterable data structure.
Community Examples

generators/map function source
(map f ds)
+Create a new generator around any iterable data structure.

generators/map function source
(map f ds)
 
-Create a generator that maps `f` over `ds`.
Community Examples

generators/mapcat function source
(mapcat f ds)
+Create a generator that maps `f` over `ds`.

generators/mapcat function source
(mapcat f ds)
 
-Map `f` over `ds`, concatenating the results into a new generator.
Community Examples

generators/range function source
(range from to)
+Map `f` over `ds`, concatenating the results into a new generator.

generators/range function source
(range from to)
 
-Create a lazy range.
Community Examples

generators/run function source
(run s)
+Create a lazy range.

generators/run function source
(run s)
 
-Evaluate `s` for side effects.
Community Examples

generators/take function source
(take n ds)
+Evaluate `s` for side effects.

generators/take function source
(take n ds)
 
-Take `n` elements from iterable `ds`.
Community Examples

generators/take-until function source
(take-until p ds)
+Take `n` elements from iterable `ds`.

generators/take-until function source
(take-until p ds)
 
-Return elements from `ds` until `p` is true.
Community Examples

generators/take-while function source
(take-while p ds)
+Return elements from `ds` until `p` is true.

generators/take-while function source
(take-while p ds)
 
-Return elements from `ds` while `p` is true.
Community Examples

generators/to-array function source
(to-array s)
+Return elements from `ds` while `p` is true.

generators/to-array function source
(to-array s)
 
-Consume `s` into a new array.
Community Examples
+Consume `s` into a new array.
Format Getline diff --git a/static/1.25.1/api/spork/getline.html b/static/1.25.1/api/spork/getline.html index f983a2a1..3c2d5aa4 100644 --- a/static/1.25.1/api/spork/getline.html +++ b/static/1.25.1/api/spork/getline.html @@ -109,13 +109,13 @@

Index

getline/default-autocomplete-context getline/default-autocomplete-options getline/default-doc-fetch getline/make-getline getline/max-history


getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
 
-Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.
Community Examples

getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
+Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.

getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
 
-Default handler to get available autocomplete options for a given substring.
Community Examples

getline/default-doc-fetch function source
(default-doc-fetch sym w &)
+Default handler to get available autocomplete options for a given substring.

getline/default-doc-fetch function source
(default-doc-fetch sym w &)
 
-Default handler for Ctrl-G to lookup docstrings in the current environment.
Community Examples

getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
+Default handler for Ctrl-G to lookup docstrings in the current environment.

getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
 
-Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.
Community Examples

getline/max-history number source
Maximal amount of items in the history
Community Examples
+Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.

getline/max-history number source
Maximal amount of items in the history
Generators HTTP diff --git a/static/1.25.1/api/spork/http.html b/static/1.25.1/api/spork/http.html index d484715d..4e29a327 100644 --- a/static/1.25.1/api/spork/http.html +++ b/static/1.25.1/api/spork/http.html @@ -107,29 +107,29 @@

HTTP

Index

-

http/cookie-grammar http/cookies http/logger http/middleware http/query-string-grammar http/read-body http/read-request http/read-response http/request http/request-peg http/response-peg http/router http/send-response http/server http/server-handler http/status-messages http/url-grammar


http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.
Community Examples

http/cookies function source
(cookies nextmw)
+

http/cookie-grammar http/cookies http/logger http/middleware http/query-string-grammar http/read-body http/read-request http/read-response http/request http/request-peg http/response-peg http/router http/send-response http/server http/server-handler http/status-messages http/url-grammar


http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.

http/cookies function source
(cookies nextmw)
 
-Parses cookies into the table under :cookies key
Community Examples

http/logger function source
(logger nextmw)
+Parses cookies into the table under :cookies key

http/logger function source
(logger nextmw)
 
-Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.
Community Examples

http/middleware function source
(middleware x)
+Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.

http/middleware function source
(middleware x)
 
-Coerce any type to http middleware
Community Examples

http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.
Community Examples

http/read-body function source
(read-body req)
+Coerce any type to http middleware

http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.

http/read-body function source
(read-body req)
 
-Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.
Community Examples

http/read-request function source
(read-request conn buf &opt no-query)
+Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.

http/read-request function source
(read-request conn buf &opt no-query)
 
-Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`
Community Examples

http/read-response function source
(read-response conn buf)
+Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`

http/read-response function source
(read-response conn buf)
 
-Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`
Community Examples

http/request function source
(request method url &keys {:headers headers :body body})
+Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`

http/request function source
(request method url &keys {:headers headers :body body})
 
-Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.
Community Examples

http/request-peg core/peg source
PEG for parsing HTTP requests
Community Examples

http/response-peg core/peg source
PEG for parsing HTTP responses
Community Examples

http/router function source
(router routes)
+Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.

http/request-peg core/peg source
PEG for parsing HTTP requests

http/response-peg core/peg source
PEG for parsing HTTP responses

http/router function source
(router routes)
 
-Creates a router middleware. A router will dispatch to different routes based on the URL path.
Community Examples

http/send-response function source
(send-response conn response &opt buf)
+Creates a router middleware. A router will dispatch to different routes based on the URL path.

http/send-response function source
(send-response conn response &opt buf)
 
-Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.
Community Examples

http/server function source
(server handler &opt host port)
+Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.

http/server function source
(server handler &opt host port)
 
-Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.
Community Examples

http/server-handler function source
(server-handler conn handler)
+Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.

http/server-handler function source
(server-handler conn handler)
 
-A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.
Community Examples

http/status-messages struct source
Mapping of HTTP status codes to their status message.
Community Examples

http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
Community Examples
+A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.

http/status-messages struct source
Mapping of HTTP status codes to their status message.

http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
Getline HTTP Framework diff --git a/static/1.25.1/api/spork/httpf.html b/static/1.25.1/api/spork/httpf.html index 20979033..e0078b9e 100644 --- a/static/1.25.1/api/spork/httpf.html +++ b/static/1.25.1/api/spork/httpf.html @@ -109,15 +109,15 @@

Index

httpf/add-bindings-as-routes httpf/add-route httpf/default-payload-wrapper httpf/listen httpf/server


httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
 
-Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.
Community Examples

httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
+Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.

httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
 
-Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.
Community Examples

httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
+Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.

httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
 
-Add some metadata to all responses
Community Examples

httpf/listen function source
(listen server &opt host port n-workers)
+Add some metadata to all responses

httpf/listen function source
(listen server &opt host port n-workers)
 
-Start server. Will run on multiple-threads if n-workers > 1.
Community Examples

httpf/server function source
(server &opt parent)
+Start server. Will run on multiple-threads if n-workers > 1.

httpf/server function source
(server &opt parent)
 
-Create a new server.
Community Examples
+Create a new server.
HTTP JSON diff --git a/static/1.25.1/api/spork/index.html b/static/1.25.1/api/spork/index.html index a4ab4d3f..3e47390e 100644 --- a/static/1.25.1/api/spork/index.html +++ b/static/1.25.1/api/spork/index.html @@ -144,198 +144,198 @@

Spork

Once parsed, values are accessible in the returned table by the name of the option. For example `(result "verbose")` will check if the verbose -flag is enabled.Community Examples

spork/base64/decode function source
(decode s)
+flag is enabled.

spork/base64/decode function source
(decode s)
 
 Converts a base64 encoded string to its binary representation of any format
-(UTF-8, binary, ..).
Community Examples

spork/base64/encode function source
(encode s)
+(UTF-8, binary, ..).

spork/base64/encode function source
(encode s)
 
-Converts a string of any format (UTF-8, binary, ..) to base64 encoding.
Community Examples

spork/cron/check function source
(check cron &opt time local)
+Converts a string of any format (UTF-8, binary, ..) to base64 encoding.

spork/cron/check function source
(check cron &opt time local)
 
-Check if a given time matches a cron specifier.
Community Examples

spork/cron/next-timestamp function source
(next-timestamp cron &opt time local)
+Check if a given time matches a cron specifier.

spork/cron/next-timestamp function source
(next-timestamp cron &opt time local)
 
-Given a cron schedule, get the next instance on the cron tab after time
Community Examples

spork/cron/parse-cron function source
(parse-cron str)
+Given a cron schedule, get the next instance on the cron tab after time

spork/cron/parse-cron function source
(parse-cron str)
 
-Parse a cron string into a valid cron schedule object
Community Examples

spork/ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
+Parse a cron string into a valid cron schedule object

spork/ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
 
-Spawn a fiber into a nursery, similar to ev/go.
Community Examples

spork/ev-utils/join-nursery function source
(join-nursery nurse)
+Spawn a fiber into a nursery, similar to ev/go.

spork/ev-utils/join-nursery function source
(join-nursery nurse)
 
-Suspend the current fiber until the nursery is emptied.
Community Examples

spork/ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
+Suspend the current fiber until the nursery is emptied.

spork/ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
 
-Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.
Community Examples

spork/ev-utils/nursery function source
(nursery)
+Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.

spork/ev-utils/nursery function source
(nursery)
 
-Group a number of fibers into a single object for structured concurrency
Community Examples

spork/ev-utils/pcall function source
(pcall f n)
+Group a number of fibers into a single object for structured concurrency

spork/ev-utils/pcall function source
(pcall f n)
 
-Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.
Community Examples

spork/ev-utils/pdag function source
(pdag f dag &opt n-workers)
+Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.

spork/ev-utils/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.
Community Examples

spork/ev-utils/pmap function source
(pmap f data &opt n-workers)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.

spork/ev-utils/pmap function source
(pmap f data &opt n-workers)
 
-Map `f` over data in parallel, optionally limiting parallelism to `n` workers.
Community Examples

spork/ev-utils/pmap-full function source
(pmap-full f data)
+Map `f` over data in parallel, optionally limiting parallelism to `n` workers.

spork/ev-utils/pmap-full function source
(pmap-full f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.
Community Examples

spork/ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.

spork/ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
 
-Similar to pmap-full, but only runs work n-ways parallel.
Community Examples

spork/ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
+Similar to pmap-full, but only runs work n-ways parallel.

spork/ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
 
-Similar to ev/spawn but associate spawned fibers with a nursery
Community Examples

spork/fmt/format function source
(format source)
+Similar to ev/spawn but associate spawned fibers with a nursery

spork/fmt/format function source
(format source)
 
-Format a string of source code to a buffer.
Community Examples

spork/fmt/format-file function source
(format-file file)
+Format a string of source code to a buffer.

spork/fmt/format-file function source
(format-file file)
 
-Format a file
Community Examples

spork/fmt/format-print function source
(format-print source)
+Format a file

spork/fmt/format-print function source
(format-print source)
 
-Format a string of source code and print the result.
Community Examples

spork/generators/concat function source
(concat & xs)
+Format a string of source code and print the result.

spork/generators/concat function source
(concat & xs)
 
-Concatenate one or more generators or iterables into a single generator.
Community Examples

spork/generators/cycle function source
(cycle ds)
+Concatenate one or more generators or iterables into a single generator.

spork/generators/cycle function source
(cycle ds)
 
-Repeatedly yield the elements of `ds`, looping back to the beginning when finished.
Community Examples

spork/generators/drop function source
(drop n ds)
+Repeatedly yield the elements of `ds`, looping back to the beginning when finished.

spork/generators/drop function source
(drop n ds)
 
-Drop `n` elements from `ds`.
Community Examples

spork/generators/drop-until function source
(drop-until p ds)
+Drop `n` elements from `ds`.

spork/generators/drop-until function source
(drop-until p ds)
 
-Drop elements from `ds` until `p` is true.
Community Examples

spork/generators/drop-while function source
(drop-while p ds)
+Drop elements from `ds` until `p` is true.

spork/generators/drop-while function source
(drop-while p ds)
 
-Drop elements from `ds` while `p` is true.
Community Examples

spork/generators/filter function source
(filter p ds)
+Drop elements from `ds` while `p` is true.

spork/generators/filter function source
(filter p ds)
 
-Create a generator that filters `ds` with `p`.
Community Examples

spork/generators/from-iterable function source
(from-iterable ds)
+Create a generator that filters `ds` with `p`.

spork/generators/from-iterable function source
(from-iterable ds)
 
-Create a new generator around any iterable data structure.
Community Examples

spork/generators/map function source
(map f ds)
+Create a new generator around any iterable data structure.

spork/generators/map function source
(map f ds)
 
-Create a generator that maps `f` over `ds`.
Community Examples

spork/generators/mapcat function source
(mapcat f ds)
+Create a generator that maps `f` over `ds`.

spork/generators/mapcat function source
(mapcat f ds)
 
-Map `f` over `ds`, concatenating the results into a new generator.
Community Examples

spork/generators/range function source
(range from to)
+Map `f` over `ds`, concatenating the results into a new generator.

spork/generators/range function source
(range from to)
 
-Create a lazy range.
Community Examples

spork/generators/run function source
(run s)
+Create a lazy range.

spork/generators/run function source
(run s)
 
-Evaluate `s` for side effects.
Community Examples

spork/generators/take function source
(take n ds)
+Evaluate `s` for side effects.

spork/generators/take function source
(take n ds)
 
-Take `n` elements from iterable `ds`.
Community Examples

spork/generators/take-until function source
(take-until p ds)
+Take `n` elements from iterable `ds`.

spork/generators/take-until function source
(take-until p ds)
 
-Return elements from `ds` until `p` is true.
Community Examples

spork/generators/take-while function source
(take-while p ds)
+Return elements from `ds` until `p` is true.

spork/generators/take-while function source
(take-while p ds)
 
-Return elements from `ds` while `p` is true.
Community Examples

spork/generators/to-array function source
(to-array s)
+Return elements from `ds` while `p` is true.

spork/generators/to-array function source
(to-array s)
 
-Consume `s` into a new array.
Community Examples

spork/getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
+Consume `s` into a new array.

spork/getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
 
-Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.
Community Examples

spork/getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
+Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.

spork/getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
 
-Default handler to get available autocomplete options for a given substring.
Community Examples

spork/getline/default-doc-fetch function source
(default-doc-fetch sym w &)
+Default handler to get available autocomplete options for a given substring.

spork/getline/default-doc-fetch function source
(default-doc-fetch sym w &)
 
-Default handler for Ctrl-G to lookup docstrings in the current environment.
Community Examples

spork/getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
+Default handler for Ctrl-G to lookup docstrings in the current environment.

spork/getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
 
-Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.
Community Examples

spork/getline/max-history number source
Maximal amount of items in the history
Community Examples

spork/htmlgen/doctype-html function source
The html5 doctype header
Community Examples

spork/htmlgen/escape function source
(escape x)
+Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.

spork/getline/max-history number source
Maximal amount of items in the history

spork/htmlgen/doctype-html function source
The html5 doctype header

spork/htmlgen/escape function source
(escape x)
 
-Escape characters in a string for HTML
Community Examples

spork/htmlgen/html function source
(html data &opt buf)
+Escape characters in a string for HTML

spork/htmlgen/html function source
(html data &opt buf)
 
-Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.
Community Examples

spork/htmlgen/raw function source
(raw text)
+Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.

spork/htmlgen/raw function source
(raw text)
 
-Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Community Examples

spork/http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.
Community Examples

spork/http/cookies function source
(cookies nextmw)
+Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.

spork/http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.

spork/http/cookies function source
(cookies nextmw)
 
-Parses cookies into the table under :cookies key
Community Examples

spork/http/logger function source
(logger nextmw)
+Parses cookies into the table under :cookies key

spork/http/logger function source
(logger nextmw)
 
-Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.
Community Examples

spork/http/middleware function source
(middleware x)
+Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.

spork/http/middleware function source
(middleware x)
 
-Coerce any type to http middleware
Community Examples

spork/http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.
Community Examples

spork/http/read-body function source
(read-body req)
+Coerce any type to http middleware

spork/http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.

spork/http/read-body function source
(read-body req)
 
-Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.
Community Examples

spork/http/read-request function source
(read-request conn buf &opt no-query)
+Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.

spork/http/read-request function source
(read-request conn buf &opt no-query)
 
-Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`
Community Examples

spork/http/read-response function source
(read-response conn buf)
+Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`

spork/http/read-response function source
(read-response conn buf)
 
-Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`
Community Examples

spork/http/request function source
(request method url &keys {:headers headers :body body})
+Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`

spork/http/request function source
(request method url &keys {:headers headers :body body})
 
-Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.
Community Examples

spork/http/request-peg core/peg source
PEG for parsing HTTP requests
Community Examples

spork/http/response-peg core/peg source
PEG for parsing HTTP responses
Community Examples

spork/http/router function source
(router routes)
+Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.

spork/http/request-peg core/peg source
PEG for parsing HTTP requests

spork/http/response-peg core/peg source
PEG for parsing HTTP responses

spork/http/router function source
(router routes)
 
-Creates a router middleware. A router will dispatch to different routes based on the URL path.
Community Examples

spork/http/send-response function source
(send-response conn response &opt buf)
+Creates a router middleware. A router will dispatch to different routes based on the URL path.

spork/http/send-response function source
(send-response conn response &opt buf)
 
-Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.
Community Examples

spork/http/server function source
(server handler &opt host port)
+Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.

spork/http/server function source
(server handler &opt host port)
 
-Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.
Community Examples

spork/http/server-handler function source
(server-handler conn handler)
+Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.

spork/http/server-handler function source
(server-handler conn handler)
 
-A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.
Community Examples

spork/http/status-messages struct source
Mapping of HTTP status codes to their status message.
Community Examples

spork/http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
Community Examples

spork/httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
+A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.

spork/http/status-messages struct source
Mapping of HTTP status codes to their status message.

spork/http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.

spork/httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
 
-Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.
Community Examples

spork/httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
+Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.

spork/httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
 
-Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.
Community Examples

spork/httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
+Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.

spork/httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
 
-Add some metadata to all responses
Community Examples

spork/httpf/listen function source
(listen server &opt host port n-workers)
+Add some metadata to all responses

spork/httpf/listen function source
(listen server &opt host port n-workers)
 
-Start server. Will run on multiple-threads if n-workers > 1.
Community Examples

spork/httpf/server function source
(server &opt parent)
+Start server. Will run on multiple-threads if n-workers > 1.

spork/httpf/server function source
(server &opt parent)
 
-Create a new server.
Community Examples

spork/json/decode cfunction
(json/decode json-source &opt keywords nils)
+Create a new server.

spork/json/decode cfunction
(json/decode json-source &opt keywords nils)
 
-Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.
Community Examples

spork/json/encode cfunction
(json/encode x &opt tab newline buf)
+Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.

spork/json/encode cfunction
(json/encode x &opt tab newline buf)
 
-Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
Community Examples

spork/misc/always function source
(always x)
+Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.

spork/misc/always function source
(always x)
 
-Return a function that discards any arguments and always returns `x`.
Community Examples

spork/misc/antepenultimate function source
(antepenultimate xs)
+Return a function that discards any arguments and always returns `x`.

spork/misc/antepenultimate function source
(antepenultimate xs)
 
-Get the third-to-last element from an indexed data structure.
Community Examples

spork/misc/caperr macro source
(caperr & body)
+Get the third-to-last element from an indexed data structure.

spork/misc/caperr macro source
(caperr & body)
 
 Captures the standart error output of the variadic `body` and returns it
-as a buffer.
Community Examples

spork/misc/capout macro source
(capout & body)
+as a buffer.

spork/misc/capout macro source
(capout & body)
 
 Captures the standart output of the variadic `body` and returns it as
-a buffer.
Community Examples

spork/misc/cond-> macro source
(cond-> val & clauses)
+a buffer.

spork/misc/cond-> macro source
(cond-> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs with condition and operation to which the `val`,
 is put as first argument. All conditions are tried and
 for truthy conditions the operation is executed.
-Returns the value mutated if any condition is truthy.
Community Examples

spork/misc/cond->> macro source
(cond->> val & clauses)
+Returns the value mutated if any condition is truthy.

spork/misc/cond->> macro source
(cond->> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs of condition and operation to which the `val`,
 is put as last argument. All conditions are tried and
 for truthy the operation is ran.
-Returns mutated value if any condition is truthy.
Community Examples

spork/misc/dedent function source
(dedent & xs)
+Returns mutated value if any condition is truthy.

spork/misc/dedent function source
(dedent & xs)
 
 Remove indentation after concatenating the arguments. Works by removing
 leading whitespace, and then removing that same pattern of whitepsace after
-new lines.
Community Examples

spork/misc/defs macro source
(defs & bindings)
+new lines.

spork/misc/defs macro source
(defs & bindings)
 
-Defines many constants as in let `bindings`, but without creating new scope.
Community Examples

spork/misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
+Defines many constants as in let `bindings`, but without creating new scope.

spork/misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
 
 Do a depth first, pre-order traversal over a data structure.
 Also allow for callbacks before and after visiting the children
 of a node. Also allow for a custom `get-children` function to
 change traversal as needed. Will detect cycles if an empty table
 is passed as the `seen` parameter, which is used to cached values
-that have been visited.
Community Examples

spork/misc/do-def macro source
(do-def c d & body)
+that have been visited.

spork/misc/do-def macro source
(do-def c d & body)
 
 Convenience macro for defining constant named `c` with value `d` before `body`
 and returning it after evaluating `body`, that presumably modifies 
-the `c` refered content. For example buffer, table or array.
Community Examples

spork/misc/do-var macro source
(do-var v d & body)
+the `c` refered content. For example buffer, table or array.

spork/misc/do-var macro source
(do-var v d & body)
 
 Convenience macro for defining varible named `v` with value `d` before `body`
-and returning it after evaluating `body`, that presumably modifies `v`.
Community Examples

spork/misc/gett macro source
(gett ds & keys)
+and returning it after evaluating `body`, that presumably modifies `v`.

spork/misc/gett macro source
(gett ds & keys)
 
-Recursive macro (get). Similar to get-in, but keys are variadic argument.
Community Examples

spork/misc/insert-sorted function source
(insert-sorted arr <? & xs)
+Recursive macro (get). Similar to get-in, but keys are variadic argument.

spork/misc/insert-sorted function source
(insert-sorted arr <? & xs)
 
 Insert elements in `arr` such that it remains sorted by the comparator. If
-`arr` is not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

spork/misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
+`arr` is not sorted beforehand, the results are undefined. Returns `arr`.

spork/misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
 
 Insert elements in `arr` such that it remains sorted by the value returned
 when `f` is called with the element, comparing the values with <. If `arr` is
-not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

spork/misc/int->string function source
(int->string int &opt base)
+not sorted beforehand, the results are undefined. Returns `arr`.

spork/misc/int->string function source
(int->string int &opt base)
 
-Stringify an integer in a particular base. Defaults to decimal (base 10).
Community Examples

spork/misc/int/ function source
(int/ & xs)
+Stringify an integer in a particular base. Defaults to decimal (base 10).

spork/misc/int/ function source
(int/ & xs)
 
-Perform integer division.
Community Examples

spork/misc/log macro source
(log level & args)
+Perform integer division.

spork/misc/log macro source
(log level & args)
 
 Print to a dynamic binding stream if that stream is set, otherwise do
 nothing. Evaluate to nil. 
 For example, `(log :err "value error: %V" my-value)` will print 
-to `(dyn :err)` only if `(dyn :err)` has been set.
Community Examples

spork/misc/make macro source
(make prototype & pairs)
+to `(dyn :err)` only if `(dyn :err)` has been set.

spork/misc/make macro source
(make prototype & pairs)
 
 Convenience macro for creating new table from even number of kvs pairs in a variadic `table-or-pairs`
 arguments and setting its prototype to `prototype`.
-Factory function for creating new objects from prototypes.
Community Examples

spork/misc/make-id function source
(make-id &opt prefix)
+Factory function for creating new objects from prototypes.

spork/misc/make-id function source
(make-id &opt prefix)
 
 Create a random, printable keyword id with 10 bytes of entropy
-with an optional prefix.
Community Examples

spork/misc/map-keys function source
(map-keys f data)
+with an optional prefix.

spork/misc/map-keys function source
(map-keys f data)
 
 Returns new table with function `f` applied to `data`'s
-keys recursively.
Community Examples

spork/misc/map-vals function source
(map-vals f data)
+keys recursively.

spork/misc/map-vals function source
(map-vals f data)
 
-Returns new table with function `f` applied to `data`'s values.
Community Examples

spork/misc/penultimate function source
(penultimate xs)
+Returns new table with function `f` applied to `data`'s values.

spork/misc/penultimate function source
(penultimate xs)
 
-Get the second-to-last element from an indexed data structure.
Community Examples

spork/misc/print-table function source
(print-table data &opt columns header-mapping)
+Get the second-to-last element from an indexed data structure.

spork/misc/print-table function source
(print-table data &opt columns header-mapping)
 
 Iterate through the rows of a data structure and print a table in a human
 readable way, with padding and heading information. Can optionally provide
@@ -343,244 +343,244 @@ 

Spork

for each row. Lastly, a `header-mapping` dictionary can be provided that changes the printed header names my mapping column keys to the desired header name. If no mapping is found, then the column key will be used as -the header name. Returns nil.
Community Examples

spork/misc/randomize-array function source
(randomize-array arr &opt rng)
+the header name. Returns nil.

spork/misc/randomize-array function source
(randomize-array arr &opt rng)
 
 Randomizes array using the fisher-yates shuffle, takes an optional random
-number generator.
Community Examples

spork/misc/second function source
(second xs)
+number generator.

spork/misc/second function source
(second xs)
 
-Get the second element from an indexed data structure.
Community Examples

spork/misc/select-keys function source
(select-keys data keyz)
+Get the second element from an indexed data structure.

spork/misc/select-keys function source
(select-keys data keyz)
 
-Returns new table with selected `keyz` from dictionary `data`.
Community Examples

spork/misc/set* macro source
(set* tgts exprs)
+Returns new table with selected `keyz` from dictionary `data`.

spork/misc/set* macro source
(set* tgts exprs)
 
 Parallel `set` function. Takes a list of targets and
 expressions, evaluates all the expressions, and then
 assigns them to the targets. Each target can be a variable
-or a 2-tuple, just like in the normal `set` special form.
Community Examples

spork/misc/string->int function source
(string->int str &opt base)
+or a 2-tuple, just like in the normal `set` special form.

spork/misc/string->int function source
(string->int str &opt base)
 
 Parse an integer in the given base. Defaults to decimal (base 10). Differs
-from scan-number in that this does not recognize floating point notation.
Community Examples

spork/misc/table-filter function source
(table-filter pred dict)
+from scan-number in that this does not recognize floating point notation.

spork/misc/table-filter function source
(table-filter pred dict)
 
 Filter a key-value structure info a table. Semantics are the same as for
 built-in `filter`, except that `pred` takes two arguments (key and value.)
-Does not consider prototypes.
Community Examples

spork/misc/third function source
(third xs)
+Does not consider prototypes.

spork/misc/third function source
(third xs)
 
-Get the third element from an indexed data structure.
Community Examples

spork/misc/trim-prefix function source
(trim-prefix prefix str)
+Get the third element from an indexed data structure.

spork/misc/trim-prefix function source
(trim-prefix prefix str)
 
-Trim the specified prefix of a string if it has one
Community Examples

spork/misc/trim-suffix function source
(trim-suffix suffix str)
+Trim the specified prefix of a string if it has one

spork/misc/trim-suffix function source
(trim-suffix suffix str)
 
-Trim the specified suffix of a string if it has one
Community Examples

spork/misc/until macro source
(until cnd & body)
+Trim the specified suffix of a string if it has one

spork/misc/until macro source
(until cnd & body)
 
 Repeat `body` while the `cnd` is false.
-Equivalent to (while (not cnd) ;body).
Community Examples

spork/misc/vars macro source
(vars & bindings)
+Equivalent to (while (not cnd) ;body).

spork/misc/vars macro source
(vars & bindings)
 
-Defines many variables as in let `bindings`, but without creating new scope.
Community Examples

spork/msg/make-proto function source
(make-proto stream &opt pack unpack)
+Defines many variables as in let `bindings`, but without creating new scope.

spork/msg/make-proto function source
(make-proto stream &opt pack unpack)
 
-Create both a send an recv function from a stream, as with `make-send` and `make-recv`.
Community Examples

spork/msg/make-recv function source
(make-recv stream &opt unpack)
+Create both a send an recv function from a stream, as with `make-send` and `make-recv`.

spork/msg/make-recv function source
(make-recv stream &opt unpack)
 
-Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.
Community Examples

spork/msg/make-send function source
(make-send stream &opt pack)
+Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.

spork/msg/make-send function source
(make-send stream &opt pack)
 
-Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Community Examples

spork/netrepl/client function source
(client &opt host port name)
+Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.

spork/netrepl/client function source
(client &opt host port name)
 
-Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".
Community Examples

spork/netrepl/default-host string source
Default host to run server on and connect to.
Community Examples

spork/netrepl/default-port string source
Default port to run the net repl.
Community Examples

spork/netrepl/server function source
(server &opt host port env cleanup welcome-msg)
+Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".

spork/netrepl/default-host string source
Default host to run server on and connect to.

spork/netrepl/default-port string source
Default port to run the net repl.

spork/netrepl/server function source
(server &opt host port env cleanup welcome-msg)
 
-Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.
Community Examples

spork/netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
+Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.

spork/netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
 
-Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Community Examples

spork/path/abspath function source
(posix/abspath path)
+Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.

spork/path/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

spork/path/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/basename function source
(posix/basename path)
+Check if a path is absolute.

spork/path/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/delim string source
Platform delimiter
Community Examples

spork/path/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

spork/path/delim string source
Platform delimiter

spork/path/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/join function source
(posix/join & els)
+Get the file extension for a path.

spork/path/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

spork/path/normalize function source
(posix/normalize path)
+Join path elements together.

spork/path/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/posix/abspath function source
(posix/abspath path)
+Split a path into its parts.

spork/path/posix/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/posix/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

spork/path/posix/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/posix/basename function source
(posix/basename path)
+Check if a path is absolute.

spork/path/posix/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/posix/delim string source
Platform delimiter
Community Examples

spork/path/posix/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

spork/path/posix/delim string source
Platform delimiter

spork/path/posix/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/posix/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/posix/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/posix/join function source
(posix/join & els)
+Get the file extension for a path.

spork/path/posix/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

spork/path/posix/normalize function source
(posix/normalize path)
+Join path elements together.

spork/path/posix/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/posix/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/posix/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/posix/relpath function source
(posix/relpath source target)
+Split a path into its parts.

spork/path/posix/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/posix/sep string source
Platform separator
Community Examples

spork/path/relpath function source
(posix/relpath source target)
+Get the relative path between two subpaths.

spork/path/posix/sep string source
Platform separator

spork/path/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/sep string source
Platform separator
Community Examples

spork/path/win32/abspath function source
(win32/abspath path)
+Get the relative path between two subpaths.

spork/path/sep string source
Platform separator

spork/path/win32/abspath function source
(win32/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/win32/abspath? function source
(win32/abspath? path)
+Coerce a path to be absolute.

spork/path/win32/abspath? function source
(win32/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/win32/basename function source
(win32/basename path)
+Check if a path is absolute.

spork/path/win32/basename function source
(win32/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/win32/delim string source
Platform delimiter
Community Examples

spork/path/win32/dirname function source
(win32/dirname path)
+Gets the base file name of a path.

spork/path/win32/delim string source
Platform delimiter

spork/path/win32/dirname function source
(win32/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/win32/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/win32/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/win32/join function source
(win32/join & els)
+Get the file extension for a path.

spork/path/win32/join function source
(win32/join & els)
 
-Join path elements together.
Community Examples

spork/path/win32/normalize function source
(win32/normalize path)
+Join path elements together.

spork/path/win32/normalize function source
(win32/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/win32/parts function source
(win32/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/win32/parts function source
(win32/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/win32/relpath function source
(win32/relpath source target)
+Split a path into its parts.

spork/path/win32/relpath function source
(win32/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/win32/sep string source
Platform separator
Community Examples

spork/rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
+Get the relative path between two subpaths.

spork/path/win32/sep string source
Platform separator

spork/rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
 
-Begin raw terminal functionality. Return a stream that can be read from to get input.
Community Examples

spork/rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
+Begin raw terminal functionality. Return a stream that can be read from to get input.

spork/rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
 
-Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.
Community Examples

spork/rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
+Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.

spork/rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
 
-A handler that a user can use to handle ctrl-z from input to suspend the current process.
Community Examples

spork/rawterm/end cfunction source
(rawterm/end)
+A handler that a user can use to handle ctrl-z from input to suspend the current process.

spork/rawterm/end cfunction source
(rawterm/end)
 
-End raw terminal functionality.
Community Examples

spork/rawterm/getch cfunction source
(rawterm/getch &opt into)
+End raw terminal functionality.

spork/rawterm/getch cfunction source
(rawterm/getch &opt into)
 
-Get a byte of input from stdin, without blocking if possible. Returns a buffer.
Community Examples

spork/rawterm/isatty cfunction source
(rawterm/isatty)
+Get a byte of input from stdin, without blocking if possible. Returns a buffer.

spork/rawterm/isatty cfunction source
(rawterm/isatty)
 
-Check if the current stdin is a tty.
Community Examples

spork/rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
+Check if the current stdin is a tty.

spork/rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
 
-Measure the monospace width of a string.
Community Examples

spork/rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
+Measure the monospace width of a string.

spork/rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
 
-Get the monospace width of a rune. Returns either 0, 1, or 2.
Community Examples

spork/rawterm/size cfunction source
(rawterm/size)
+Get the monospace width of a rune. Returns either 0, 1, or 2.

spork/rawterm/size cfunction source
(rawterm/size)
 
-Get the number of rows and columns visible in the terminal as tuple [rows cols]
Community Examples

spork/rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
+Get the number of rows and columns visible in the terminal as tuple [rows cols]

spork/rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
 
-Get a byte slice that will fit into a number of columns.
Community Examples

spork/regex/compile function source
(compile pattern)
+Get a byte slice that will fit into a number of columns.

spork/regex/compile function source
(compile pattern)
 
-Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.
Community Examples

spork/regex/find function source
(find reg text &opt start)
+Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.

spork/regex/find function source
(find reg text &opt start)
 
-Similar to peg/find, but for regexes.
Community Examples

spork/regex/find-all function source
(find-all reg text &opt start)
+Similar to peg/find, but for regexes.

spork/regex/find-all function source
(find-all reg text &opt start)
 
-Similar to peg/find-all, but for regexes.
Community Examples

spork/regex/match function source
(match reg text &opt start)
+Similar to peg/find-all, but for regexes.

spork/regex/match function source
(match reg text &opt start)
 
-Similar to peg/match, but for regexes.
Community Examples

spork/regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.
Community Examples

spork/regex/replace function source
(replace reg rep text &opt start)
+Similar to peg/match, but for regexes.

spork/regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.

spork/regex/replace function source
(replace reg rep text &opt start)
 
-Similar to peg/replace, but for regexes.
Community Examples

spork/regex/replace-all function source
(replace-all reg rep text &opt start)
+Similar to peg/replace, but for regexes.

spork/regex/replace-all function source
(replace-all reg rep text &opt start)
 
-Similar to peg/replace-all, but for regexes.
Community Examples

spork/regex/source function source
(source pattern)
+Similar to peg/replace-all, but for regexes.

spork/regex/source function source
(source pattern)
 
-Compile a subset of regex to PEG source code.
Community Examples

spork/rpc/client function source
(client &opt host port name)
+Compile a subset of regex to PEG source code.

spork/rpc/client function source
(client &opt host port name)
 
-Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.
Community Examples

spork/rpc/default-host string source
Default host to run server on and connect to.
Community Examples

spork/rpc/default-port string source
Default port to run the net repl.
Community Examples

spork/rpc/server function source
(server functions &opt host port workers-per-connection)
+Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.

spork/rpc/default-host string source
Default host to run server on and connect to.

spork/rpc/default-port string source
Default port to run the net repl.

spork/rpc/server function source
(server functions &opt host port workers-per-connection)
 
-Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Community Examples

spork/schema/make-predicate function source
(make-predicate schema)
+Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.

spork/schema/make-predicate function source
(make-predicate schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `predicate`.
Community Examples

spork/schema/make-validator function source
(make-validator schema)
+Generate a function that can be used to validate a data structure. This is the function form of `predicate`.

spork/schema/make-validator function source
(make-validator schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `validator`.
Community Examples

spork/schema/predicate macro source
(predicate pattern)
+Generate a function that can be used to validate a data structure. This is the function form of `validator`.

spork/schema/predicate macro source
(predicate pattern)
 
-Make a validation predicate given a certain schema.
Community Examples

spork/schema/validator macro source
(validator pattern)
+Make a validation predicate given a certain schema.

spork/schema/validator macro source
(validator pattern)
 
-Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Community Examples

spork/sh/copy-file function source
(copy-file src-path dst-path)
+Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.

spork/sh/copy-file function source
(copy-file src-path dst-path)
 
-Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.
Community Examples

spork/sh/create-dirs function source
(create-dirs dir-path)
+Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.

spork/sh/create-dirs function source
(create-dirs dir-path)
 
-Create all directories in path specified as string including itself.
Community Examples

spork/sh/exec-slurp function source
(exec-slurp & args)
+Create all directories in path specified as string including itself.

spork/sh/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

spork/sh/exists? function source
(exists? path)
+Read stdout of subprocess and return it trimmed in a string.

spork/sh/exists? function source
(exists? path)
 
-Check if the given file or directory exists. (Follows symlinks)
Community Examples

spork/sh/list-all-files function source
(list-all-files dir &opt into)
+Check if the given file or directory exists. (Follows symlinks)

spork/sh/list-all-files function source
(list-all-files dir &opt into)
 
-List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.
Community Examples

spork/sh/make-new-file function source
(make-new-file file-path &opt mode)
+List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.

spork/sh/make-new-file function source
(make-new-file file-path &opt mode)
 
-Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).
Community Examples

spork/sh/rm function source
(rm path)
+Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).

spork/sh/rm function source
(rm path)
 
-Remove a directory and all sub directories recursively.
Community Examples

spork/sh/scan-directory function source
(scan-directory dir func)
+Remove a directory and all sub directories recursively.

spork/sh/scan-directory function source
(scan-directory dir func)
 
-Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.
Community Examples

spork/tarray/buffer cfunction
(tarray/buffer array|size)
+Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.

spork/tarray/buffer cfunction
(tarray/buffer array|size)
 
-Return typed array buffer or create a new buffer.
Community Examples

spork/tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
+Return typed array buffer or create a new buffer.

spork/tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
 
-Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.
Community Examples

spork/tarray/length cfunction
(tarray/length array|buffer)
+Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.

spork/tarray/length cfunction
(tarray/length array|buffer)
 
-Return typed array or buffer size.
Community Examples

spork/tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
+Return typed array or buffer size.

spork/tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
 
-Create new typed array.
Community Examples

spork/tarray/properties cfunction
(tarray/properties array)
+Create new typed array.

spork/tarray/properties cfunction
(tarray/properties array)
 
-Return typed array properties as a struct.
Community Examples

spork/tarray/slice cfunction
(tarray/slice tarr &opt start end)
+Return typed array properties as a struct.

spork/tarray/slice cfunction
(tarray/slice tarr &opt start end)
 
-Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.
Community Examples

spork/tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
+Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.

spork/tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
 
-Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Community Examples

spork/tasker/all-tasks function source
(all-tasks tasker &opt detailed)
+Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.

spork/tasker/all-tasks function source
(all-tasks tasker &opt detailed)
 
-Get an array of all task ids for which there is still data on disk. If `detailed` is truthy, return full task metadata instead of ids.
Community Examples

spork/tasker/cancel-task function source
(cancel-task tasker task-id)
+Get an array of all task ids for which there is still data on disk. If `detailed` is truthy, return full task metadata instead of ids.

spork/tasker/cancel-task function source
(cancel-task tasker task-id)
 
-Cancel a queued or running task.
Community Examples

spork/tasker/close-queues function source
(close-queues tasker)
+Cancel a queued or running task.

spork/tasker/close-queues function source
(close-queues tasker)
 
-Prevent any tasks from being added to queues. When an executor finishes it's current job, if there are any, it will terminate. When all executors complete, the call to `run-executors` will complete.
Community Examples

spork/tasker/default-expiration number source
Default expiration time (1 day)
Community Examples

spork/tasker/default-priority number source
Default task priority
Community Examples

spork/tasker/default-task-directory string source
Default location of task records
Community Examples

spork/tasker/err-file-name string source
Name of the file for logging errors
Community Examples

spork/tasker/max-priority number source
Maximum allowed priority (lower priority tasks will execute first)
Community Examples

spork/tasker/min-priority number source
Minimum allowed priority (lower priority tasks will execute first)
Community Examples

spork/tasker/new-tasker function source
(new-tasker &opt task-directory queues queue-size)
+Prevent any tasks from being added to queues. When an executor finishes it's current job, if there are any, it will terminate. When all executors complete, the call to `run-executors` will complete.

spork/tasker/default-expiration number source
Default expiration time (1 day)

spork/tasker/default-priority number source
Default task priority

spork/tasker/default-task-directory string source
Default location of task records

spork/tasker/err-file-name string source
Name of the file for logging errors

spork/tasker/max-priority number source
Maximum allowed priority (lower priority tasks will execute first)

spork/tasker/min-priority number source
Minimum allowed priority (lower priority tasks will execute first)

spork/tasker/new-tasker function source
(new-tasker &opt task-directory queues queue-size)
 
-Create queues and various settings to run tasks. Create a new tasker table.
Community Examples

spork/tasker/out-file-name string source
Name of the file for general logging
Community Examples

spork/tasker/queue-task function source
(queue-task tasker argv &opt note priority qname timeout expiration input)
+Create queues and various settings to run tasks. Create a new tasker table.

spork/tasker/out-file-name string source
Name of the file for general logging

spork/tasker/queue-task function source
(queue-task tasker argv &opt note priority qname timeout expiration input)
 
-Add a task specification to a queue. Supply an argv string array that will be used to invoke s a subprocess. The optional `note` parameter is just a textual note for task trackingv. The `priority` parameter should be an integer between 0 and 9 inclusive, default is 4. Lower priority jobs in the same queue will be executed by higher priority. Use input to pass in generic, unstructured input to a task.
Community Examples

spork/tasker/run-cleanup function source
(run-cleanup tasker)
+Add a task specification to a queue. Supply an argv string array that will be used to invoke s a subprocess. The optional `note` parameter is just a textual note for task trackingv. The `priority` parameter should be an integer between 0 and 9 inclusive, default is 4. Lower priority jobs in the same queue will be executed by higher priority. Use input to pass in generic, unstructured input to a task.

spork/tasker/run-cleanup function source
(run-cleanup tasker)
 
-Delete old expired jobs saved on disk
Community Examples

spork/tasker/run-executors function source
(run-executors tasker &opt workers-per-queue pre-task post-task)
+Delete old expired jobs saved on disk

spork/tasker/run-executors function source
(run-executors tasker &opt workers-per-queue pre-task post-task)
 
-Start a number of executors to run tasks as with `tasker/spawn-executors`, and then wait for all executors to complete.
Community Examples

spork/tasker/spawn-executors function source
(spawn-executors tasker &opt qnames workers-per-queue pre-task post-task)
+Start a number of executors to run tasks as with `tasker/spawn-executors`, and then wait for all executors to complete.

spork/tasker/spawn-executors function source
(spawn-executors tasker &opt qnames workers-per-queue pre-task post-task)
 
-Start a number of executors to run tasks. Tasks can be added to a queue by calling queue-task. A single tasker object can make multiple calls to spawn-executors.
Community Examples

spork/tasker/statuses tuple source
A tuple of all possible statuses that a task can have.
Community Examples

spork/tasker/task-file function source
(task-file tasker task-id &opt file-name)
+Start a number of executors to run tasks. Tasks can be added to a queue by calling queue-task. A single tasker object can make multiple calls to spawn-executors.

spork/tasker/statuses tuple source
A tuple of all possible statuses that a task can have.

spork/tasker/task-file function source
(task-file tasker task-id &opt file-name)
 
-Get a log file for a path. By default, will get a path to out.log.
Community Examples

spork/tasker/task-meta-name string source
Name of the task metadata file
Community Examples

spork/tasker/task-status function source
(task-status tasker task-id)
+Get a log file for a path. By default, will get a path to out.log.

spork/tasker/task-meta-name string source
Name of the task metadata file

spork/tasker/task-status function source
(task-status tasker task-id)
 
-Look up the status of a given task by id.
Community Examples

spork/temple/add-loader function source
(add-loader)
+Look up the status of a given task by id.

spork/temple/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

spork/temple/base-env table source
Base environment for rendering
Community Examples

spork/temple/compile function source
(compile str)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

spork/temple/base-env table source
Base environment for rendering

spork/temple/compile function source
(compile str)
 
 Compile a Temple template into a function which will return a
 rendered buffer.
 
 The resulting function should receive the template arguments in the
-&keys format.
Community Examples

spork/temple/create function source
(create source &opt where)
+&keys format.

spork/temple/create function source
(create source &opt where)
 
-Compile a template string into a function. Optionally provide a location where the source is from to improve debugging. Returns the template function.
Community Examples

spork/test/assert function source
(assert x &opt e)
+Compile a template string into a function. Optionally provide a location where the source is from to improve debugging. Returns the template function.

spork/test/assert function source
(assert x &opt e)
 
-Override's the default assert with some nice error handling.
Community Examples

spork/test/assert-docs function source
(assert-docs path)
+Override's the default assert with some nice error handling.

spork/test/assert-docs function source
(assert-docs path)
 
 Assert that all symbols, when module on the path is required,
-have proper doc string
Community Examples

spork/test/assert-error macro source
(assert-error msg & forms)
+have proper doc string

spork/test/assert-error macro source
(assert-error msg & forms)
 
-Test passes if forms error.
Community Examples

spork/test/assert-no-error macro source
(assert-no-error msg & forms)
+Test passes if forms error.

spork/test/assert-no-error macro source
(assert-no-error msg & forms)
 
-Test passes if forms do not error.
Community Examples

spork/test/assert-not function source
(assert-not x &opt e)
+Test passes if forms do not error.

spork/test/assert-not function source
(assert-not x &opt e)
 
-Invert assert.
Community Examples

spork/test/capture-stderr macro source
(capture-stderr & body)
+Invert assert.

spork/test/capture-stderr macro source
(capture-stderr & body)
 
 Runs the form and captures stderr. Returns tuple with result of the form
-and a string with captured stderr.
Community Examples

spork/test/capture-stdout macro source
(capture-stdout & body)
+and a string with captured stderr.

spork/test/capture-stdout macro source
(capture-stdout & body)
 
 Runs the form and captures stdout. Returns tuple with result of the form
-and a string with captured stdout.
Community Examples

spork/test/end-suite function source
(end-suite)
+and a string with captured stdout.

spork/test/end-suite function source
(end-suite)
 
-Ends test suite.
Community Examples

spork/test/start-suite function source
(start-suite &opt name)
+Ends test suite.

spork/test/start-suite function source
(start-suite &opt name)
 
-Starts test suite.
Community Examples

spork/test/suppress-stderr macro source
(suppress-stderr & body)
+Starts test suite.

spork/test/suppress-stderr macro source
(suppress-stderr & body)
 
-Suppreses stdout from the body
Community Examples

spork/test/suppress-stdout macro source
(suppress-stdout & body)
+Suppreses stdout from the body

spork/test/suppress-stdout macro source
(suppress-stdout & body)
 
-Suppreses stdout from the body
Community Examples

spork/test/timeit macro source
(timeit form &opt tag)
+Suppreses stdout from the body

spork/test/timeit macro source
(timeit form &opt tag)
 
 Time the execution of `form` using `os/clock` before and after,
 and print the result to stdout. returns: result of executing `form`.
-Uses `tag` (default "Elapsed time:") to tag the printout.
Community Examples

spork/utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
+Uses `tag` (default "Elapsed time:") to tag the printout.

spork/utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
 
-Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].
Community Examples

spork/utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
+Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].

spork/utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
 
-Encode a Unicode codepoint into the end of a buffer.
Community Examples

spork/utf8/prefix->width cfunction source
(utf8/prefix->width c)
+Encode a Unicode codepoint into the end of a buffer.

spork/utf8/prefix->width cfunction source
(utf8/prefix->width c)
 
-Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Community Examples
+Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Parser Module Argument Parsing diff --git a/static/1.25.1/api/spork/json.html b/static/1.25.1/api/spork/json.html index e1932fc9..9d0d4c68 100644 --- a/static/1.25.1/api/spork/json.html +++ b/static/1.25.1/api/spork/json.html @@ -109,9 +109,9 @@

Index

json/decode json/encode


json/decode cfunction
(json/decode json-source &opt keywords nils)
 
-Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.
Community Examples

json/encode cfunction
(json/encode x &opt tab newline buf)
+Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.

json/encode cfunction
(json/encode x &opt tab newline buf)
 
-Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
Community Examples
+Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
HTTP Framework Math extended diff --git a/static/1.25.1/api/spork/math.html b/static/1.25.1/api/spork/math.html index c4059553..59b69dc8 100644 --- a/static/1.25.1/api/spork/math.html +++ b/static/1.25.1/api/spork/math.html @@ -110,144 +110,144 @@

Index

math/add math/add-to-mean math/approx-eq math/bernoulli-distribution math/binominal-coeficient math/binominal-distribution math/check-propability math/chi-squared-distribution-table math/cols math/cumulative-std-normal-probability math/det math/dot math/epsilon math/extent math/factorial math/geometric-mean math/get-only-el math/harmonic-mean math/ident math/interquartile-range math/linear-regression math/linear-regression-line math/median math/median-absolute-deviation math/minor math/mode math/mop math/mul math/perm math/permutation-test math/permutations math/poisson-distribution math/quantile math/quantile-rank math/quantile-rank-sorted math/quantile-sorted math/quickselect math/relative-err math/root-mean-square math/rows math/sample-correlation math/sample-covariance math/sample-skewness math/sample-standard-deviation math/sample-variance math/scalar math/shuffle-in-place math/size math/sop math/standard-deviation math/standard-normal-table math/sum-compensated math/sum-nth-power-deviations math/swap math/t-test math/t-test-2 math/trans math/variance math/z-score math/zero


math/add function source
(add m a)
 
 Add `a` to matrix `m` where it can be matrix or scalar.
-Matrix `m` is mutated.
Community Examples

math/add-to-mean function source
(add-to-mean m n v)
+Matrix `m` is mutated.

math/add-to-mean function source
(add-to-mean m n v)
 
-Adds new value `v` to mean `m` from `n` values.
Community Examples

math/approx-eq function source
(approx-eq a e &opt t)
+Adds new value `v` to mean `m` from `n` values.

math/approx-eq function source
(approx-eq a e &opt t)
 
 Approximate equality between actual number `a`
 and expected number `e`. Default tolerance `t`
-is `epsilon`.
Community Examples

math/bernoulli-distribution function source
(bernoulli-distribution p)
+is `epsilon`.

math/bernoulli-distribution function source
(bernoulli-distribution p)
 
-Creates Bernoulli distribution from popability `p` in the tuple.
Community Examples

math/binominal-coeficient function source
(binominal-coeficient n k)
+Creates Bernoulli distribution from popability `p` in the tuple.

math/binominal-coeficient function source
(binominal-coeficient n k)
 
 Computes binominal coeficient from set of size `n`
-and sample size `k`.
Community Examples

math/binominal-distribution function source
(binominal-distribution t p)
+and sample size `k`.

math/binominal-distribution function source
(binominal-distribution t p)
 
 Creates binominal distribution from trials `t`
-and propability `p` in the tuple.
Community Examples

math/check-propability function source
(check-propability p)
+and propability `p` in the tuple.

math/check-propability function source
(check-propability p)
 
-Asserts that probability in in the [0 1] range.
Community Examples

math/chi-squared-distribution-table struct source
Chi Squared distribution table.
Community Examples

math/cols function source
(cols m)
+Asserts that probability in in the [0 1] range.

math/chi-squared-distribution-table struct source
Chi Squared distribution table.

math/cols function source
(cols m)
 
-Returns numbers of columns of matrix `m`.
Community Examples

math/cumulative-std-normal-probability function source
(cumulative-std-normal-probability z)
+Returns numbers of columns of matrix `m`.

math/cumulative-std-normal-probability function source
(cumulative-std-normal-probability z)
 
-Computes standard normal probability for `y`.
Community Examples

math/det function source
(det m)
+Computes standard normal probability for `y`.

math/det function source
(det m)
 
-Computes determinant of matrix `m`.
Community Examples

math/dot function source
(dot mx my)
+Computes determinant of matrix `m`.

math/dot function source
(dot mx my)
 
-Computes dot product of matrices or vectors `x` and `y`.
Community Examples

math/epsilon number source
Epsilon constant
Community Examples

math/extent function source
(extent xs)
+Computes dot product of matrices or vectors `x` and `y`.

math/epsilon number source
Epsilon constant

math/extent function source
(extent xs)
 
-Returns the minimum & maximum number in an `xs` as tuple.
Community Examples

math/factorial function source
(factorial n)
+Returns the minimum & maximum number in an `xs` as tuple.

math/factorial function source
(factorial n)
 
-Returns factorial of `n`.
Community Examples

math/geometric-mean function source
(geometric-mean xs)
+Returns factorial of `n`.

math/geometric-mean function source
(geometric-mean xs)
 
-Gets the geometric mean from `xs`.
Community Examples

math/get-only-el macro source
(get-only-el m)
+Gets the geometric mean from `xs`.

math/get-only-el macro source
(get-only-el m)
 
 Convenience macro for geting first element
-from first row of the two dimensional array `m`.
Community Examples

math/harmonic-mean function source
(harmonic-mean xs)
+from first row of the two dimensional array `m`.

math/harmonic-mean function source
(harmonic-mean xs)
 
-Gets the harmonic mean from `xs`.
Community Examples

math/ident function source
(ident c)
+Gets the harmonic mean from `xs`.

math/ident function source
(ident c)
 
-Creates identity matrix with `c` x `c` size.
Community Examples

math/interquartile-range function source
(interquartile-range xs)
+Creates identity matrix with `c` x `c` size.

math/interquartile-range function source
(interquartile-range xs)
 
-Gets the interquartile range from `xs`.
Community Examples

math/linear-regression function source
(linear-regression coords)
+Gets the interquartile range from `xs`.

math/linear-regression function source
(linear-regression coords)
 
 Computes the slope `:m` and y-intercept `:b`
-of the function in the struct from set of coordinates.
Community Examples

math/linear-regression-line function source
(linear-regression-line {:m m :b b})
+of the function in the struct from set of coordinates.

math/linear-regression-line function source
(linear-regression-line {:m m :b b})
 
-Constructs function from struct returned by linear regression.
Community Examples

math/median function source
(median xs)
+Constructs function from struct returned by linear regression.

math/median function source
(median xs)
 
-Gets the median value from `xs`
Community Examples

math/median-absolute-deviation function source
(median-absolute-deviation xs)
+Gets the median value from `xs`

math/median-absolute-deviation function source
(median-absolute-deviation xs)
 
-Gets median absolute deviation from `xs`.
Community Examples

math/minor function source
(minor m x y)
+Gets median absolute deviation from `xs`.

math/minor function source
(minor m x y)
 
-Computes minor matrix of matrix `m` and `x`, `y`.
Community Examples

math/mode function source
(mode xs)
+Computes minor matrix of matrix `m` and `x`, `y`.

math/mode function source
(mode xs)
 
-Gets the mode value from `xs`.
Community Examples

math/mop function source
(mop m op a)
+Gets the mode value from `xs`.

math/mop function source
(mop m op a)
 
 Mutates every cell of the matrix `m` with `op`
-and corresponding cell from matrix arg `a`.
Community Examples

math/mul function source
(mul m a)
+and corresponding cell from matrix arg `a`.

math/mul function source
(mul m a)
 
 Multiply matrix `m` with `a` which can be matrix or vector.
-Matrix `m` is mutated.
Community Examples

math/perm function source
(perm m)
+Matrix `m` is mutated.

math/perm function source
(perm m)
 
-Computes permanent of the matrix `m`.
Community Examples

math/permutation-test function source
(permutation-test xs ys &opt a k)
+Computes permanent of the matrix `m`.

math/permutation-test function source
(permutation-test xs ys &opt a k)
 
 Conducts a permutation test to determine if two data sets
 `xs` and `ys` are *significantly* different from each other.
 You can use alternative hypotesis `a`, which defaults to `:two-side`,
 with `:greater` and `:lesser` being the other two options.
 The last optional argument is `k` number of values
-in permutation distribution
Community Examples

math/permutations function source
(permutations s &opt k)
+in permutation distribution

math/permutations function source
(permutations s &opt k)
 
-Returns permutations of length `k` from members of `s`
Community Examples

math/poisson-distribution function source
(poisson-distribution lambda)
+Returns permutations of length `k` from members of `s`

math/poisson-distribution function source
(poisson-distribution lambda)
 
-Creates Poisson distribution from `lambda` in tuple.
Community Examples

math/quantile function source
(quantile xs p)
+Creates Poisson distribution from `lambda` in tuple.

math/quantile function source
(quantile xs p)
 
-Gets the quantile value from `xs` at `p` from unsorted population.
Community Examples

math/quantile-rank function source
(quantile-rank xs p)
+Gets the quantile value from `xs` at `p` from unsorted population.

math/quantile-rank function source
(quantile-rank xs p)
 
-Gets the quantile rank of value `v` from unsorted `xs`.
Community Examples

math/quantile-rank-sorted function source
(quantile-rank-sorted xs v)
+Gets the quantile rank of value `v` from unsorted `xs`.

math/quantile-rank-sorted function source
(quantile-rank-sorted xs v)
 
-Gets the quantile rank of value `v` from sorted `xs`.
Community Examples

math/quantile-sorted function source
(quantile-sorted xs p)
+Gets the quantile rank of value `v` from sorted `xs`.

math/quantile-sorted function source
(quantile-sorted xs p)
 
-Gets the quantile value from `xs` at `p` from sorted population.
Community Examples

math/quickselect function source
(quickselect arr k &opt left right)
+Gets the quantile value from `xs` at `p` from sorted population.

math/quickselect function source
(quickselect arr k &opt left right)
 
 Rearrange items in `arr` so that all items in `[left, k]` range
 are the smallest.
 The `k`-th element will have the `(k - left + 1)`-th smallest value
 in `[left, right]`.
-Mutates `arr`.
Community Examples

math/relative-err function source
(relative-err a e)
+Mutates `arr`.

math/relative-err function source
(relative-err a e)
 
 Gets the relative err between actual number `a`
-and expected number `e`.
Community Examples

math/root-mean-square function source
(root-mean-square xs)
+and expected number `e`.

math/root-mean-square function source
(root-mean-square xs)
 
-Gets the root mean square from `xs`.
Community Examples

math/rows function source
(rows m)
+Gets the root mean square from `xs`.

math/rows function source
(rows m)
 
-Returns numbers of rows of matrix `m`.
Community Examples

math/sample-correlation function source
(sample-correlation xs ys)
+Returns numbers of rows of matrix `m`.

math/sample-correlation function source
(sample-correlation xs ys)
 
-Gets the sample correlation between `xs` and `ys`.
Community Examples

math/sample-covariance function source
(sample-covariance xs ys)
+Gets the sample correlation between `xs` and `ys`.

math/sample-covariance function source
(sample-covariance xs ys)
 
-Gets the sample covariance between `xs` and `ys`.
Community Examples

math/sample-skewness function source
(sample-skewness xs)
+Gets the sample covariance between `xs` and `ys`.

math/sample-skewness function source
(sample-skewness xs)
 
-Gets the sample skeweness from the `xs`.
Community Examples

math/sample-standard-deviation function source
(sample-standard-deviation xs)
+Gets the sample skeweness from the `xs`.

math/sample-standard-deviation function source
(sample-standard-deviation xs)
 
-Gets sample standard deviation from `xs`.
Community Examples

math/sample-variance function source
(sample-variance xs)
+Gets sample standard deviation from `xs`.

math/sample-variance function source
(sample-variance xs)
 
-Get the sample variance from `xs`.
Community Examples

math/scalar function source
(scalar c s)
+Get the sample variance from `xs`.

math/scalar function source
(scalar c s)
 
-Creates scalar `s` matrix with `c` x `c` size.
Community Examples

math/shuffle-in-place function source
(shuffle-in-place xs)
+Creates scalar `s` matrix with `c` x `c` size.

math/shuffle-in-place function source
(shuffle-in-place xs)
 
 Generate random permutation of the array `xs`
-which is shuffled in place.
Community Examples

math/size function source
(size m)
+which is shuffled in place.

math/size function source
(size m)
 
-Returns tuple with the matrix `m` size [rows cols].
Community Examples

math/sop function source
(sop m op & a)
+Returns tuple with the matrix `m` size [rows cols].

math/sop function source
(sop m op & a)
 
 Mutates every cell of the matrix `m` with `op`
-and variadic args `a`.
Community Examples

math/standard-deviation function source
(standard-deviation xs)
+and variadic args `a`.

math/standard-deviation function source
(standard-deviation xs)
 
-Gets the standard deviation from `ds`.
Community Examples

math/standard-normal-table tuple source
Computed standard normal table.
Community Examples

math/sum-compensated function source
(sum-compensated xs)
+Gets the standard deviation from `ds`.

math/standard-normal-table tuple source
Computed standard normal table.

math/sum-compensated function source
(sum-compensated xs)
 
-Returns sum of the members of `xs` with Kahan-Babushka algorithm.
Community Examples

math/sum-nth-power-deviations function source
(sum-nth-power-deviations xs n)
+Returns sum of the members of `xs` with Kahan-Babushka algorithm.

math/sum-nth-power-deviations function source
(sum-nth-power-deviations xs n)
 
-Get the sum of deviations to the n power.
Community Examples

math/swap function source
(swap arr i j)
+Get the sum of deviations to the n power.

math/swap function source
(swap arr i j)
 
 Swaps members with indices `i` and `j` of arr.
-Noop when `i` equals `j`.
Community Examples

math/t-test function source
(t-test xs expv)
+Noop when `i` equals `j`.

math/t-test function source
(t-test xs expv)
 
 Computes one sample t-test comparing the mean of `xs`
-to known value `expv`.
Community Examples

math/t-test-2 function source
(t-test-2 xs ys &opt d)
+to known value `expv`.

math/t-test-2 function source
(t-test-2 xs ys &opt d)
 
 Computes two sample t-test of two samples `xs` and `ys`
-with difference optional `d` which defaults to 0.
Community Examples

math/trans function source
(trans m)
+with difference optional `d` which defaults to 0.

math/trans function source
(trans m)
 
-Returns a new transposed matrix from `m`.
Community Examples

math/variance function source
(variance xs)
+Returns a new transposed matrix from `m`.

math/variance function source
(variance xs)
 
-Get the variance from the `xs`.
Community Examples

math/z-score function source
(z-score x m d)
+Get the variance from the `xs`.

math/z-score function source
(z-score x m d)
 
 Gets the standard score for number `x` from mean `m` 
-and standard deviation `d`.
Community Examples

math/zero function source
(zero c &opt r)
+and standard deviation `d`.

math/zero function source
(zero c &opt r)
 
 Creates vector of length `c`, or matrix if `r`
-is provided, and fills it with zeros.
Community Examples
+is provided, and fills it with zeros.

JSON Miscellaneous Functions diff --git a/static/1.25.1/api/spork/misc.html b/static/1.25.1/api/spork/misc.html index 07d93de9..4547e443 100644 --- a/static/1.25.1/api/spork/misc.html +++ b/static/1.25.1/api/spork/misc.html @@ -109,79 +109,79 @@

Index

misc/always misc/antepenultimate misc/caperr misc/capout misc/cond-> misc/cond->> misc/dedent misc/defs misc/dfs misc/do-def misc/do-var misc/gett misc/insert-sorted misc/insert-sorted-by misc/int->string misc/int/ misc/log misc/make misc/make-id misc/map-keys misc/map-vals misc/penultimate misc/print-table misc/randomize-array misc/second misc/select-keys misc/set* misc/string->int misc/table-filter misc/third misc/trim-prefix misc/trim-suffix misc/until misc/vars


misc/always function source
(always x)
 
-Return a function that discards any arguments and always returns `x`.
Community Examples

misc/antepenultimate function source
(antepenultimate xs)
+Return a function that discards any arguments and always returns `x`.

misc/antepenultimate function source
(antepenultimate xs)
 
-Get the third-to-last element from an indexed data structure.
Community Examples

misc/caperr macro source
(caperr & body)
+Get the third-to-last element from an indexed data structure.

misc/caperr macro source
(caperr & body)
 
 Captures the standart error output of the variadic `body` and returns it
-as a buffer.
Community Examples

misc/capout macro source
(capout & body)
+as a buffer.

misc/capout macro source
(capout & body)
 
 Captures the standart output of the variadic `body` and returns it as
-a buffer.
Community Examples

misc/cond-> macro source
(cond-> val & clauses)
+a buffer.

misc/cond-> macro source
(cond-> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs with condition and operation to which the `val`,
 is put as first argument. All conditions are tried and
 for truthy conditions the operation is executed.
-Returns the value mutated if any condition is truthy.
Community Examples

misc/cond->> macro source
(cond->> val & clauses)
+Returns the value mutated if any condition is truthy.

misc/cond->> macro source
(cond->> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs of condition and operation to which the `val`,
 is put as last argument. All conditions are tried and
 for truthy the operation is ran.
-Returns mutated value if any condition is truthy.
Community Examples

misc/dedent function source
(dedent & xs)
+Returns mutated value if any condition is truthy.

misc/dedent function source
(dedent & xs)
 
 Remove indentation after concatenating the arguments. Works by removing
 leading whitespace, and then removing that same pattern of whitepsace after
-new lines.
Community Examples

misc/defs macro source
(defs & bindings)
+new lines.

misc/defs macro source
(defs & bindings)
 
-Defines many constants as in let `bindings`, but without creating new scope.
Community Examples

misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
+Defines many constants as in let `bindings`, but without creating new scope.

misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
 
 Do a depth first, pre-order traversal over a data structure.
 Also allow for callbacks before and after visiting the children
 of a node. Also allow for a custom `get-children` function to
 change traversal as needed. Will detect cycles if an empty table
 is passed as the `seen` parameter, which is used to cached values
-that have been visited.
Community Examples

misc/do-def macro source
(do-def c d & body)
+that have been visited.

misc/do-def macro source
(do-def c d & body)
 
 Convenience macro for defining constant named `c` with value `d` before `body`
 and returning it after evaluating `body`, that presumably modifies 
-the `c` refered content. For example buffer, table or array.
Community Examples

misc/do-var macro source
(do-var v d & body)
+the `c` refered content. For example buffer, table or array.

misc/do-var macro source
(do-var v d & body)
 
 Convenience macro for defining varible named `v` with value `d` before `body`
-and returning it after evaluating `body`, that presumably modifies `v`.
Community Examples

misc/gett macro source
(gett ds & keys)
+and returning it after evaluating `body`, that presumably modifies `v`.

misc/gett macro source
(gett ds & keys)
 
-Recursive macro (get). Similar to get-in, but keys are variadic argument.
Community Examples

misc/insert-sorted function source
(insert-sorted arr <? & xs)
+Recursive macro (get). Similar to get-in, but keys are variadic argument.

misc/insert-sorted function source
(insert-sorted arr <? & xs)
 
 Insert elements in `arr` such that it remains sorted by the comparator. If
-`arr` is not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
+`arr` is not sorted beforehand, the results are undefined. Returns `arr`.

misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
 
 Insert elements in `arr` such that it remains sorted by the value returned
 when `f` is called with the element, comparing the values with <. If `arr` is
-not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

misc/int->string function source
(int->string int &opt base)
+not sorted beforehand, the results are undefined. Returns `arr`.

misc/int->string function source
(int->string int &opt base)
 
-Stringify an integer in a particular base. Defaults to decimal (base 10).
Community Examples

misc/int/ function source
(int/ & xs)
+Stringify an integer in a particular base. Defaults to decimal (base 10).

misc/int/ function source
(int/ & xs)
 
-Perform integer division.
Community Examples

misc/log macro source
(log level & args)
+Perform integer division.

misc/log macro source
(log level & args)
 
 Print to a dynamic binding stream if that stream is set, otherwise do
 nothing. Evaluate to nil. 
 For example, `(log :err "value error: %V" my-value)` will print 
-to `(dyn :err)` only if `(dyn :err)` has been set.
Community Examples

misc/make macro source
(make prototype & pairs)
+to `(dyn :err)` only if `(dyn :err)` has been set.

misc/make macro source
(make prototype & pairs)
 
 Convenience macro for creating new table from even number of kvs pairs in a variadic `table-or-pairs`
 arguments and setting its prototype to `prototype`.
-Factory function for creating new objects from prototypes.
Community Examples

misc/make-id function source
(make-id &opt prefix)
+Factory function for creating new objects from prototypes.

misc/make-id function source
(make-id &opt prefix)
 
 Create a random, printable keyword id with 10 bytes of entropy
-with an optional prefix.
Community Examples

misc/map-keys function source
(map-keys f data)
+with an optional prefix.

misc/map-keys function source
(map-keys f data)
 
 Returns new table with function `f` applied to `data`'s
-keys recursively.
Community Examples

misc/map-vals function source
(map-vals f data)
+keys recursively.

misc/map-vals function source
(map-vals f data)
 
-Returns new table with function `f` applied to `data`'s values.
Community Examples

misc/penultimate function source
(penultimate xs)
+Returns new table with function `f` applied to `data`'s values.

misc/penultimate function source
(penultimate xs)
 
-Get the second-to-last element from an indexed data structure.
Community Examples

misc/print-table function source
(print-table data &opt columns header-mapping)
+Get the second-to-last element from an indexed data structure.

misc/print-table function source
(print-table data &opt columns header-mapping)
 
 Iterate through the rows of a data structure and print a table in a human
 readable way, with padding and heading information. Can optionally provide
@@ -189,37 +189,37 @@ 

Index for each row. Lastly, a `header-mapping` dictionary can be provided that changes the printed header names my mapping column keys to the desired header name. If no mapping is found, then the column key will be used as -the header name. Returns nil.

Community Examples

misc/randomize-array function source
(randomize-array arr &opt rng)
+the header name. Returns nil.

misc/randomize-array function source
(randomize-array arr &opt rng)
 
 Randomizes array using the fisher-yates shuffle, takes an optional random
-number generator.
Community Examples

misc/second function source
(second xs)
+number generator.

misc/second function source
(second xs)
 
-Get the second element from an indexed data structure.
Community Examples

misc/select-keys function source
(select-keys data keyz)
+Get the second element from an indexed data structure.

misc/select-keys function source
(select-keys data keyz)
 
-Returns new table with selected `keyz` from dictionary `data`.
Community Examples

misc/set* macro source
(set* tgts exprs)
+Returns new table with selected `keyz` from dictionary `data`.

misc/set* macro source
(set* tgts exprs)
 
 Parallel `set` function. Takes a list of targets and
 expressions, evaluates all the expressions, and then
 assigns them to the targets. Each target can be a variable
-or a 2-tuple, just like in the normal `set` special form.
Community Examples

misc/string->int function source
(string->int str &opt base)
+or a 2-tuple, just like in the normal `set` special form.

misc/string->int function source
(string->int str &opt base)
 
 Parse an integer in the given base. Defaults to decimal (base 10). Differs
-from scan-number in that this does not recognize floating point notation.
Community Examples

misc/table-filter function source
(table-filter pred dict)
+from scan-number in that this does not recognize floating point notation.

misc/table-filter function source
(table-filter pred dict)
 
 Filter a key-value structure info a table. Semantics are the same as for
 built-in `filter`, except that `pred` takes two arguments (key and value.)
-Does not consider prototypes.
Community Examples

misc/third function source
(third xs)
+Does not consider prototypes.

misc/third function source
(third xs)
 
-Get the third element from an indexed data structure.
Community Examples

misc/trim-prefix function source
(trim-prefix prefix str)
+Get the third element from an indexed data structure.

misc/trim-prefix function source
(trim-prefix prefix str)
 
-Trim the specified prefix of a string if it has one
Community Examples

misc/trim-suffix function source
(trim-suffix suffix str)
+Trim the specified prefix of a string if it has one

misc/trim-suffix function source
(trim-suffix suffix str)
 
-Trim the specified suffix of a string if it has one
Community Examples

misc/until macro source
(until cnd & body)
+Trim the specified suffix of a string if it has one

misc/until macro source
(until cnd & body)
 
 Repeat `body` while the `cnd` is false.
-Equivalent to (while (not cnd) ;body).
Community Examples

misc/vars macro source
(vars & bindings)
+Equivalent to (while (not cnd) ;body).

misc/vars macro source
(vars & bindings)
 
-Defines many variables as in let `bindings`, but without creating new scope.
Community Examples
+Defines many variables as in let `bindings`, but without creating new scope.
Math extended NetREPL diff --git a/static/1.25.1/api/spork/msg.html b/static/1.25.1/api/spork/msg.html index 2cea9f7d..de0b4085 100644 --- a/static/1.25.1/api/spork/msg.html +++ b/static/1.25.1/api/spork/msg.html @@ -109,11 +109,11 @@

Index

msg/make-proto msg/make-recv msg/make-send


msg/make-proto function source
(make-proto stream &opt pack unpack)
 
-Create both a send an recv function from a stream, as with `make-send` and `make-recv`.
Community Examples

msg/make-recv function source
(make-recv stream &opt unpack)
+Create both a send an recv function from a stream, as with `make-send` and `make-recv`.

msg/make-recv function source
(make-recv stream &opt unpack)
 
-Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.
Community Examples

msg/make-send function source
(make-send stream &opt pack)
+Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.

msg/make-send function source
(make-send stream &opt pack)
 
-Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Community Examples
+Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Shell Utilities Test diff --git a/static/1.25.1/api/spork/netrepl.html b/static/1.25.1/api/spork/netrepl.html index 64849aab..bbfcb574 100644 --- a/static/1.25.1/api/spork/netrepl.html +++ b/static/1.25.1/api/spork/netrepl.html @@ -109,11 +109,11 @@

Index

netrepl/client netrepl/default-host netrepl/default-port netrepl/server netrepl/server-single


netrepl/client function source
(client &opt host port name)
 
-Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".
Community Examples

netrepl/default-host string source
Default host to run server on and connect to.
Community Examples

netrepl/default-port string source
Default port to run the net repl.
Community Examples

netrepl/server function source
(server &opt host port env cleanup welcome-msg)
+Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".

netrepl/default-host string source
Default host to run server on and connect to.

netrepl/default-port string source
Default port to run the net repl.

netrepl/server function source
(server &opt host port env cleanup welcome-msg)
 
-Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.
Community Examples

netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
+Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.

netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
 
-Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Community Examples
+Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Miscellaneous Functions Path Utilities diff --git a/static/1.25.1/api/spork/path.html b/static/1.25.1/api/spork/path.html index 855c097f..2f90384e 100644 --- a/static/1.25.1/api/spork/path.html +++ b/static/1.25.1/api/spork/path.html @@ -109,59 +109,59 @@

Index

path/abspath path/abspath? path/basename path/delim path/dirname path/ext path/join path/normalize path/parts path/posix/abspath path/posix/abspath? path/posix/basename path/posix/delim path/posix/dirname path/posix/ext path/posix/join path/posix/normalize path/posix/parts path/posix/relpath path/posix/sep path/relpath path/sep path/win32/abspath path/win32/abspath? path/win32/basename path/win32/delim path/win32/dirname path/win32/ext path/win32/join path/win32/normalize path/win32/parts path/win32/relpath path/win32/sep


path/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

path/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/basename function source
(posix/basename path)
+Check if a path is absolute.

path/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

path/delim string source
Platform delimiter
Community Examples

path/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

path/delim string source
Platform delimiter

path/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/ext function source
(ext path)
+Gets the directory name of a path.

path/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/join function source
(posix/join & els)
+Get the file extension for a path.

path/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

path/normalize function source
(posix/normalize path)
+Join path elements together.

path/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

path/posix/abspath function source
(posix/abspath path)
+Split a path into its parts.

path/posix/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/posix/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

path/posix/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/posix/basename function source
(posix/basename path)
+Check if a path is absolute.

path/posix/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

path/posix/delim string source
Platform delimiter
Community Examples

path/posix/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

path/posix/delim string source
Platform delimiter

path/posix/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/posix/ext function source
(ext path)
+Gets the directory name of a path.

path/posix/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/posix/join function source
(posix/join & els)
+Get the file extension for a path.

path/posix/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

path/posix/normalize function source
(posix/normalize path)
+Join path elements together.

path/posix/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/posix/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/posix/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

path/posix/relpath function source
(posix/relpath source target)
+Split a path into its parts.

path/posix/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/posix/sep string source
Platform separator
Community Examples

path/relpath function source
(posix/relpath source target)
+Get the relative path between two subpaths.

path/posix/sep string source
Platform separator

path/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/sep string source
Platform separator
Community Examples

path/win32/abspath function source
(win32/abspath path)
+Get the relative path between two subpaths.

path/sep string source
Platform separator

path/win32/abspath function source
(win32/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/win32/abspath? function source
(win32/abspath? path)
+Coerce a path to be absolute.

path/win32/abspath? function source
(win32/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/win32/basename function source
(win32/basename path)
+Check if a path is absolute.

path/win32/basename function source
(win32/basename path)
 
-Gets the base file name of a path.
Community Examples

path/win32/delim string source
Platform delimiter
Community Examples

path/win32/dirname function source
(win32/dirname path)
+Gets the base file name of a path.

path/win32/delim string source
Platform delimiter

path/win32/dirname function source
(win32/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/win32/ext function source
(ext path)
+Gets the directory name of a path.

path/win32/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/win32/join function source
(win32/join & els)
+Get the file extension for a path.

path/win32/join function source
(win32/join & els)
 
-Join path elements together.
Community Examples

path/win32/normalize function source
(win32/normalize path)
+Join path elements together.

path/win32/normalize function source
(win32/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/win32/parts function source
(win32/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/win32/parts function source
(win32/parts path)
 
-Split a path into its parts.
Community Examples

path/win32/relpath function source
(win32/relpath source target)
+Split a path into its parts.

path/win32/relpath function source
(win32/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/win32/sep string source
Platform separator
Community Examples
+Get the relative path between two subpaths.

path/win32/sep string source
Platform separator
NetREPL Raw Terminal Functionality diff --git a/static/1.25.1/api/spork/rawterm.html b/static/1.25.1/api/spork/rawterm.html index b6cfc180..8b84bd11 100644 --- a/static/1.25.1/api/spork/rawterm.html +++ b/static/1.25.1/api/spork/rawterm.html @@ -109,25 +109,25 @@

Index

rawterm/begin rawterm/buffer-traverse rawterm/ctrl-z rawterm/end rawterm/getch rawterm/isatty rawterm/monowidth rawterm/rune-monowidth rawterm/size rawterm/slice-monowidth


rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
 
-Begin raw terminal functionality. Return a stream that can be read from to get input.
Community Examples

rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
+Begin raw terminal functionality. Return a stream that can be read from to get input.

rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
 
-Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.
Community Examples

rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
+Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.

rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
 
-A handler that a user can use to handle ctrl-z from input to suspend the current process.
Community Examples

rawterm/end cfunction source
(rawterm/end)
+A handler that a user can use to handle ctrl-z from input to suspend the current process.

rawterm/end cfunction source
(rawterm/end)
 
-End raw terminal functionality.
Community Examples

rawterm/getch cfunction source
(rawterm/getch &opt into)
+End raw terminal functionality.

rawterm/getch cfunction source
(rawterm/getch &opt into)
 
-Get a byte of input from stdin, without blocking if possible. Returns a buffer.
Community Examples

rawterm/isatty cfunction source
(rawterm/isatty)
+Get a byte of input from stdin, without blocking if possible. Returns a buffer.

rawterm/isatty cfunction source
(rawterm/isatty)
 
-Check if the current stdin is a tty.
Community Examples

rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
+Check if the current stdin is a tty.

rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
 
-Measure the monospace width of a string.
Community Examples

rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
+Measure the monospace width of a string.

rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
 
-Get the monospace width of a rune. Returns either 0, 1, or 2.
Community Examples

rawterm/size cfunction source
(rawterm/size)
+Get the monospace width of a rune. Returns either 0, 1, or 2.

rawterm/size cfunction source
(rawterm/size)
 
-Get the number of rows and columns visible in the terminal as tuple [rows cols]
Community Examples

rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
+Get the number of rows and columns visible in the terminal as tuple [rows cols]

rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
 
-Get a byte slice that will fit into a number of columns.
Community Examples
+Get a byte slice that will fit into a number of columns.
Path Utilities Regular Expression PEG Syntax diff --git a/static/1.25.1/api/spork/regex.html b/static/1.25.1/api/spork/regex.html index 4ed7bc03..15b1a87a 100644 --- a/static/1.25.1/api/spork/regex.html +++ b/static/1.25.1/api/spork/regex.html @@ -112,19 +112,19 @@

Index

regex/compile regex/find regex/find-all regex/match regex/peg regex/replace regex/replace-all regex/source


regex/compile function source
(compile pattern)
 
-Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.
Community Examples

regex/find function source
(find reg text &opt start)
+Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.

regex/find function source
(find reg text &opt start)
 
-Similar to peg/find, but for regexes.
Community Examples

regex/find-all function source
(find-all reg text &opt start)
+Similar to peg/find, but for regexes.

regex/find-all function source
(find-all reg text &opt start)
 
-Similar to peg/find-all, but for regexes.
Community Examples

regex/match function source
(match reg text &opt start)
+Similar to peg/find-all, but for regexes.

regex/match function source
(match reg text &opt start)
 
-Similar to peg/match, but for regexes.
Community Examples

regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.
Community Examples

regex/replace function source
(replace reg rep text &opt start)
+Similar to peg/match, but for regexes.

regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.

regex/replace function source
(replace reg rep text &opt start)
 
-Similar to peg/replace, but for regexes.
Community Examples

regex/replace-all function source
(replace-all reg rep text &opt start)
+Similar to peg/replace, but for regexes.

regex/replace-all function source
(replace-all reg rep text &opt start)
 
-Similar to peg/replace-all, but for regexes.
Community Examples

regex/source function source
(source pattern)
+Similar to peg/replace-all, but for regexes.

regex/source function source
(source pattern)
 
-Compile a subset of regex to PEG source code.
Community Examples
+Compile a subset of regex to PEG source code.
Raw Terminal Functionality Remote Procedure Calls diff --git a/static/1.25.1/api/spork/rpc.html b/static/1.25.1/api/spork/rpc.html index 4aeaaf3f..27ed4440 100644 --- a/static/1.25.1/api/spork/rpc.html +++ b/static/1.25.1/api/spork/rpc.html @@ -109,9 +109,9 @@

Index

rpc/client rpc/default-host rpc/default-port rpc/server


rpc/client function source
(client &opt host port name)
 
-Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.
Community Examples

rpc/default-host string source
Default host to run server on and connect to.
Community Examples

rpc/default-port string source
Default port to run the net repl.
Community Examples

rpc/server function source
(server functions &opt host port workers-per-connection)
+Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.

rpc/default-host string source
Default host to run server on and connect to.

rpc/default-port string source
Default port to run the net repl.

rpc/server function source
(server functions &opt host port workers-per-connection)
 
-Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Community Examples
+Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Regular Expression PEG Syntax Schema diff --git a/static/1.25.1/api/spork/schema.html b/static/1.25.1/api/spork/schema.html index bbe781a2..86ad5583 100644 --- a/static/1.25.1/api/spork/schema.html +++ b/static/1.25.1/api/spork/schema.html @@ -109,13 +109,13 @@

Index

schema/make-predicate schema/make-validator schema/predicate schema/validator


schema/make-predicate function source
(make-predicate schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `predicate`.
Community Examples

schema/make-validator function source
(make-validator schema)
+Generate a function that can be used to validate a data structure. This is the function form of `predicate`.

schema/make-validator function source
(make-validator schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `validator`.
Community Examples

schema/predicate macro source
(predicate pattern)
+Generate a function that can be used to validate a data structure. This is the function form of `validator`.

schema/predicate macro source
(predicate pattern)
 
-Make a validation predicate given a certain schema.
Community Examples

schema/validator macro source
(validator pattern)
+Make a validation predicate given a certain schema.

schema/validator macro source
(validator pattern)
 
-Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Community Examples
+Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Remote Procedure Calls Shell Utilities diff --git a/static/1.25.1/api/spork/tarray.html b/static/1.25.1/api/spork/tarray.html index 1f51354a..0d7a07c6 100644 --- a/static/1.25.1/api/spork/tarray.html +++ b/static/1.25.1/api/spork/tarray.html @@ -109,19 +109,19 @@

Index

tarray/buffer tarray/copy-bytes tarray/length tarray/new tarray/properties tarray/slice tarray/swap-bytes


tarray/buffer cfunction
(tarray/buffer array|size)
 
-Return typed array buffer or create a new buffer.
Community Examples

tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
+Return typed array buffer or create a new buffer.

tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
 
-Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.
Community Examples

tarray/length cfunction
(tarray/length array|buffer)
+Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.

tarray/length cfunction
(tarray/length array|buffer)
 
-Return typed array or buffer size.
Community Examples

tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
+Return typed array or buffer size.

tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
 
-Create new typed array.
Community Examples

tarray/properties cfunction
(tarray/properties array)
+Create new typed array.

tarray/properties cfunction
(tarray/properties array)
 
-Return typed array properties as a struct.
Community Examples

tarray/slice cfunction
(tarray/slice tarr &opt start end)
+Return typed array properties as a struct.

tarray/slice cfunction
(tarray/slice tarr &opt start end)
 
-Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.
Community Examples

tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
+Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.

tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
 
-Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Community Examples
+Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Test String Module diff --git a/static/1.25.1/api/spork/test.html b/static/1.25.1/api/spork/test.html index d179b888..2ebc3ae2 100644 --- a/static/1.25.1/api/spork/test.html +++ b/static/1.25.1/api/spork/test.html @@ -109,34 +109,34 @@

Index

test/assert test/assert-docs test/assert-error test/assert-no-error test/assert-not test/capture-stderr test/capture-stdout test/end-suite test/start-suite test/suppress-stderr test/suppress-stdout test/timeit


test/assert function source
(assert x &opt e)
 
-Override's the default assert with some nice error handling.
Community Examples

test/assert-docs function source
(assert-docs path)
+Override's the default assert with some nice error handling.

test/assert-docs function source
(assert-docs path)
 
 Assert that all symbols, when module on the path is required,
-have proper doc string
Community Examples

test/assert-error macro source
(assert-error msg & forms)
+have proper doc string

test/assert-error macro source
(assert-error msg & forms)
 
-Test passes if forms error.
Community Examples

test/assert-no-error macro source
(assert-no-error msg & forms)
+Test passes if forms error.

test/assert-no-error macro source
(assert-no-error msg & forms)
 
-Test passes if forms do not error.
Community Examples

test/assert-not function source
(assert-not x &opt e)
+Test passes if forms do not error.

test/assert-not function source
(assert-not x &opt e)
 
-Invert assert.
Community Examples

test/capture-stderr macro source
(capture-stderr & body)
+Invert assert.

test/capture-stderr macro source
(capture-stderr & body)
 
 Runs the form and captures stderr. Returns tuple with result of the form
-and a string with captured stderr.
Community Examples

test/capture-stdout macro source
(capture-stdout & body)
+and a string with captured stderr.

test/capture-stdout macro source
(capture-stdout & body)
 
 Runs the form and captures stdout. Returns tuple with result of the form
-and a string with captured stdout.
Community Examples

test/end-suite function source
(end-suite)
+and a string with captured stdout.

test/end-suite function source
(end-suite)
 
-Ends test suite.
Community Examples

test/start-suite function source
(start-suite &opt name)
+Ends test suite.

test/start-suite function source
(start-suite &opt name)
 
-Starts test suite.
Community Examples

test/suppress-stderr macro source
(suppress-stderr & body)
+Starts test suite.

test/suppress-stderr macro source
(suppress-stderr & body)
 
-Suppreses stdout from the body
Community Examples

test/suppress-stdout macro source
(suppress-stdout & body)
+Suppreses stdout from the body

test/suppress-stdout macro source
(suppress-stdout & body)
 
-Suppreses stdout from the body
Community Examples

test/timeit macro source
(timeit form &opt tag)
+Suppreses stdout from the body

test/timeit macro source
(timeit form &opt tag)
 
 Time the execution of `form` using `os/clock` before and after,
 and print the result to stdout. returns: result of executing `form`.
-Uses `tag` (default "Elapsed time:") to tag the printout.
Community Examples
+Uses `tag` (default "Elapsed time:") to tag the printout.
Simple Messaging Protocol Typed Arrays diff --git a/static/1.26.0/api/jpm/cc.html b/static/1.26.0/api/jpm/cc.html index 67c6d1fd..61a8c96b 100644 --- a/static/1.26.0/api/jpm/cc.html +++ b/static/1.26.0/api/jpm/cc.html @@ -112,35 +112,35 @@

Index

cc/archive-c cc/compile-c cc/create-buffer-c cc/create-buffer-c-impl cc/create-executable cc/embed-name cc/entry-name cc/entry-replace cc/link-c cc/make-bin-source cc/make-define cc/make-defines cc/modpath-to-meta cc/modpath-to-static cc/out-path


cc/archive-c function source
(archive-c opts target & objects)
 
-Link object files together to make a static library.
Community Examples

cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
+Link object files together to make a static library.

cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
 
-Compile a C file into an object file.
Community Examples

cc/create-buffer-c function source
(create-buffer-c source dest name)
+Compile a C file into an object file.

cc/create-buffer-c function source
(create-buffer-c source dest name)
 
-Inline raw byte file as a c file.
Community Examples

cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
+Inline raw byte file as a c file.

cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
 
-
Community Examples

cc/create-executable function source
(create-executable opts source dest no-core)
+

cc/create-executable function source
(create-executable opts source dest no-core)
 
-Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.
Community Examples

cc/embed-name function source
(embed-name path)
+Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.

cc/embed-name function source
(embed-name path)
 
-Rename a janet symbol for embedding.
Community Examples

cc/entry-name function source
(entry-name name)
+Rename a janet symbol for embedding.

cc/entry-name function source
(entry-name name)
 
-Name of symbol that enters static compilation of a module.
Community Examples

cc/entry-replace function source
(entry-replace name)
+Name of symbol that enters static compilation of a module.

cc/entry-replace function source
(entry-replace name)
 
-Escape special characters in the entry-name
Community Examples

cc/link-c function source
(link-c has-cpp opts target & objects)
+Escape special characters in the entry-name

cc/link-c function source
(link-c has-cpp opts target & objects)
 
-Link C or C++ object files together to make a native module.
Community Examples

cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
+Link C or C++ object files together to make a native module.

cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
 
-
Community Examples

cc/make-define function source
(make-define define value)
+

cc/make-define function source
(make-define define value)
 
-Generate strings for adding custom defines to the compiler.
Community Examples

cc/make-defines function source
(make-defines defines)
+Generate strings for adding custom defines to the compiler.

cc/make-defines function source
(make-defines defines)
 
-Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.
Community Examples

cc/modpath-to-meta function source
(modpath-to-meta path)
+Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.

cc/modpath-to-meta function source
(modpath-to-meta path)
 
-Get the meta file path (.meta.janet) corresponding to a native module path (.so).
Community Examples

cc/modpath-to-static function source
(modpath-to-static path)
+Get the meta file path (.meta.janet) corresponding to a native module path (.so).

cc/modpath-to-static function source
(modpath-to-static path)
 
-Get the static library (.a) path corresponding to a native module path (.so).
Community Examples

cc/out-path function source
(out-path path from-ext to-ext)
+Get the static library (.a) path corresponding to a native module path (.so).

cc/out-path function source
(out-path path from-ext to-ext)
 
-Take a source file path and convert it to an output path.
Community Examples
+Take a source file path and convert it to an output path.
Build Rules C Source Generation diff --git a/static/1.26.0/api/jpm/cgen.html b/static/1.26.0/api/jpm/cgen.html index c41f742b..9c92bf76 100644 --- a/static/1.26.0/api/jpm/cgen.html +++ b/static/1.26.0/api/jpm/cgen.html @@ -112,13 +112,13 @@

Index

cgen/add-loader cgen/ir cgen/mangle cgen/print-ir


cgen/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

cgen/ir macro source
(ir & body)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

cgen/ir macro source
(ir & body)
 
-Macro that automatically quotes the body provided and calls (print-ir ...) on the body.
Community Examples

cgen/mangle function source
(mangle token)
+Macro that automatically quotes the body provided and calls (print-ir ...) on the body.

cgen/mangle function source
(mangle token)
 
-Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.
Community Examples

cgen/print-ir function source
(print-ir ir)
+Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.

cgen/print-ir function source
(print-ir ir)
 
-Compile the CGEN IR to C and print it to (dyn :out).
Community Examples
+Compile the CGEN IR to C and print it to (dyn :out).
C Compiler Command Line Interface diff --git a/static/1.26.0/api/jpm/cli.html b/static/1.26.0/api/jpm/cli.html index 71a3ca46..0c0778e4 100644 --- a/static/1.26.0/api/jpm/cli.html +++ b/static/1.26.0/api/jpm/cli.html @@ -112,11 +112,11 @@

Index

cli/jpm cli/main cli/run cli/setup


cli/jpm macro source
(jpm & argv)
 
-A Macro User Interface for jpm to be used from a repl in a way similar to the command line.
Community Examples

cli/main function source
(main & argv)
+A Macro User Interface for jpm to be used from a repl in a way similar to the command line.

cli/main function source
(main & argv)
 
-Script entry.
Community Examples

cli/run function source
(run & args)
+Script entry.

cli/run function source
(run & args)
 
-Run CLI commands.
Community Examples

cli/setup function source
(setup args)
+Run CLI commands.

cli/setup function source
(setup args)
 
 Load configuration from the command line, environment variables, and
 configuration files. Returns array of non-configuration arguments as well.
@@ -124,7 +124,7 @@ 

Index 1. Commmand line settings 2. The value of `(dyn :jpm-config)` 3. Environment variables - 4. Config file settings (default-config if non specified)

Community Examples
+ 4. Config file settings (default-config if non specified)
C Source Generation Commands diff --git a/static/1.26.0/api/jpm/commands.html b/static/1.26.0/api/jpm/commands.html index 305afa59..93231f32 100644 --- a/static/1.26.0/api/jpm/commands.html +++ b/static/1.26.0/api/jpm/commands.html @@ -112,43 +112,43 @@

Index

commands/build commands/clean commands/configure commands/deps commands/enable-local-mode commands/help commands/install commands/jpm-debug-repl commands/list-installed commands/list-pkgs commands/list-rules commands/new-c-project commands/new-project commands/quickbin commands/set-tree commands/show-paths commands/show-rule-tree commands/test commands/update-pkgs


commands/build function source
(build)
 
-
Community Examples

commands/clean function source
(clean)
+

commands/clean function source
(clean)
 
-
Community Examples

commands/configure function source
(configure &opt path)
+

commands/configure function source
(configure &opt path)
 
-Setup an out-of-tree build with certain configuration options.
Community Examples

commands/deps function source
(deps)
+Setup an out-of-tree build with certain configuration options.

commands/deps function source
(deps)
 
-
Community Examples

commands/enable-local-mode function source
(enable-local-mode)
+

commands/enable-local-mode function source
(enable-local-mode)
 
-Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/
Community Examples

commands/help function source
(help)
+Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/

commands/help function source
(help)
 
-
Community Examples

commands/install function source
(install & repo)
+

commands/install function source
(install & repo)
 
-
Community Examples

commands/jpm-debug-repl function source
(jpm-debug-repl)
+

commands/jpm-debug-repl function source
(jpm-debug-repl)
 
-
Community Examples

commands/list-installed function source
(list-installed)
+

commands/list-installed function source
(list-installed)
 
-
Community Examples

commands/list-pkgs function source
(list-pkgs &opt search)
+

commands/list-pkgs function source
(list-pkgs &opt search)
 
-
Community Examples

commands/list-rules function source
(list-rules &opt ctx)
+

commands/list-rules function source
(list-rules &opt ctx)
 
-
Community Examples

commands/new-c-project function source
(new-c-project name)
+

commands/new-c-project function source
(new-c-project name)
 
-Create a new C project
Community Examples

commands/new-project function source
(new-project name)
+Create a new C project

commands/new-project function source
(new-project name)
 
-Create a new project
Community Examples

commands/quickbin function source
(quickbin input output)
+Create a new project

commands/quickbin function source
(quickbin input output)
 
-
Community Examples

commands/set-tree function source
(set-tree tree)
+

commands/set-tree function source
(set-tree tree)
 
-Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.
Community Examples

commands/show-paths function source
(show-paths)
+Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.

commands/show-paths function source
(show-paths)
 
-
Community Examples

commands/show-rule-tree function source
(show-rule-tree &opt root depth)
+

commands/show-rule-tree function source
(show-rule-tree &opt root depth)
 
-
Community Examples

commands/test function source
(test)
+

commands/test function source
(test)
 
-
Community Examples

commands/update-pkgs function source
(update-pkgs)
+

commands/update-pkgs function source
(update-pkgs)
 
-
Community Examples
+
Command Line Interface Config diff --git a/static/1.26.0/api/jpm/config.html b/static/1.26.0/api/jpm/config.html index 9f0f3cca..0191a97e 100644 --- a/static/1.26.0/api/jpm/config.html +++ b/static/1.26.0/api/jpm/config.html @@ -110,109 +110,109 @@

Config

Index

-

config/builtin-configs config/config-checkers config/config-docs config/config-options config/config-parsers config/config-set config/defconf config/dyn:ar config/dyn:auto-shebang config/dyn:binpath config/dyn:build-type config/dyn:buildpath config/dyn:c++ config/dyn:c++-link config/dyn:cc config/dyn:cc-link config/dyn:cflags config/dyn:cflags-verbose config/dyn:config-file config/dyn:cppflags config/dyn:curlpath config/dyn:dest-dir config/dyn:dynamic-cflags config/dyn:dynamic-lflags config/dyn:gitpath config/dyn:headerpath config/dyn:is-msvc config/dyn:janet config/dyn:janet-cflags config/dyn:janet-lflags config/dyn:ldflags config/dyn:lflags config/dyn:libpath config/dyn:local config/dyn:manpath config/dyn:modext config/dyn:modpath config/dyn:nocolor config/dyn:offline config/dyn:optimize config/dyn:pkglist config/dyn:silent config/dyn:statext config/dyn:tarpath config/dyn:test config/dyn:tree config/dyn:update-pkgs config/dyn:use-batch-shell config/dyn:verbose config/dyn:workers config/load-config config/load-config-file config/load-default config/load-options config/opt config/read-env-variables config/save-config config/shorthand-mapping


config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.
Community Examples

config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).
Community Examples

config/config-docs table source
Table of all of the help text for each config option.
Community Examples

config/config-options table source
A table of possible options for enum option types.
Community Examples

config/config-parsers table source
A table of all of the dynamic config bindings to parsers.
Community Examples

config/config-set table source
Listing of all config dyns.
Community Examples

config/defconf macro source
(defconf kw &opt parser docs options)
+

config/builtin-configs config/config-checkers config/config-docs config/config-options config/config-parsers config/config-set config/defconf config/dyn:ar config/dyn:auto-shebang config/dyn:binpath config/dyn:build-type config/dyn:buildpath config/dyn:c++ config/dyn:c++-link config/dyn:cc config/dyn:cc-link config/dyn:cflags config/dyn:cflags-verbose config/dyn:config-file config/dyn:cppflags config/dyn:curlpath config/dyn:dest-dir config/dyn:dynamic-cflags config/dyn:dynamic-lflags config/dyn:gitpath config/dyn:headerpath config/dyn:is-msvc config/dyn:janet config/dyn:janet-cflags config/dyn:janet-lflags config/dyn:ldflags config/dyn:lflags config/dyn:libpath config/dyn:local config/dyn:manpath config/dyn:modext config/dyn:modpath config/dyn:nocolor config/dyn:offline config/dyn:optimize config/dyn:pkglist config/dyn:silent config/dyn:statext config/dyn:tarpath config/dyn:test config/dyn:tree config/dyn:update-pkgs config/dyn:use-batch-shell config/dyn:verbose config/dyn:workers config/load-config config/load-config-file config/load-default config/load-options config/opt config/read-env-variables config/save-config config/shorthand-mapping


config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.

config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).

config/config-docs table source
Table of all of the help text for each config option.

config/config-options table source
A table of possible options for enum option types.

config/config-parsers table source
A table of all of the dynamic config bindings to parsers.

config/config-set table source
Listing of all config dyns.

config/defconf macro source
(defconf kw &opt parser docs options)
 
-Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.
Community Examples

config/dyn:ar function source
(dyn:ar &opt dflt)
+Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.

config/dyn:ar function source
(dyn:ar &opt dflt)
 
-
Community Examples

config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
+

config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
 
-
Community Examples

config/dyn:binpath function source
(dyn:binpath &opt dflt)
+

config/dyn:binpath function source
(dyn:binpath &opt dflt)
 
-
Community Examples

config/dyn:build-type function source
(dyn:build-type &opt dflt)
+

config/dyn:build-type function source
(dyn:build-type &opt dflt)
 
-
Community Examples

config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
+

config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
 
-
Community Examples

config/dyn:c++ function source
(dyn:c++ &opt dflt)
+

config/dyn:c++ function source
(dyn:c++ &opt dflt)
 
-
Community Examples

config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
+

config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
 
-
Community Examples

config/dyn:cc function source
(dyn:cc &opt dflt)
+

config/dyn:cc function source
(dyn:cc &opt dflt)
 
-
Community Examples

config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
+

config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
 
-
Community Examples

config/dyn:cflags function source
(dyn:cflags &opt dflt)
+

config/dyn:cflags function source
(dyn:cflags &opt dflt)
 
-
Community Examples

config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
+

config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
 
-
Community Examples

config/dyn:config-file function source
(dyn:config-file &opt dflt)
+

config/dyn:config-file function source
(dyn:config-file &opt dflt)
 
-
Community Examples

config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
+

config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
 
-
Community Examples

config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
+

config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
 
-
Community Examples

config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
+

config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
 
-
Community Examples

config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
+

config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
 
-
Community Examples

config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
+

config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
 
-
Community Examples

config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
+

config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
 
-
Community Examples

config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
+

config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
 
-
Community Examples

config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
+

config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
 
-
Community Examples

config/dyn:janet function source
(dyn:janet &opt dflt)
+

config/dyn:janet function source
(dyn:janet &opt dflt)
 
-
Community Examples

config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
+

config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
 
-
Community Examples

config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
+

config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
 
-
Community Examples

config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
+

config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
 
-
Community Examples

config/dyn:lflags function source
(dyn:lflags &opt dflt)
+

config/dyn:lflags function source
(dyn:lflags &opt dflt)
 
-
Community Examples

config/dyn:libpath function source
(dyn:libpath &opt dflt)
+

config/dyn:libpath function source
(dyn:libpath &opt dflt)
 
-
Community Examples

config/dyn:local function source
(dyn:local &opt dflt)
+

config/dyn:local function source
(dyn:local &opt dflt)
 
-
Community Examples

config/dyn:manpath function source
(dyn:manpath &opt dflt)
+

config/dyn:manpath function source
(dyn:manpath &opt dflt)
 
-
Community Examples

config/dyn:modext function source
(dyn:modext &opt dflt)
+

config/dyn:modext function source
(dyn:modext &opt dflt)
 
-
Community Examples

config/dyn:modpath function source
(dyn:modpath &opt dflt)
+

config/dyn:modpath function source
(dyn:modpath &opt dflt)
 
-
Community Examples

config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
+

config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
 
-
Community Examples

config/dyn:offline function source
(dyn:offline &opt dflt)
+

config/dyn:offline function source
(dyn:offline &opt dflt)
 
-
Community Examples

config/dyn:optimize function source
(dyn:optimize &opt dflt)
+

config/dyn:optimize function source
(dyn:optimize &opt dflt)
 
-
Community Examples

config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
+

config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
 
-
Community Examples

config/dyn:silent function source
(dyn:silent &opt dflt)
+

config/dyn:silent function source
(dyn:silent &opt dflt)
 
-
Community Examples

config/dyn:statext function source
(dyn:statext &opt dflt)
+

config/dyn:statext function source
(dyn:statext &opt dflt)
 
-
Community Examples

config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
+

config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
 
-
Community Examples

config/dyn:test function source
(dyn:test &opt dflt)
+

config/dyn:test function source
(dyn:test &opt dflt)
 
-
Community Examples

config/dyn:tree function source
(dyn:tree &opt dflt)
+

config/dyn:tree function source
(dyn:tree &opt dflt)
 
-
Community Examples

config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
+

config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
 
-
Community Examples

config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
+

config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
 
-
Community Examples

config/dyn:verbose function source
(dyn:verbose &opt dflt)
+

config/dyn:verbose function source
(dyn:verbose &opt dflt)
 
-
Community Examples

config/dyn:workers function source
(dyn:workers &opt dflt)
+

config/dyn:workers function source
(dyn:workers &opt dflt)
 
-
Community Examples

config/load-config function source
(load-config settings &opt override)
+

config/load-config function source
(load-config settings &opt override)
 
-Load a configuration from a table or struct.
Community Examples

config/load-config-file function source
(load-config-file path &opt override)
+Load a configuration from a table or struct.

config/load-config-file function source
(load-config-file path &opt override)
 
-Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.
Community Examples

config/load-default function source
(load-default &opt override)
+Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.

config/load-default function source
(load-default &opt override)
 
-Load the default configuration.
Community Examples

config/load-options function source
(load-options &opt path)
+Load the default configuration.

config/load-options function source
(load-options &opt path)
 
-Load a file that contains config options that can be set. If no such file exists, then do nothing.
Community Examples

config/opt function source
(opt opts key &opt dflt)
+Load a file that contains config options that can be set. If no such file exists, then do nothing.

config/opt function source
(opt opts key &opt dflt)
 
-Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.
Community Examples

config/read-env-variables function source
(read-env-variables)
+Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.

config/read-env-variables function source
(read-env-variables)
 
-Read environment variables that correspond to config variables into dyns.
Community Examples

config/save-config function source
(save-config path)
+Read environment variables that correspond to config variables into dyns.

config/save-config function source
(save-config path)
 
-Write the current configuration information to a file.
Community Examples

config/shorthand-mapping struct source
Map some single characters to long options.
Community Examples
+Write the current configuration information to a file.

config/shorthand-mapping struct source
Map some single characters to long options.
Commands Configuration Generation diff --git a/static/1.26.0/api/jpm/dagbuild.html b/static/1.26.0/api/jpm/dagbuild.html index 8b25c827..f8ab0bbe 100644 --- a/static/1.26.0/api/jpm/dagbuild.html +++ b/static/1.26.0/api/jpm/dagbuild.html @@ -112,9 +112,9 @@

Index

dagbuild/pdag dagbuild/pmap


dagbuild/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.
Community Examples

dagbuild/pmap function source
(pmap f data)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.

dagbuild/pmap function source
(pmap f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Community Examples
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Configuration Generation Project Management diff --git a/static/1.26.0/api/jpm/index.html b/static/1.26.0/api/jpm/index.html index b5bd95a6..653cac02 100644 --- a/static/1.26.0/api/jpm/index.html +++ b/static/1.26.0/api/jpm/index.html @@ -112,299 +112,299 @@

Index

jpm/cc/archive-c jpm/cc/compile-c jpm/cc/create-buffer-c jpm/cc/create-buffer-c-impl jpm/cc/create-executable jpm/cc/embed-name jpm/cc/entry-name jpm/cc/entry-replace jpm/cc/link-c jpm/cc/make-bin-source jpm/cc/make-define jpm/cc/make-defines jpm/cc/modpath-to-meta jpm/cc/modpath-to-static jpm/cc/out-path jpm/cgen/add-loader jpm/cgen/ir jpm/cgen/mangle jpm/cgen/print-ir jpm/commands/build jpm/commands/clean jpm/commands/configure jpm/commands/deps jpm/commands/enable-local-mode jpm/commands/help jpm/commands/install jpm/commands/jpm-debug-repl jpm/commands/list-installed jpm/commands/list-pkgs jpm/commands/list-rules jpm/commands/new-c-project jpm/commands/new-project jpm/commands/quickbin jpm/commands/set-tree jpm/commands/show-paths jpm/commands/show-rule-tree jpm/commands/test jpm/commands/update-pkgs jpm/config/builtin-configs jpm/config/config-checkers jpm/config/config-docs jpm/config/config-options jpm/config/config-parsers jpm/config/config-set jpm/config/defconf jpm/config/dyn:ar jpm/config/dyn:auto-shebang jpm/config/dyn:binpath jpm/config/dyn:build-type jpm/config/dyn:buildpath jpm/config/dyn:c++ jpm/config/dyn:c++-link jpm/config/dyn:cc jpm/config/dyn:cc-link jpm/config/dyn:cflags jpm/config/dyn:cflags-verbose jpm/config/dyn:config-file jpm/config/dyn:cppflags jpm/config/dyn:curlpath jpm/config/dyn:dest-dir jpm/config/dyn:dynamic-cflags jpm/config/dyn:dynamic-lflags jpm/config/dyn:gitpath jpm/config/dyn:headerpath jpm/config/dyn:is-msvc jpm/config/dyn:janet jpm/config/dyn:janet-cflags jpm/config/dyn:janet-lflags jpm/config/dyn:ldflags jpm/config/dyn:lflags jpm/config/dyn:libpath jpm/config/dyn:local jpm/config/dyn:manpath jpm/config/dyn:modext jpm/config/dyn:modpath jpm/config/dyn:nocolor jpm/config/dyn:offline jpm/config/dyn:optimize jpm/config/dyn:pkglist jpm/config/dyn:silent jpm/config/dyn:statext jpm/config/dyn:tarpath jpm/config/dyn:test jpm/config/dyn:tree jpm/config/dyn:update-pkgs jpm/config/dyn:use-batch-shell jpm/config/dyn:verbose jpm/config/dyn:workers jpm/config/load-config jpm/config/load-config-file jpm/config/load-default jpm/config/load-options jpm/config/opt jpm/config/read-env-variables jpm/config/save-config jpm/config/shorthand-mapping jpm/dagbuild/pdag jpm/dagbuild/pmap jpm/make-config/auto jpm/make-config/generate-config jpm/pm/bundle-install jpm/pm/curl jpm/pm/do-rule jpm/pm/download-bundle jpm/pm/download-git-bundle jpm/pm/download-tar-bundle jpm/pm/git jpm/pm/import-rules jpm/pm/load-lockfile jpm/pm/load-project-meta jpm/pm/make-jpm-env jpm/pm/make-lockfile jpm/pm/out-of-tree-config jpm/pm/post-deps jpm/pm/require-jpm jpm/pm/resolve-bundle jpm/pm/tar jpm/pm/update-git-bundle jpm/pm/update-installed jpm/rules/add-body jpm/rules/add-dep jpm/rules/add-input jpm/rules/add-output jpm/rules/add-thunk jpm/rules/build-rules jpm/rules/getrules jpm/rules/phony jpm/rules/rule jpm/rules/sh-phony jpm/rules/sh-rule jpm/rules/sh-task jpm/rules/task jpm/scaffold/scaffold-project jpm/shutil/abspath jpm/shutil/basename jpm/shutil/clear-cache jpm/shutil/clear-manifest jpm/shutil/clexe-shell jpm/shutil/copy jpm/shutil/copyfile jpm/shutil/create-dirs jpm/shutil/devnull jpm/shutil/dirname jpm/shutil/drop1-shell jpm/shutil/exec-slurp jpm/shutil/filepath-replace jpm/shutil/find-build-dir jpm/shutil/find-cache jpm/shutil/find-manifest jpm/shutil/find-manifest-dir jpm/shutil/is-win jpm/shutil/path-splitter jpm/shutil/rimraf jpm/shutil/rm jpm/shutil/shell


jpm/cc/archive-c function source
(archive-c opts target & objects)
 
-Link object files together to make a static library.
Community Examples

jpm/cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
+Link object files together to make a static library.

jpm/cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
 
-Compile a C file into an object file.
Community Examples

jpm/cc/create-buffer-c function source
(create-buffer-c source dest name)
+Compile a C file into an object file.

jpm/cc/create-buffer-c function source
(create-buffer-c source dest name)
 
-Inline raw byte file as a c file.
Community Examples

jpm/cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
+Inline raw byte file as a c file.

jpm/cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
 
-
Community Examples

jpm/cc/create-executable function source
(create-executable opts source dest no-core)
+

jpm/cc/create-executable function source
(create-executable opts source dest no-core)
 
-Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.
Community Examples

jpm/cc/embed-name function source
(embed-name path)
+Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.

jpm/cc/embed-name function source
(embed-name path)
 
-Rename a janet symbol for embedding.
Community Examples

jpm/cc/entry-name function source
(entry-name name)
+Rename a janet symbol for embedding.

jpm/cc/entry-name function source
(entry-name name)
 
-Name of symbol that enters static compilation of a module.
Community Examples

jpm/cc/entry-replace function source
(entry-replace name)
+Name of symbol that enters static compilation of a module.

jpm/cc/entry-replace function source
(entry-replace name)
 
-Escape special characters in the entry-name
Community Examples

jpm/cc/link-c function source
(link-c has-cpp opts target & objects)
+Escape special characters in the entry-name

jpm/cc/link-c function source
(link-c has-cpp opts target & objects)
 
-Link C or C++ object files together to make a native module.
Community Examples

jpm/cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
+Link C or C++ object files together to make a native module.

jpm/cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
 
-
Community Examples

jpm/cc/make-define function source
(make-define define value)
+

jpm/cc/make-define function source
(make-define define value)
 
-Generate strings for adding custom defines to the compiler.
Community Examples

jpm/cc/make-defines function source
(make-defines defines)
+Generate strings for adding custom defines to the compiler.

jpm/cc/make-defines function source
(make-defines defines)
 
-Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.
Community Examples

jpm/cc/modpath-to-meta function source
(modpath-to-meta path)
+Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.

jpm/cc/modpath-to-meta function source
(modpath-to-meta path)
 
-Get the meta file path (.meta.janet) corresponding to a native module path (.so).
Community Examples

jpm/cc/modpath-to-static function source
(modpath-to-static path)
+Get the meta file path (.meta.janet) corresponding to a native module path (.so).

jpm/cc/modpath-to-static function source
(modpath-to-static path)
 
-Get the static library (.a) path corresponding to a native module path (.so).
Community Examples

jpm/cc/out-path function source
(out-path path from-ext to-ext)
+Get the static library (.a) path corresponding to a native module path (.so).

jpm/cc/out-path function source
(out-path path from-ext to-ext)
 
-Take a source file path and convert it to an output path.
Community Examples

jpm/cgen/add-loader function source
(add-loader)
+Take a source file path and convert it to an output path.

jpm/cgen/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

jpm/cgen/ir macro source
(ir & body)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

jpm/cgen/ir macro source
(ir & body)
 
-Macro that automatically quotes the body provided and calls (print-ir ...) on the body.
Community Examples

jpm/cgen/mangle function source
(mangle token)
+Macro that automatically quotes the body provided and calls (print-ir ...) on the body.

jpm/cgen/mangle function source
(mangle token)
 
-Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.
Community Examples

jpm/cgen/print-ir function source
(print-ir ir)
+Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.

jpm/cgen/print-ir function source
(print-ir ir)
 
-Compile the CGEN IR to C and print it to (dyn :out).
Community Examples

jpm/commands/build function source
(build)
+Compile the CGEN IR to C and print it to (dyn :out).

jpm/commands/build function source
(build)
 
-
Community Examples

jpm/commands/clean function source
(clean)
+

jpm/commands/clean function source
(clean)
 
-
Community Examples

jpm/commands/configure function source
(configure &opt path)
+

jpm/commands/configure function source
(configure &opt path)
 
-Setup an out-of-tree build with certain configuration options.
Community Examples

jpm/commands/deps function source
(deps)
+Setup an out-of-tree build with certain configuration options.

jpm/commands/deps function source
(deps)
 
-
Community Examples

jpm/commands/enable-local-mode function source
(enable-local-mode)
+

jpm/commands/enable-local-mode function source
(enable-local-mode)
 
-Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/
Community Examples

jpm/commands/help function source
(help)
+Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/

jpm/commands/help function source
(help)
 
-
Community Examples

jpm/commands/install function source
(install & repo)
+

jpm/commands/install function source
(install & repo)
 
-
Community Examples

jpm/commands/jpm-debug-repl function source
(jpm-debug-repl)
+

jpm/commands/jpm-debug-repl function source
(jpm-debug-repl)
 
-
Community Examples

jpm/commands/list-installed function source
(list-installed)
+

jpm/commands/list-installed function source
(list-installed)
 
-
Community Examples

jpm/commands/list-pkgs function source
(list-pkgs &opt search)
+

jpm/commands/list-pkgs function source
(list-pkgs &opt search)
 
-
Community Examples

jpm/commands/list-rules function source
(list-rules &opt ctx)
+

jpm/commands/list-rules function source
(list-rules &opt ctx)
 
-
Community Examples

jpm/commands/new-c-project function source
(new-c-project name)
+

jpm/commands/new-c-project function source
(new-c-project name)
 
-Create a new C project
Community Examples

jpm/commands/new-project function source
(new-project name)
+Create a new C project

jpm/commands/new-project function source
(new-project name)
 
-Create a new project
Community Examples

jpm/commands/quickbin function source
(quickbin input output)
+Create a new project

jpm/commands/quickbin function source
(quickbin input output)
 
-
Community Examples

jpm/commands/set-tree function source
(set-tree tree)
+

jpm/commands/set-tree function source
(set-tree tree)
 
-Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.
Community Examples

jpm/commands/show-paths function source
(show-paths)
+Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.

jpm/commands/show-paths function source
(show-paths)
 
-
Community Examples

jpm/commands/show-rule-tree function source
(show-rule-tree &opt root depth)
+

jpm/commands/show-rule-tree function source
(show-rule-tree &opt root depth)
 
-
Community Examples

jpm/commands/test function source
(test)
+

jpm/commands/test function source
(test)
 
-
Community Examples

jpm/commands/update-pkgs function source
(update-pkgs)
+

jpm/commands/update-pkgs function source
(update-pkgs)
 
-
Community Examples

jpm/config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.
Community Examples

jpm/config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).
Community Examples

jpm/config/config-docs table source
Table of all of the help text for each config option.
Community Examples

jpm/config/config-options table source
A table of possible options for enum option types.
Community Examples

jpm/config/config-parsers table source
A table of all of the dynamic config bindings to parsers.
Community Examples

jpm/config/config-set table source
Listing of all config dyns.
Community Examples

jpm/config/defconf macro source
(defconf kw &opt parser docs options)
+

jpm/config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.

jpm/config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).

jpm/config/config-docs table source
Table of all of the help text for each config option.

jpm/config/config-options table source
A table of possible options for enum option types.

jpm/config/config-parsers table source
A table of all of the dynamic config bindings to parsers.

jpm/config/config-set table source
Listing of all config dyns.

jpm/config/defconf macro source
(defconf kw &opt parser docs options)
 
-Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.
Community Examples

jpm/config/dyn:ar function source
(dyn:ar &opt dflt)
+Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.

jpm/config/dyn:ar function source
(dyn:ar &opt dflt)
 
-
Community Examples

jpm/config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
+

jpm/config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
 
-
Community Examples

jpm/config/dyn:binpath function source
(dyn:binpath &opt dflt)
+

jpm/config/dyn:binpath function source
(dyn:binpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:build-type function source
(dyn:build-type &opt dflt)
+

jpm/config/dyn:build-type function source
(dyn:build-type &opt dflt)
 
-
Community Examples

jpm/config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
+

jpm/config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:c++ function source
(dyn:c++ &opt dflt)
+

jpm/config/dyn:c++ function source
(dyn:c++ &opt dflt)
 
-
Community Examples

jpm/config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
+

jpm/config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
 
-
Community Examples

jpm/config/dyn:cc function source
(dyn:cc &opt dflt)
+

jpm/config/dyn:cc function source
(dyn:cc &opt dflt)
 
-
Community Examples

jpm/config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
+

jpm/config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
 
-
Community Examples

jpm/config/dyn:cflags function source
(dyn:cflags &opt dflt)
+

jpm/config/dyn:cflags function source
(dyn:cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
+

jpm/config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
 
-
Community Examples

jpm/config/dyn:config-file function source
(dyn:config-file &opt dflt)
+

jpm/config/dyn:config-file function source
(dyn:config-file &opt dflt)
 
-
Community Examples

jpm/config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
+

jpm/config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
+

jpm/config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
+

jpm/config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
 
-
Community Examples

jpm/config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
+

jpm/config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
+

jpm/config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
+

jpm/config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
+

jpm/config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
+

jpm/config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet function source
(dyn:janet &opt dflt)
+

jpm/config/dyn:janet function source
(dyn:janet &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
+

jpm/config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
+

jpm/config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
+

jpm/config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:lflags function source
(dyn:lflags &opt dflt)
+

jpm/config/dyn:lflags function source
(dyn:lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:libpath function source
(dyn:libpath &opt dflt)
+

jpm/config/dyn:libpath function source
(dyn:libpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:local function source
(dyn:local &opt dflt)
+

jpm/config/dyn:local function source
(dyn:local &opt dflt)
 
-
Community Examples

jpm/config/dyn:manpath function source
(dyn:manpath &opt dflt)
+

jpm/config/dyn:manpath function source
(dyn:manpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:modext function source
(dyn:modext &opt dflt)
+

jpm/config/dyn:modext function source
(dyn:modext &opt dflt)
 
-
Community Examples

jpm/config/dyn:modpath function source
(dyn:modpath &opt dflt)
+

jpm/config/dyn:modpath function source
(dyn:modpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
+

jpm/config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
 
-
Community Examples

jpm/config/dyn:offline function source
(dyn:offline &opt dflt)
+

jpm/config/dyn:offline function source
(dyn:offline &opt dflt)
 
-
Community Examples

jpm/config/dyn:optimize function source
(dyn:optimize &opt dflt)
+

jpm/config/dyn:optimize function source
(dyn:optimize &opt dflt)
 
-
Community Examples

jpm/config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
+

jpm/config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
 
-
Community Examples

jpm/config/dyn:silent function source
(dyn:silent &opt dflt)
+

jpm/config/dyn:silent function source
(dyn:silent &opt dflt)
 
-
Community Examples

jpm/config/dyn:statext function source
(dyn:statext &opt dflt)
+

jpm/config/dyn:statext function source
(dyn:statext &opt dflt)
 
-
Community Examples

jpm/config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
+

jpm/config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:test function source
(dyn:test &opt dflt)
+

jpm/config/dyn:test function source
(dyn:test &opt dflt)
 
-
Community Examples

jpm/config/dyn:tree function source
(dyn:tree &opt dflt)
+

jpm/config/dyn:tree function source
(dyn:tree &opt dflt)
 
-
Community Examples

jpm/config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
+

jpm/config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
 
-
Community Examples

jpm/config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
+

jpm/config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
 
-
Community Examples

jpm/config/dyn:verbose function source
(dyn:verbose &opt dflt)
+

jpm/config/dyn:verbose function source
(dyn:verbose &opt dflt)
 
-
Community Examples

jpm/config/dyn:workers function source
(dyn:workers &opt dflt)
+

jpm/config/dyn:workers function source
(dyn:workers &opt dflt)
 
-
Community Examples

jpm/config/load-config function source
(load-config settings &opt override)
+

jpm/config/load-config function source
(load-config settings &opt override)
 
-Load a configuration from a table or struct.
Community Examples

jpm/config/load-config-file function source
(load-config-file path &opt override)
+Load a configuration from a table or struct.

jpm/config/load-config-file function source
(load-config-file path &opt override)
 
-Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.
Community Examples

jpm/config/load-default function source
(load-default &opt override)
+Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.

jpm/config/load-default function source
(load-default &opt override)
 
-Load the default configuration.
Community Examples

jpm/config/load-options function source
(load-options &opt path)
+Load the default configuration.

jpm/config/load-options function source
(load-options &opt path)
 
-Load a file that contains config options that can be set. If no such file exists, then do nothing.
Community Examples

jpm/config/opt function source
(opt opts key &opt dflt)
+Load a file that contains config options that can be set. If no such file exists, then do nothing.

jpm/config/opt function source
(opt opts key &opt dflt)
 
-Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.
Community Examples

jpm/config/read-env-variables function source
(read-env-variables)
+Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.

jpm/config/read-env-variables function source
(read-env-variables)
 
-Read environment variables that correspond to config variables into dyns.
Community Examples

jpm/config/save-config function source
(save-config path)
+Read environment variables that correspond to config variables into dyns.

jpm/config/save-config function source
(save-config path)
 
-Write the current configuration information to a file.
Community Examples

jpm/config/shorthand-mapping struct source
Map some single characters to long options.
Community Examples

jpm/dagbuild/pdag function source
(pdag f dag &opt n-workers)
+Write the current configuration information to a file.

jpm/config/shorthand-mapping struct source
Map some single characters to long options.

jpm/dagbuild/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.
Community Examples

jpm/dagbuild/pmap function source
(pmap f data)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.

jpm/dagbuild/pmap function source
(pmap f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Community Examples

jpm/make-config/auto function source
(auto)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.

jpm/make-config/auto function source
(auto)
 
-Get an autodetected config.
Community Examples

jpm/make-config/generate-config function source
(generate-config &opt destdir silent as-data)
+Get an autodetected config.

jpm/make-config/generate-config function source
(generate-config &opt destdir silent as-data)
 
-Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Community Examples

jpm/pm/bundle-install function source
(bundle-install bundle &opt no-deps)
+Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.

jpm/pm/bundle-install function source
(bundle-install bundle &opt no-deps)
 
-Install a bundle from a git repository.
Community Examples

jpm/pm/curl function source
(curl & args)
+Install a bundle from a git repository.

jpm/pm/curl function source
(curl & args)
 
-Make a call to curl
Community Examples

jpm/pm/do-rule function source
(do-rule target)
+Make a call to curl

jpm/pm/do-rule function source
(do-rule target)
 
-Evaluate a given rule in a one-off manner.
Community Examples

jpm/pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
+Evaluate a given rule in a one-off manner.

jpm/pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
 
-Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.
Community Examples

jpm/pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
+Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.

jpm/pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
 
-Download a git bundle from a remote respository
Community Examples

jpm/pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
+Download a git bundle from a remote respository

jpm/pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
 
-Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.
Community Examples

jpm/pm/git function source
(git & args)
+Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.

jpm/pm/git function source
(git & args)
 
-Make a call to git.
Community Examples

jpm/pm/import-rules function source
(import-rules path &opt base-env)
+Make a call to git.

jpm/pm/import-rules function source
(import-rules path &opt base-env)
 
-Import another file that defines more rules. This ruleset is merged into the current ruleset.
Community Examples

jpm/pm/load-lockfile function source
(load-lockfile &opt filename)
+Import another file that defines more rules. This ruleset is merged into the current ruleset.

jpm/pm/load-lockfile function source
(load-lockfile &opt filename)
 
-Load packages from a lockfile.
Community Examples

jpm/pm/load-project-meta function source
(load-project-meta &opt path)
+Load packages from a lockfile.

jpm/pm/load-project-meta function source
(load-project-meta &opt path)
 
-Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.
Community Examples

jpm/pm/make-jpm-env function source
(make-jpm-env &opt base-env)
+Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.

jpm/pm/make-jpm-env function source
(make-jpm-env &opt base-env)
 
-Create an environment that is preloaded with jpm symbols.
Community Examples

jpm/pm/make-lockfile function source
(make-lockfile &opt filename)
+Create an environment that is preloaded with jpm symbols.

jpm/pm/make-lockfile function source
(make-lockfile &opt filename)
 
-
Community Examples

jpm/pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
+

jpm/pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
 
-Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.
Community Examples

jpm/pm/post-deps macro source
(post-deps & body)
+Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.

jpm/pm/post-deps macro source
(post-deps & body)
 
-Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.
Community Examples

jpm/pm/require-jpm function source
(require-jpm path &opt base-env)
+Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.

jpm/pm/require-jpm function source
(require-jpm path &opt base-env)
 
-Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.
Community Examples

jpm/pm/resolve-bundle function source
(resolve-bundle bundle)
+Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.

jpm/pm/resolve-bundle function source
(resolve-bundle bundle)
 
-Convert any bundle string/table to the normalized table form.
Community Examples

jpm/pm/tar function source
(tar & args)
+Convert any bundle string/table to the normalized table form.

jpm/pm/tar function source
(tar & args)
 
-Make a call to tar.
Community Examples

jpm/pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
+Make a call to tar.

jpm/pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
 
-Fetch latest tag version from remote repository
Community Examples

jpm/pm/update-installed function source
(update-installed)
+Fetch latest tag version from remote repository

jpm/pm/update-installed function source
(update-installed)
 
-Update all previously installed packages to their latest versions.
Community Examples

jpm/rules/add-body macro source
(add-body target & body)
+Update all previously installed packages to their latest versions.

jpm/rules/add-body macro source
(add-body target & body)
 
-Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.
Community Examples

jpm/rules/add-dep function source
(add-dep target dep)
+Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.

jpm/rules/add-dep function source
(add-dep target dep)
 
-Alias for `add-input`
Community Examples

jpm/rules/add-input function source
(add-input target input)
+Alias for `add-input`

jpm/rules/add-input function source
(add-input target input)
 
-Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.
Community Examples

jpm/rules/add-output function source
(add-output target output)
+Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.

jpm/rules/add-output function source
(add-output target output)
 
-Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.
Community Examples

jpm/rules/add-thunk function source
(add-thunk target thunk)
+Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.

jpm/rules/add-thunk function source
(add-thunk target thunk)
 
-Append a thunk to a target's recipe.
Community Examples

jpm/rules/build-rules function source
(build-rules rules targets &opt n-workers)
+Append a thunk to a target's recipe.

jpm/rules/build-rules function source
(build-rules rules targets &opt n-workers)
 
-Given a graph of all rules, extract a work graph that will build out-of-date files.
Community Examples

jpm/rules/getrules function source
(getrules)
+Given a graph of all rules, extract a work graph that will build out-of-date files.

jpm/rules/getrules function source
(getrules)
 
-
Community Examples

jpm/rules/phony macro source
(phony target deps & body)
+

jpm/rules/phony macro source
(phony target deps & body)
 
-Alias for `task`.
Community Examples

jpm/rules/rule macro source
(rule target deps & body)
+Alias for `task`.

jpm/rules/rule macro source
(rule target deps & body)
 
-Add a rule to the rule graph.
Community Examples

jpm/rules/sh-phony macro source
(sh-phony target deps & body)
+Add a rule to the rule graph.

jpm/rules/sh-phony macro source
(sh-phony target deps & body)
 
-Alias for `sh-task`.
Community Examples

jpm/rules/sh-rule macro source
(sh-rule target deps & body)
+Alias for `sh-task`.

jpm/rules/sh-rule macro source
(sh-rule target deps & body)
 
-Add a rule that invokes a shell command, and fails if the command returns non-zero.
Community Examples

jpm/rules/sh-task macro source
(sh-task target deps & body)
+Add a rule that invokes a shell command, and fails if the command returns non-zero.

jpm/rules/sh-task macro source
(sh-task target deps & body)
 
-Add a task that invokes a shell command, and fails if the command returns non-zero.
Community Examples

jpm/rules/task macro source
(task target deps & body)
+Add a task that invokes a shell command, and fails if the command returns non-zero.

jpm/rules/task macro source
(task target deps & body)
 
-Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
Community Examples

jpm/scaffold/scaffold-project function source
(scaffold-project name &opt options)
+Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).

jpm/scaffold/scaffold-project function source
(scaffold-project name &opt options)
 
-Generate a standardized project scaffold.
Community Examples

jpm/shutil/abspath function source
(abspath path)
+Generate a standardized project scaffold.

jpm/shutil/abspath function source
(abspath path)
 
-Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).
Community Examples

jpm/shutil/basename function source
(basename path)
+Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).

jpm/shutil/basename function source
(basename path)
 
-Get the filename of a path without any leading directory components.
Community Examples

jpm/shutil/clear-cache function source
(clear-cache)
+Get the filename of a path without any leading directory components.

jpm/shutil/clear-cache function source
(clear-cache)
 
-Clear the global git cache.
Community Examples

jpm/shutil/clear-manifest function source
(clear-manifest)
+Clear the global git cache.

jpm/shutil/clear-manifest function source
(clear-manifest)
 
-Clear the global installation manifest.
Community Examples

jpm/shutil/clexe-shell function source
(clexe-shell & args)
+Clear the global installation manifest.

jpm/shutil/clexe-shell function source
(clexe-shell & args)
 
-
Community Examples

jpm/shutil/copy function source
(copy src dest)
+

jpm/shutil/copy function source
(copy src dest)
 
-Copy a file or directory recursively from one location to another.
Community Examples

jpm/shutil/copyfile function source
(copyfile src dest)
+Copy a file or directory recursively from one location to another.

jpm/shutil/copyfile function source
(copyfile src dest)
 
-Copy a file one location to another.
Community Examples

jpm/shutil/create-dirs function source
(create-dirs dest)
+Copy a file one location to another.

jpm/shutil/create-dirs function source
(create-dirs dest)
 
-Create all directories needed for a file (mkdir -p).
Community Examples

jpm/shutil/devnull function source
(devnull)
+Create all directories needed for a file (mkdir -p).

jpm/shutil/devnull function source
(devnull)
 
-
Community Examples

jpm/shutil/dirname function source
(dirname path)
+

jpm/shutil/dirname function source
(dirname path)
 
-Get the directory of a file without the filename.
Community Examples

jpm/shutil/drop1-shell function source
(drop1-shell std args)
+Get the directory of a file without the filename.

jpm/shutil/drop1-shell function source
(drop1-shell std args)
 
-Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.
Community Examples

jpm/shutil/exec-slurp function source
(exec-slurp & args)
+Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.

jpm/shutil/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

jpm/shutil/filepath-replace function source
(filepath-replace repo)
+Read stdout of subprocess and return it trimmed in a string.

jpm/shutil/filepath-replace function source
(filepath-replace repo)
 
-Remove special characters from a string or path to make it into a path segment.
Community Examples

jpm/shutil/find-build-dir function source
(find-build-dir)
+Remove special characters from a string or path to make it into a path segment.

jpm/shutil/find-build-dir function source
(find-build-dir)
 
-Gets the build directory to output files to.
Community Examples

jpm/shutil/find-cache function source
(find-cache)
+Gets the build directory to output files to.

jpm/shutil/find-cache function source
(find-cache)
 
-Return the path to the global cache.
Community Examples

jpm/shutil/find-manifest function source
(find-manifest name)
+Return the path to the global cache.

jpm/shutil/find-manifest function source
(find-manifest name)
 
-Get the full path of a manifest file given a package name.
Community Examples

jpm/shutil/find-manifest-dir function source
(find-manifest-dir)
+Get the full path of a manifest file given a package name.

jpm/shutil/find-manifest-dir function source
(find-manifest-dir)
 
-Get the path to the directory containing manifests for installed packages.
Community Examples

jpm/shutil/is-win function source
(is-win)
+Get the path to the directory containing manifests for installed packages.

jpm/shutil/is-win function source
(is-win)
 
-Check if we should assume a DOS-like shell or default to posix shell.
Community Examples

jpm/shutil/path-splitter core/peg source
split paths on / and \.
Community Examples

jpm/shutil/rimraf function source
(rimraf path)
+Check if we should assume a DOS-like shell or default to posix shell.

jpm/shutil/path-splitter core/peg source
split paths on / and \.

jpm/shutil/rimraf function source
(rimraf path)
 
-Hard delete directory tree
Community Examples

jpm/shutil/rm function source
(rm path)
+Hard delete directory tree

jpm/shutil/rm function source
(rm path)
 
-Remove a directory and all sub directories.
Community Examples

jpm/shutil/shell function source
(shell & args)
+Remove a directory and all sub directories.

jpm/shutil/shell function source
(shell & args)
 
-Do a shell command
Community Examples
+Do a shell command
Integer Types Module Build Rules diff --git a/static/1.26.0/api/jpm/make-config.html b/static/1.26.0/api/jpm/make-config.html index a43e134c..f2fa337a 100644 --- a/static/1.26.0/api/jpm/make-config.html +++ b/static/1.26.0/api/jpm/make-config.html @@ -112,9 +112,9 @@

Index

make-config/auto make-config/generate-config


make-config/auto function source
(auto)
 
-Get an autodetected config.
Community Examples

make-config/generate-config function source
(generate-config &opt destdir silent as-data)
+Get an autodetected config.

make-config/generate-config function source
(generate-config &opt destdir silent as-data)
 
-Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Community Examples
+Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Config DAG Build diff --git a/static/1.26.0/api/jpm/pm.html b/static/1.26.0/api/jpm/pm.html index fb7f7e7e..16c7c3c0 100644 --- a/static/1.26.0/api/jpm/pm.html +++ b/static/1.26.0/api/jpm/pm.html @@ -112,43 +112,43 @@

Index

pm/bundle-install pm/curl pm/do-rule pm/download-bundle pm/download-git-bundle pm/download-tar-bundle pm/git pm/import-rules pm/load-lockfile pm/load-project-meta pm/make-jpm-env pm/make-lockfile pm/out-of-tree-config pm/post-deps pm/require-jpm pm/resolve-bundle pm/tar pm/update-git-bundle pm/update-installed


pm/bundle-install function source
(bundle-install bundle &opt no-deps)
 
-Install a bundle from a git repository.
Community Examples

pm/curl function source
(curl & args)
+Install a bundle from a git repository.

pm/curl function source
(curl & args)
 
-Make a call to curl
Community Examples

pm/do-rule function source
(do-rule target)
+Make a call to curl

pm/do-rule function source
(do-rule target)
 
-Evaluate a given rule in a one-off manner.
Community Examples

pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
+Evaluate a given rule in a one-off manner.

pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
 
-Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.
Community Examples

pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
+Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.

pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
 
-Download a git bundle from a remote respository
Community Examples

pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
+Download a git bundle from a remote respository

pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
 
-Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.
Community Examples

pm/git function source
(git & args)
+Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.

pm/git function source
(git & args)
 
-Make a call to git.
Community Examples

pm/import-rules function source
(import-rules path &opt base-env)
+Make a call to git.

pm/import-rules function source
(import-rules path &opt base-env)
 
-Import another file that defines more rules. This ruleset is merged into the current ruleset.
Community Examples

pm/load-lockfile function source
(load-lockfile &opt filename)
+Import another file that defines more rules. This ruleset is merged into the current ruleset.

pm/load-lockfile function source
(load-lockfile &opt filename)
 
-Load packages from a lockfile.
Community Examples

pm/load-project-meta function source
(load-project-meta &opt path)
+Load packages from a lockfile.

pm/load-project-meta function source
(load-project-meta &opt path)
 
-Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.
Community Examples

pm/make-jpm-env function source
(make-jpm-env &opt base-env)
+Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.

pm/make-jpm-env function source
(make-jpm-env &opt base-env)
 
-Create an environment that is preloaded with jpm symbols.
Community Examples

pm/make-lockfile function source
(make-lockfile &opt filename)
+Create an environment that is preloaded with jpm symbols.

pm/make-lockfile function source
(make-lockfile &opt filename)
 
-
Community Examples

pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
+

pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
 
-Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.
Community Examples

pm/post-deps macro source
(post-deps & body)
+Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.

pm/post-deps macro source
(post-deps & body)
 
-Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.
Community Examples

pm/require-jpm function source
(require-jpm path &opt base-env)
+Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.

pm/require-jpm function source
(require-jpm path &opt base-env)
 
-Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.
Community Examples

pm/resolve-bundle function source
(resolve-bundle bundle)
+Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.

pm/resolve-bundle function source
(resolve-bundle bundle)
 
-Convert any bundle string/table to the normalized table form.
Community Examples

pm/tar function source
(tar & args)
+Convert any bundle string/table to the normalized table form.

pm/tar function source
(tar & args)
 
-Make a call to tar.
Community Examples

pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
+Make a call to tar.

pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
 
-Fetch latest tag version from remote repository
Community Examples

pm/update-installed function source
(update-installed)
+Fetch latest tag version from remote repository

pm/update-installed function source
(update-installed)
 
-Update all previously installed packages to their latest versions.
Community Examples
+Update all previously installed packages to their latest versions.
DAG Build Project Scaffolding diff --git a/static/1.26.0/api/jpm/rules.html b/static/1.26.0/api/jpm/rules.html index b2f0c470..41c45b49 100644 --- a/static/1.26.0/api/jpm/rules.html +++ b/static/1.26.0/api/jpm/rules.html @@ -112,31 +112,31 @@

Index

rules/add-body rules/add-dep rules/add-input rules/add-output rules/add-thunk rules/build-rules rules/getrules rules/phony rules/rule rules/sh-phony rules/sh-rule rules/sh-task rules/task


rules/add-body macro source
(add-body target & body)
 
-Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.
Community Examples

rules/add-dep function source
(add-dep target dep)
+Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.

rules/add-dep function source
(add-dep target dep)
 
-Alias for `add-input`
Community Examples

rules/add-input function source
(add-input target input)
+Alias for `add-input`

rules/add-input function source
(add-input target input)
 
-Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.
Community Examples

rules/add-output function source
(add-output target output)
+Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.

rules/add-output function source
(add-output target output)
 
-Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.
Community Examples

rules/add-thunk function source
(add-thunk target thunk)
+Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.

rules/add-thunk function source
(add-thunk target thunk)
 
-Append a thunk to a target's recipe.
Community Examples

rules/build-rules function source
(build-rules rules targets &opt n-workers)
+Append a thunk to a target's recipe.

rules/build-rules function source
(build-rules rules targets &opt n-workers)
 
-Given a graph of all rules, extract a work graph that will build out-of-date files.
Community Examples

rules/getrules function source
(getrules)
+Given a graph of all rules, extract a work graph that will build out-of-date files.

rules/getrules function source
(getrules)
 
-
Community Examples

rules/phony macro source
(phony target deps & body)
+

rules/phony macro source
(phony target deps & body)
 
-Alias for `task`.
Community Examples

rules/rule macro source
(rule target deps & body)
+Alias for `task`.

rules/rule macro source
(rule target deps & body)
 
-Add a rule to the rule graph.
Community Examples

rules/sh-phony macro source
(sh-phony target deps & body)
+Add a rule to the rule graph.

rules/sh-phony macro source
(sh-phony target deps & body)
 
-Alias for `sh-task`.
Community Examples

rules/sh-rule macro source
(sh-rule target deps & body)
+Alias for `sh-task`.

rules/sh-rule macro source
(sh-rule target deps & body)
 
-Add a rule that invokes a shell command, and fails if the command returns non-zero.
Community Examples

rules/sh-task macro source
(sh-task target deps & body)
+Add a rule that invokes a shell command, and fails if the command returns non-zero.

rules/sh-task macro source
(sh-task target deps & body)
 
-Add a task that invokes a shell command, and fails if the command returns non-zero.
Community Examples

rules/task macro source
(task target deps & body)
+Add a task that invokes a shell command, and fails if the command returns non-zero.

rules/task macro source
(task target deps & body)
 
-Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
Community Examples
+Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
JPM C Compiler diff --git a/static/1.26.0/api/jpm/scaffold.html b/static/1.26.0/api/jpm/scaffold.html index 03172416..52bc87c7 100644 --- a/static/1.26.0/api/jpm/scaffold.html +++ b/static/1.26.0/api/jpm/scaffold.html @@ -112,7 +112,7 @@

Index

scaffold/scaffold-project


scaffold/scaffold-project function source
(scaffold-project name &opt options)
 
-Generate a standardized project scaffold.
Community Examples
+Generate a standardized project scaffold.
Project Management Shell Utilities diff --git a/static/1.26.0/api/jpm/shutil.html b/static/1.26.0/api/jpm/shutil.html index 07d7c09c..f7f75ef4 100644 --- a/static/1.26.0/api/jpm/shutil.html +++ b/static/1.26.0/api/jpm/shutil.html @@ -112,47 +112,47 @@

Index

shutil/abspath shutil/basename shutil/clear-cache shutil/clear-manifest shutil/clexe-shell shutil/copy shutil/copyfile shutil/create-dirs shutil/devnull shutil/dirname shutil/drop1-shell shutil/exec-slurp shutil/filepath-replace shutil/find-build-dir shutil/find-cache shutil/find-manifest shutil/find-manifest-dir shutil/is-win shutil/path-splitter shutil/rimraf shutil/rm shutil/shell


shutil/abspath function source
(abspath path)
 
-Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).
Community Examples

shutil/basename function source
(basename path)
+Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).

shutil/basename function source
(basename path)
 
-Get the filename of a path without any leading directory components.
Community Examples

shutil/clear-cache function source
(clear-cache)
+Get the filename of a path without any leading directory components.

shutil/clear-cache function source
(clear-cache)
 
-Clear the global git cache.
Community Examples

shutil/clear-manifest function source
(clear-manifest)
+Clear the global git cache.

shutil/clear-manifest function source
(clear-manifest)
 
-Clear the global installation manifest.
Community Examples

shutil/clexe-shell function source
(clexe-shell & args)
+Clear the global installation manifest.

shutil/clexe-shell function source
(clexe-shell & args)
 
-
Community Examples

shutil/copy function source
(copy src dest)
+

shutil/copy function source
(copy src dest)
 
-Copy a file or directory recursively from one location to another.
Community Examples

shutil/copyfile function source
(copyfile src dest)
+Copy a file or directory recursively from one location to another.

shutil/copyfile function source
(copyfile src dest)
 
-Copy a file one location to another.
Community Examples

shutil/create-dirs function source
(create-dirs dest)
+Copy a file one location to another.

shutil/create-dirs function source
(create-dirs dest)
 
-Create all directories needed for a file (mkdir -p).
Community Examples

shutil/devnull function source
(devnull)
+Create all directories needed for a file (mkdir -p).

shutil/devnull function source
(devnull)
 
-
Community Examples

shutil/dirname function source
(dirname path)
+

shutil/dirname function source
(dirname path)
 
-Get the directory of a file without the filename.
Community Examples

shutil/drop1-shell function source
(drop1-shell std args)
+Get the directory of a file without the filename.

shutil/drop1-shell function source
(drop1-shell std args)
 
-Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.
Community Examples

shutil/exec-slurp function source
(exec-slurp & args)
+Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.

shutil/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

shutil/filepath-replace function source
(filepath-replace repo)
+Read stdout of subprocess and return it trimmed in a string.

shutil/filepath-replace function source
(filepath-replace repo)
 
-Remove special characters from a string or path to make it into a path segment.
Community Examples

shutil/find-build-dir function source
(find-build-dir)
+Remove special characters from a string or path to make it into a path segment.

shutil/find-build-dir function source
(find-build-dir)
 
-Gets the build directory to output files to.
Community Examples

shutil/find-cache function source
(find-cache)
+Gets the build directory to output files to.

shutil/find-cache function source
(find-cache)
 
-Return the path to the global cache.
Community Examples

shutil/find-manifest function source
(find-manifest name)
+Return the path to the global cache.

shutil/find-manifest function source
(find-manifest name)
 
-Get the full path of a manifest file given a package name.
Community Examples

shutil/find-manifest-dir function source
(find-manifest-dir)
+Get the full path of a manifest file given a package name.

shutil/find-manifest-dir function source
(find-manifest-dir)
 
-Get the path to the directory containing manifests for installed packages.
Community Examples

shutil/is-win function source
(is-win)
+Get the path to the directory containing manifests for installed packages.

shutil/is-win function source
(is-win)
 
-Check if we should assume a DOS-like shell or default to posix shell.
Community Examples

shutil/path-splitter core/peg source
split paths on / and \.
Community Examples

shutil/rimraf function source
(rimraf path)
+Check if we should assume a DOS-like shell or default to posix shell.

shutil/path-splitter core/peg source
split paths on / and \.

shutil/rimraf function source
(rimraf path)
 
-Hard delete directory tree
Community Examples

shutil/rm function source
(rm path)
+Hard delete directory tree

shutil/rm function source
(rm path)
 
-Remove a directory and all sub directories.
Community Examples

shutil/shell function source
(shell & args)
+Remove a directory and all sub directories.

shutil/shell function source
(shell & args)
 
-Do a shell command
Community Examples
+Do a shell command
Project Scaffolding Math Module diff --git a/static/1.26.0/api/spork/argparse.html b/static/1.26.0/api/spork/argparse.html index 059cbebd..e8394dca 100644 --- a/static/1.26.0/api/spork/argparse.html +++ b/static/1.26.0/api/spork/argparse.html @@ -142,7 +142,7 @@

Index Once parsed, values are accessible in the returned table by the name of the option. For example `(result "verbose")` will check if the verbose -flag is enabled.Community Examples

+flag is enabled.
Spork Base64 diff --git a/static/1.26.0/api/spork/base64.html b/static/1.26.0/api/spork/base64.html index d96e446e..0928ec42 100644 --- a/static/1.26.0/api/spork/base64.html +++ b/static/1.26.0/api/spork/base64.html @@ -113,9 +113,9 @@

Index

base64/decode base64/encode


base64/decode function source
(decode s)
 
 Converts a base64 encoded string to its binary representation of any format
-(UTF-8, binary, ..).
Community Examples

base64/encode function source
(encode s)
+(UTF-8, binary, ..).

base64/encode function source
(encode s)
 
-Converts a string of any format (UTF-8, binary, ..) to base64 encoding.
Community Examples
+Converts a string of any format (UTF-8, binary, ..) to base64 encoding.

Argument Parsing CRC diff --git a/static/1.26.0/api/spork/crc.html b/static/1.26.0/api/spork/crc.html index 33d3241c..402f99ba 100644 --- a/static/1.26.0/api/spork/crc.html +++ b/static/1.26.0/api/spork/crc.html @@ -112,9 +112,9 @@

Index

crc/make-variant crc/named-variant


crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
 
-Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.
Community Examples

crc/named-variant cfunction source
(crc/named-variant name)
+Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.

crc/named-variant cfunction source
(crc/named-variant name)
 
-Get a named CRC variant.
Community Examples
+Get a named CRC variant.
Base64 Cron diff --git a/static/1.26.0/api/spork/cron.html b/static/1.26.0/api/spork/cron.html index 0b0ca909..b207ac63 100644 --- a/static/1.26.0/api/spork/cron.html +++ b/static/1.26.0/api/spork/cron.html @@ -112,11 +112,11 @@

Index

cron/check cron/next-timestamp cron/parse-cron


cron/check function source
(check cron &opt time local)
 
-Check if a given time matches a cron specifier.
Community Examples

cron/next-timestamp function source
(next-timestamp cron &opt time local)
+Check if a given time matches a cron specifier.

cron/next-timestamp function source
(next-timestamp cron &opt time local)
 
-Given a cron schedule, get the next instance on the cron tab after time
Community Examples

cron/parse-cron function source
(parse-cron str)
+Given a cron schedule, get the next instance on the cron tab after time

cron/parse-cron function source
(parse-cron str)
 
-Parse a cron string into a valid cron schedule object
Community Examples
+Parse a cron string into a valid cron schedule object
CRC EV Utilities diff --git a/static/1.26.0/api/spork/ev-utils.html b/static/1.26.0/api/spork/ev-utils.html index 823cafae..60ab23a4 100644 --- a/static/1.26.0/api/spork/ev-utils.html +++ b/static/1.26.0/api/spork/ev-utils.html @@ -112,25 +112,25 @@

Index

ev-utils/go-nursery ev-utils/join-nursery ev-utils/multithread-service ev-utils/nursery ev-utils/pcall ev-utils/pdag ev-utils/pmap ev-utils/pmap-full ev-utils/pmap-limited ev-utils/spawn-nursery


ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
 
-Spawn a fiber into a nursery, similar to ev/go.
Community Examples

ev-utils/join-nursery function source
(join-nursery nurse)
+Spawn a fiber into a nursery, similar to ev/go.

ev-utils/join-nursery function source
(join-nursery nurse)
 
-Suspend the current fiber until the nursery is emptied.
Community Examples

ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
+Suspend the current fiber until the nursery is emptied.

ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
 
-Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.
Community Examples

ev-utils/nursery function source
(nursery)
+Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.

ev-utils/nursery function source
(nursery)
 
-Group a number of fibers into a single object for structured concurrency
Community Examples

ev-utils/pcall function source
(pcall f n)
+Group a number of fibers into a single object for structured concurrency

ev-utils/pcall function source
(pcall f n)
 
-Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.
Community Examples

ev-utils/pdag function source
(pdag f dag &opt n-workers)
+Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.

ev-utils/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.
Community Examples

ev-utils/pmap function source
(pmap f data &opt n-workers)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.

ev-utils/pmap function source
(pmap f data &opt n-workers)
 
-Map `f` over data in parallel, optionally limiting parallelism to `n` workers.
Community Examples

ev-utils/pmap-full function source
(pmap-full f data)
+Map `f` over data in parallel, optionally limiting parallelism to `n` workers.

ev-utils/pmap-full function source
(pmap-full f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.
Community Examples

ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.

ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
 
-Similar to pmap-full, but only runs work n-ways parallel.
Community Examples

ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
+Similar to pmap-full, but only runs work n-ways parallel.

ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
 
-Similar to ev/spawn but associate spawned fibers with a nursery
Community Examples
+Similar to ev/spawn but associate spawned fibers with a nursery
Cron Format diff --git a/static/1.26.0/api/spork/fmt.html b/static/1.26.0/api/spork/fmt.html index 09020ea5..8b416645 100644 --- a/static/1.26.0/api/spork/fmt.html +++ b/static/1.26.0/api/spork/fmt.html @@ -112,11 +112,11 @@

Index

fmt/format fmt/format-file fmt/format-print


fmt/format function source
(format source)
 
-Format a string of source code to a buffer.
Community Examples

fmt/format-file function source
(format-file file)
+Format a string of source code to a buffer.

fmt/format-file function source
(format-file file)
 
-Format a file
Community Examples

fmt/format-print function source
(format-print source)
+Format a file

fmt/format-print function source
(format-print source)
 
-Format a string of source code and print the result.
Community Examples
+Format a string of source code and print the result.
EV Utilities Generators diff --git a/static/1.26.0/api/spork/generators.html b/static/1.26.0/api/spork/generators.html index 654e2cf4..5f6d0d0d 100644 --- a/static/1.26.0/api/spork/generators.html +++ b/static/1.26.0/api/spork/generators.html @@ -112,35 +112,35 @@

Index

generators/concat generators/cycle generators/drop generators/drop-until generators/drop-while generators/filter generators/from-iterable generators/map generators/mapcat generators/range generators/run generators/take generators/take-until generators/take-while generators/to-array


generators/concat function source
(concat & xs)
 
-Concatenate one or more generators or iterables into a single generator.
Community Examples

generators/cycle function source
(cycle ds)
+Concatenate one or more generators or iterables into a single generator.

generators/cycle function source
(cycle ds)
 
-Repeatedly yield the elements of `ds`, looping back to the beginning when finished.
Community Examples

generators/drop function source
(drop n ds)
+Repeatedly yield the elements of `ds`, looping back to the beginning when finished.

generators/drop function source
(drop n ds)
 
-Drop `n` elements from `ds`.
Community Examples

generators/drop-until function source
(drop-until p ds)
+Drop `n` elements from `ds`.

generators/drop-until function source
(drop-until p ds)
 
-Drop elements from `ds` until `p` is true.
Community Examples

generators/drop-while function source
(drop-while p ds)
+Drop elements from `ds` until `p` is true.

generators/drop-while function source
(drop-while p ds)
 
-Drop elements from `ds` while `p` is true.
Community Examples

generators/filter function source
(filter p ds)
+Drop elements from `ds` while `p` is true.

generators/filter function source
(filter p ds)
 
-Create a generator that filters `ds` with `p`.
Community Examples

generators/from-iterable function source
(from-iterable ds)
+Create a generator that filters `ds` with `p`.

generators/from-iterable function source
(from-iterable ds)
 
-Create a new generator around any iterable data structure.
Community Examples

generators/map function source
(map f ds)
+Create a new generator around any iterable data structure.

generators/map function source
(map f ds)
 
-Create a generator that maps `f` over `ds`.
Community Examples

generators/mapcat function source
(mapcat f ds)
+Create a generator that maps `f` over `ds`.

generators/mapcat function source
(mapcat f ds)
 
-Map `f` over `ds`, concatenating the results into a new generator.
Community Examples

generators/range function source
(range from to)
+Map `f` over `ds`, concatenating the results into a new generator.

generators/range function source
(range from to)
 
-Create a lazy range.
Community Examples

generators/run function source
(run s)
+Create a lazy range.

generators/run function source
(run s)
 
-Evaluate `s` for side effects.
Community Examples

generators/take function source
(take n ds)
+Evaluate `s` for side effects.

generators/take function source
(take n ds)
 
-Take `n` elements from iterable `ds`.
Community Examples

generators/take-until function source
(take-until p ds)
+Take `n` elements from iterable `ds`.

generators/take-until function source
(take-until p ds)
 
-Return elements from `ds` until `p` is true.
Community Examples

generators/take-while function source
(take-while p ds)
+Return elements from `ds` until `p` is true.

generators/take-while function source
(take-while p ds)
 
-Return elements from `ds` while `p` is true.
Community Examples

generators/to-array function source
(to-array s)
+Return elements from `ds` while `p` is true.

generators/to-array function source
(to-array s)
 
-Consume `s` into a new array.
Community Examples
+Consume `s` into a new array.
Format Getline diff --git a/static/1.26.0/api/spork/getline.html b/static/1.26.0/api/spork/getline.html index 9007e71b..e21cbd50 100644 --- a/static/1.26.0/api/spork/getline.html +++ b/static/1.26.0/api/spork/getline.html @@ -112,13 +112,13 @@

Index

getline/default-autocomplete-context getline/default-autocomplete-options getline/default-doc-fetch getline/make-getline getline/max-history


getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
 
-Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.
Community Examples

getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
+Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.

getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
 
-Default handler to get available autocomplete options for a given substring.
Community Examples

getline/default-doc-fetch function source
(default-doc-fetch sym w &)
+Default handler to get available autocomplete options for a given substring.

getline/default-doc-fetch function source
(default-doc-fetch sym w &)
 
-Default handler for Ctrl-G to lookup docstrings in the current environment.
Community Examples

getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
+Default handler for Ctrl-G to lookup docstrings in the current environment.

getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
 
-Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.
Community Examples

getline/max-history number source
Maximal amount of items in the history
Community Examples
+Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.

getline/max-history number source
Maximal amount of items in the history
Generators HTML Generation diff --git a/static/1.26.0/api/spork/htmlgen.html b/static/1.26.0/api/spork/htmlgen.html index 3639df0f..ac26af59 100644 --- a/static/1.26.0/api/spork/htmlgen.html +++ b/static/1.26.0/api/spork/htmlgen.html @@ -110,13 +110,13 @@

HTML Generation

Index

-

htmlgen/doctype-html htmlgen/escape htmlgen/html htmlgen/raw


htmlgen/doctype-html function source
The html5 doctype header
Community Examples

htmlgen/escape function source
(escape x)
+

htmlgen/doctype-html htmlgen/escape htmlgen/html htmlgen/raw


htmlgen/doctype-html function source
The html5 doctype header

htmlgen/escape function source
(escape x)
 
-Escape characters in a string for HTML
Community Examples

htmlgen/html function source
(html data &opt buf)
+Escape characters in a string for HTML

htmlgen/html function source
(html data &opt buf)
 
-Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.
Community Examples

htmlgen/raw function source
(raw text)
+Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.

htmlgen/raw function source
(raw text)
 
-Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Community Examples
+Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Getline HTTP diff --git a/static/1.26.0/api/spork/http.html b/static/1.26.0/api/spork/http.html index 27884345..7417fc4b 100644 --- a/static/1.26.0/api/spork/http.html +++ b/static/1.26.0/api/spork/http.html @@ -110,29 +110,29 @@

HTTP

Index

-

http/cookie-grammar http/cookies http/logger http/middleware http/query-string-grammar http/read-body http/read-request http/read-response http/request http/request-peg http/response-peg http/router http/send-response http/server http/server-handler http/status-messages http/url-grammar


http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.
Community Examples

http/cookies function source
(cookies nextmw)
+

http/cookie-grammar http/cookies http/logger http/middleware http/query-string-grammar http/read-body http/read-request http/read-response http/request http/request-peg http/response-peg http/router http/send-response http/server http/server-handler http/status-messages http/url-grammar


http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.

http/cookies function source
(cookies nextmw)
 
-Parses cookies into the table under :cookies key
Community Examples

http/logger function source
(logger nextmw)
+Parses cookies into the table under :cookies key

http/logger function source
(logger nextmw)
 
-Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.
Community Examples

http/middleware function source
(middleware x)
+Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.

http/middleware function source
(middleware x)
 
-Coerce any type to http middleware
Community Examples

http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.
Community Examples

http/read-body function source
(read-body req)
+Coerce any type to http middleware

http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.

http/read-body function source
(read-body req)
 
-Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.
Community Examples

http/read-request function source
(read-request conn buf &opt no-query)
+Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.

http/read-request function source
(read-request conn buf &opt no-query)
 
-Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`
Community Examples

http/read-response function source
(read-response conn buf)
+Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`

http/read-response function source
(read-response conn buf)
 
-Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`
Community Examples

http/request function source
(request method url &keys {:headers headers :body body})
+Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`

http/request function source
(request method url &keys {:headers headers :body body})
 
-Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.
Community Examples

http/request-peg core/peg source
PEG for parsing HTTP requests
Community Examples

http/response-peg core/peg source
PEG for parsing HTTP responses
Community Examples

http/router function source
(router routes)
+Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.

http/request-peg core/peg source
PEG for parsing HTTP requests

http/response-peg core/peg source
PEG for parsing HTTP responses

http/router function source
(router routes)
 
-Creates a router middleware. A router will dispatch to different routes based on the URL path.
Community Examples

http/send-response function source
(send-response conn response &opt buf)
+Creates a router middleware. A router will dispatch to different routes based on the URL path.

http/send-response function source
(send-response conn response &opt buf)
 
-Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.
Community Examples

http/server function source
(server handler &opt host port)
+Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.

http/server function source
(server handler &opt host port)
 
-Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.
Community Examples

http/server-handler function source
(server-handler conn handler)
+Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.

http/server-handler function source
(server-handler conn handler)
 
-A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.
Community Examples

http/status-messages struct source
Mapping of HTTP status codes to their status message.
Community Examples

http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
Community Examples
+A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.

http/status-messages struct source
Mapping of HTTP status codes to their status message.

http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
HTML Generation HTTP Framework diff --git a/static/1.26.0/api/spork/httpf.html b/static/1.26.0/api/spork/httpf.html index 38d63ece..0a1f7313 100644 --- a/static/1.26.0/api/spork/httpf.html +++ b/static/1.26.0/api/spork/httpf.html @@ -112,15 +112,15 @@

Index

httpf/add-bindings-as-routes httpf/add-route httpf/default-payload-wrapper httpf/listen httpf/server


httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
 
-Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.
Community Examples

httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
+Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.

httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
 
-Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.
Community Examples

httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
+Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.

httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
 
-Add some metadata to all responses
Community Examples

httpf/listen function source
(listen server &opt host port n-workers)
+Add some metadata to all responses

httpf/listen function source
(listen server &opt host port n-workers)
 
-Start server. Will run on multiple-threads if n-workers > 1.
Community Examples

httpf/server function source
(server &opt parent)
+Start server. Will run on multiple-threads if n-workers > 1.

httpf/server function source
(server &opt parent)
 
-Create a new server.
Community Examples
+Create a new server.
HTTP JSON diff --git a/static/1.26.0/api/spork/index.html b/static/1.26.0/api/spork/index.html index 9b34b538..63a09986 100644 --- a/static/1.26.0/api/spork/index.html +++ b/static/1.26.0/api/spork/index.html @@ -147,234 +147,234 @@

Spork

Once parsed, values are accessible in the returned table by the name of the option. For example `(result "verbose")` will check if the verbose -flag is enabled.Community Examples

spork/base64/decode function source
(decode s)
+flag is enabled.

spork/base64/decode function source
(decode s)
 
 Converts a base64 encoded string to its binary representation of any format
-(UTF-8, binary, ..).
Community Examples

spork/base64/encode function source
(encode s)
+(UTF-8, binary, ..).

spork/base64/encode function source
(encode s)
 
-Converts a string of any format (UTF-8, binary, ..) to base64 encoding.
Community Examples

spork/crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
+Converts a string of any format (UTF-8, binary, ..) to base64 encoding.

spork/crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
 
-Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.
Community Examples

spork/crc/named-variant cfunction source
(crc/named-variant name)
+Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.

spork/crc/named-variant cfunction source
(crc/named-variant name)
 
-Get a named CRC variant.
Community Examples

spork/cron/check function source
(check cron &opt time local)
+Get a named CRC variant.

spork/cron/check function source
(check cron &opt time local)
 
-Check if a given time matches a cron specifier.
Community Examples

spork/cron/next-timestamp function source
(next-timestamp cron &opt time local)
+Check if a given time matches a cron specifier.

spork/cron/next-timestamp function source
(next-timestamp cron &opt time local)
 
-Given a cron schedule, get the next instance on the cron tab after time
Community Examples

spork/cron/parse-cron function source
(parse-cron str)
+Given a cron schedule, get the next instance on the cron tab after time

spork/cron/parse-cron function source
(parse-cron str)
 
-Parse a cron string into a valid cron schedule object
Community Examples

spork/ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
+Parse a cron string into a valid cron schedule object

spork/ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
 
-Spawn a fiber into a nursery, similar to ev/go.
Community Examples

spork/ev-utils/join-nursery function source
(join-nursery nurse)
+Spawn a fiber into a nursery, similar to ev/go.

spork/ev-utils/join-nursery function source
(join-nursery nurse)
 
-Suspend the current fiber until the nursery is emptied.
Community Examples

spork/ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
+Suspend the current fiber until the nursery is emptied.

spork/ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
 
-Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.
Community Examples

spork/ev-utils/nursery function source
(nursery)
+Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.

spork/ev-utils/nursery function source
(nursery)
 
-Group a number of fibers into a single object for structured concurrency
Community Examples

spork/ev-utils/pcall function source
(pcall f n)
+Group a number of fibers into a single object for structured concurrency

spork/ev-utils/pcall function source
(pcall f n)
 
-Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.
Community Examples

spork/ev-utils/pdag function source
(pdag f dag &opt n-workers)
+Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.

spork/ev-utils/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.
Community Examples

spork/ev-utils/pmap function source
(pmap f data &opt n-workers)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.

spork/ev-utils/pmap function source
(pmap f data &opt n-workers)
 
-Map `f` over data in parallel, optionally limiting parallelism to `n` workers.
Community Examples

spork/ev-utils/pmap-full function source
(pmap-full f data)
+Map `f` over data in parallel, optionally limiting parallelism to `n` workers.

spork/ev-utils/pmap-full function source
(pmap-full f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.
Community Examples

spork/ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.

spork/ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
 
-Similar to pmap-full, but only runs work n-ways parallel.
Community Examples

spork/ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
+Similar to pmap-full, but only runs work n-ways parallel.

spork/ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
 
-Similar to ev/spawn but associate spawned fibers with a nursery
Community Examples

spork/fmt/format function source
(format source)
+Similar to ev/spawn but associate spawned fibers with a nursery

spork/fmt/format function source
(format source)
 
-Format a string of source code to a buffer.
Community Examples

spork/fmt/format-file function source
(format-file file)
+Format a string of source code to a buffer.

spork/fmt/format-file function source
(format-file file)
 
-Format a file
Community Examples

spork/fmt/format-print function source
(format-print source)
+Format a file

spork/fmt/format-print function source
(format-print source)
 
-Format a string of source code and print the result.
Community Examples

spork/generators/concat function source
(concat & xs)
+Format a string of source code and print the result.

spork/generators/concat function source
(concat & xs)
 
-Concatenate one or more generators or iterables into a single generator.
Community Examples

spork/generators/cycle function source
(cycle ds)
+Concatenate one or more generators or iterables into a single generator.

spork/generators/cycle function source
(cycle ds)
 
-Repeatedly yield the elements of `ds`, looping back to the beginning when finished.
Community Examples

spork/generators/drop function source
(drop n ds)
+Repeatedly yield the elements of `ds`, looping back to the beginning when finished.

spork/generators/drop function source
(drop n ds)
 
-Drop `n` elements from `ds`.
Community Examples

spork/generators/drop-until function source
(drop-until p ds)
+Drop `n` elements from `ds`.

spork/generators/drop-until function source
(drop-until p ds)
 
-Drop elements from `ds` until `p` is true.
Community Examples

spork/generators/drop-while function source
(drop-while p ds)
+Drop elements from `ds` until `p` is true.

spork/generators/drop-while function source
(drop-while p ds)
 
-Drop elements from `ds` while `p` is true.
Community Examples

spork/generators/filter function source
(filter p ds)
+Drop elements from `ds` while `p` is true.

spork/generators/filter function source
(filter p ds)
 
-Create a generator that filters `ds` with `p`.
Community Examples

spork/generators/from-iterable function source
(from-iterable ds)
+Create a generator that filters `ds` with `p`.

spork/generators/from-iterable function source
(from-iterable ds)
 
-Create a new generator around any iterable data structure.
Community Examples

spork/generators/map function source
(map f ds)
+Create a new generator around any iterable data structure.

spork/generators/map function source
(map f ds)
 
-Create a generator that maps `f` over `ds`.
Community Examples

spork/generators/mapcat function source
(mapcat f ds)
+Create a generator that maps `f` over `ds`.

spork/generators/mapcat function source
(mapcat f ds)
 
-Map `f` over `ds`, concatenating the results into a new generator.
Community Examples

spork/generators/range function source
(range from to)
+Map `f` over `ds`, concatenating the results into a new generator.

spork/generators/range function source
(range from to)
 
-Create a lazy range.
Community Examples

spork/generators/run function source
(run s)
+Create a lazy range.

spork/generators/run function source
(run s)
 
-Evaluate `s` for side effects.
Community Examples

spork/generators/take function source
(take n ds)
+Evaluate `s` for side effects.

spork/generators/take function source
(take n ds)
 
-Take `n` elements from iterable `ds`.
Community Examples

spork/generators/take-until function source
(take-until p ds)
+Take `n` elements from iterable `ds`.

spork/generators/take-until function source
(take-until p ds)
 
-Return elements from `ds` until `p` is true.
Community Examples

spork/generators/take-while function source
(take-while p ds)
+Return elements from `ds` until `p` is true.

spork/generators/take-while function source
(take-while p ds)
 
-Return elements from `ds` while `p` is true.
Community Examples

spork/generators/to-array function source
(to-array s)
+Return elements from `ds` while `p` is true.

spork/generators/to-array function source
(to-array s)
 
-Consume `s` into a new array.
Community Examples

spork/getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
+Consume `s` into a new array.

spork/getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
 
-Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.
Community Examples

spork/getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
+Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.

spork/getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
 
-Default handler to get available autocomplete options for a given substring.
Community Examples

spork/getline/default-doc-fetch function source
(default-doc-fetch sym w &)
+Default handler to get available autocomplete options for a given substring.

spork/getline/default-doc-fetch function source
(default-doc-fetch sym w &)
 
-Default handler for Ctrl-G to lookup docstrings in the current environment.
Community Examples

spork/getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
+Default handler for Ctrl-G to lookup docstrings in the current environment.

spork/getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
 
-Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.
Community Examples

spork/getline/max-history number source
Maximal amount of items in the history
Community Examples

spork/htmlgen/doctype-html function source
The html5 doctype header
Community Examples

spork/htmlgen/escape function source
(escape x)
+Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.

spork/getline/max-history number source
Maximal amount of items in the history

spork/htmlgen/doctype-html function source
The html5 doctype header

spork/htmlgen/escape function source
(escape x)
 
-Escape characters in a string for HTML
Community Examples

spork/htmlgen/html function source
(html data &opt buf)
+Escape characters in a string for HTML

spork/htmlgen/html function source
(html data &opt buf)
 
-Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.
Community Examples

spork/htmlgen/raw function source
(raw text)
+Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.

spork/htmlgen/raw function source
(raw text)
 
-Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Community Examples

spork/http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.
Community Examples

spork/http/cookies function source
(cookies nextmw)
+Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.

spork/http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.

spork/http/cookies function source
(cookies nextmw)
 
-Parses cookies into the table under :cookies key
Community Examples

spork/http/logger function source
(logger nextmw)
+Parses cookies into the table under :cookies key

spork/http/logger function source
(logger nextmw)
 
-Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.
Community Examples

spork/http/middleware function source
(middleware x)
+Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.

spork/http/middleware function source
(middleware x)
 
-Coerce any type to http middleware
Community Examples

spork/http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.
Community Examples

spork/http/read-body function source
(read-body req)
+Coerce any type to http middleware

spork/http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.

spork/http/read-body function source
(read-body req)
 
-Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.
Community Examples

spork/http/read-request function source
(read-request conn buf &opt no-query)
+Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.

spork/http/read-request function source
(read-request conn buf &opt no-query)
 
-Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`
Community Examples

spork/http/read-response function source
(read-response conn buf)
+Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`

spork/http/read-response function source
(read-response conn buf)
 
-Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`
Community Examples

spork/http/request function source
(request method url &keys {:headers headers :body body})
+Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`

spork/http/request function source
(request method url &keys {:headers headers :body body})
 
-Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.
Community Examples

spork/http/request-peg core/peg source
PEG for parsing HTTP requests
Community Examples

spork/http/response-peg core/peg source
PEG for parsing HTTP responses
Community Examples

spork/http/router function source
(router routes)
+Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.

spork/http/request-peg core/peg source
PEG for parsing HTTP requests

spork/http/response-peg core/peg source
PEG for parsing HTTP responses

spork/http/router function source
(router routes)
 
-Creates a router middleware. A router will dispatch to different routes based on the URL path.
Community Examples

spork/http/send-response function source
(send-response conn response &opt buf)
+Creates a router middleware. A router will dispatch to different routes based on the URL path.

spork/http/send-response function source
(send-response conn response &opt buf)
 
-Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.
Community Examples

spork/http/server function source
(server handler &opt host port)
+Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.

spork/http/server function source
(server handler &opt host port)
 
-Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.
Community Examples

spork/http/server-handler function source
(server-handler conn handler)
+Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.

spork/http/server-handler function source
(server-handler conn handler)
 
-A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.
Community Examples

spork/http/status-messages struct source
Mapping of HTTP status codes to their status message.
Community Examples

spork/http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
Community Examples

spork/httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
+A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.

spork/http/status-messages struct source
Mapping of HTTP status codes to their status message.

spork/http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.

spork/httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
 
-Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.
Community Examples

spork/httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
+Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.

spork/httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
 
-Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.
Community Examples

spork/httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
+Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.

spork/httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
 
-Add some metadata to all responses
Community Examples

spork/httpf/listen function source
(listen server &opt host port n-workers)
+Add some metadata to all responses

spork/httpf/listen function source
(listen server &opt host port n-workers)
 
-Start server. Will run on multiple-threads if n-workers > 1.
Community Examples

spork/httpf/server function source
(server &opt parent)
+Start server. Will run on multiple-threads if n-workers > 1.

spork/httpf/server function source
(server &opt parent)
 
-Create a new server.
Community Examples

spork/json/decode cfunction
(json/decode json-source &opt keywords nils)
+Create a new server.

spork/json/decode cfunction
(json/decode json-source &opt keywords nils)
 
-Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.
Community Examples

spork/json/encode cfunction
(json/encode x &opt tab newline buf)
+Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.

spork/json/encode cfunction
(json/encode x &opt tab newline buf)
 
-Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
Community Examples

spork/mdz/*front-matter* keyword source
Dynamic binding to front matter after parsing, compilation, and evaluation, of markup completes.
Community Examples

spork/mdz/*markup-dom* keyword source
The htmlgen source that can be used to generate a document with htmlgen/html.
Community Examples

spork/mdz/add-loader function source
(add-loader)
+Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.

spork/mdz/*front-matter* keyword source
Dynamic binding to front matter after parsing, compilation, and evaluation, of markup completes.

spork/mdz/*markup-dom* keyword source
The htmlgen source that can be used to generate a document with htmlgen/html.

spork/mdz/add-loader function source
(add-loader)
 
-Allow importing and requiring markup as a module
Community Examples

spork/mdz/anchor function source
(anchor name & content)
+Allow importing and requiring markup as a module

spork/mdz/anchor function source
(anchor name & content)
 
-Create an in-page anchor for a local link.
Community Examples

spork/mdz/bigger function source
(bigger content)
+Create an in-page anchor for a local link.

spork/mdz/bigger function source
(bigger content)
 
-
Community Examples

spork/mdz/blockquote function source
(blockquote content)
+

spork/mdz/blockquote function source
(blockquote content)
 
-Define a block quote
Community Examples

spork/mdz/center function source
(center content)
+Define a block quote

spork/mdz/center function source
(center content)
 
-Center some content
Community Examples

spork/mdz/code function source
(code content)
+Center some content

spork/mdz/code function source
(code content)
 
-
Community Examples

spork/mdz/codeblock function source
(codeblock lang &opt source)
+

spork/mdz/codeblock function source
(codeblock lang &opt source)
 
-Inline code or codeblock
Community Examples

spork/mdz/hr function source
(hr)
+Inline code or codeblock

spork/mdz/hr function source
(hr)
 
-Add a horizontal rule
Community Examples

spork/mdz/html function source
(html source)
+Add a horizontal rule

spork/mdz/html function source
(html source)
 
-Embed some raw html
Community Examples

spork/mdz/image function source
(image src alt)
+Embed some raw html

spork/mdz/image function source
(image src alt)
 
-
Community Examples

spork/mdz/link function source
(link url &opt content)
+

spork/mdz/link function source
(link url &opt content)
 
-Create an anchor link
Community Examples

spork/mdz/markup function source
(markup source &opt env where)
+Create an anchor link

spork/mdz/markup function source
(markup source &opt env where)
 
-Parse mendoza markup and evaluate it returning an htmlgen document tree.
Community Examples

spork/mdz/mdz-loader function source
(mdz-loader path &)
+Parse mendoza markup and evaluate it returning an htmlgen document tree.

spork/mdz/mdz-loader function source
(mdz-loader path &)
 
-
Community Examples

spork/mdz/section function source
(section name content)
+

spork/mdz/section function source
(section name content)
 
-Create a section. Usually used to embed different parts of the content document into different parts of the main page.
Community Examples

spork/mdz/smaller function source
(smaller content)
+Create a section. Usually used to embed different parts of the content document into different parts of the main page.

spork/mdz/smaller function source
(smaller content)
 
-
Community Examples

spork/mdz/tag function source
(tag name content)
+

spork/mdz/tag function source
(tag name content)
 
-Wrap some content in an html tag. If you need attributes or other properties, you may want to use raw HTML via the html function.
Community Examples

spork/misc/always function source
(always x)
+Wrap some content in an html tag. If you need attributes or other properties, you may want to use raw HTML via the html function.

spork/misc/always function source
(always x)
 
-Return a function that discards any arguments and always returns `x`.
Community Examples

spork/misc/antepenultimate function source
(antepenultimate xs)
+Return a function that discards any arguments and always returns `x`.

spork/misc/antepenultimate function source
(antepenultimate xs)
 
-Get the third-to-last element from an indexed data structure.
Community Examples

spork/misc/caperr macro source
(caperr & body)
+Get the third-to-last element from an indexed data structure.

spork/misc/caperr macro source
(caperr & body)
 
 Captures the standart error output of the variadic `body` and returns it
-as a buffer.
Community Examples

spork/misc/capout macro source
(capout & body)
+as a buffer.

spork/misc/capout macro source
(capout & body)
 
 Captures the standart output of the variadic `body` and returns it as
-a buffer.
Community Examples

spork/misc/cond-> macro source
(cond-> val & clauses)
+a buffer.

spork/misc/cond-> macro source
(cond-> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs with condition and operation to which the `val`,
 is put as first argument. All conditions are tried and
 for truthy conditions the operation is executed.
-Returns the value mutated if any condition is truthy.
Community Examples

spork/misc/cond->> macro source
(cond->> val & clauses)
+Returns the value mutated if any condition is truthy.

spork/misc/cond->> macro source
(cond->> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs of condition and operation to which the `val`,
 is put as last argument. All conditions are tried and
 for truthy the operation is ran.
-Returns mutated value if any condition is truthy.
Community Examples

spork/misc/dedent function source
(dedent & xs)
+Returns mutated value if any condition is truthy.

spork/misc/dedent function source
(dedent & xs)
 
 Remove indentation after concatenating the arguments. Works by removing
 leading whitespace, and then removing that same pattern of whitepsace after
-new lines.
Community Examples

spork/misc/defs macro source
(defs & bindings)
+new lines.

spork/misc/defs macro source
(defs & bindings)
 
-Defines many constants as in let `bindings`, but without creating new scope.
Community Examples

spork/misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
+Defines many constants as in let `bindings`, but without creating new scope.

spork/misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
 
 Do a depth first, pre-order traversal over a data structure.
 Also allow for callbacks before and after visiting the children
 of a node. Also allow for a custom `get-children` function to
 change traversal as needed. Will detect cycles if an empty table
 is passed as the `seen` parameter, which is used to cached values
-that have been visited.
Community Examples

spork/misc/do-def macro source
(do-def c d & body)
+that have been visited.

spork/misc/do-def macro source
(do-def c d & body)
 
 Convenience macro for defining constant named `c` with value `d` before `body`
 and returning it after evaluating `body`, that presumably modifies 
-the `c` refered content. For example buffer, table or array.
Community Examples

spork/misc/do-var macro source
(do-var v d & body)
+the `c` refered content. For example buffer, table or array.

spork/misc/do-var macro source
(do-var v d & body)
 
 Convenience macro for defining varible named `v` with value `d` before `body`
-and returning it after evaluating `body`, that presumably modifies `v`.
Community Examples

spork/misc/gett macro source
(gett ds & keys)
+and returning it after evaluating `body`, that presumably modifies `v`.

spork/misc/gett macro source
(gett ds & keys)
 
-Recursive macro (get). Similar to get-in, but keys are variadic argument.
Community Examples

spork/misc/insert-sorted function source
(insert-sorted arr <? & xs)
+Recursive macro (get). Similar to get-in, but keys are variadic argument.

spork/misc/insert-sorted function source
(insert-sorted arr <? & xs)
 
 Insert elements in `arr` such that it remains sorted by the comparator. If
-`arr` is not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

spork/misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
+`arr` is not sorted beforehand, the results are undefined. Returns `arr`.

spork/misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
 
 Insert elements in `arr` such that it remains sorted by the value returned
 when `f` is called with the element, comparing the values with <. If `arr` is
-not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

spork/misc/int->string function source
(int->string int &opt base)
+not sorted beforehand, the results are undefined. Returns `arr`.

spork/misc/int->string function source
(int->string int &opt base)
 
-Stringify an integer in a particular base. Defaults to decimal (base 10).
Community Examples

spork/misc/int/ function source
(int/ & xs)
+Stringify an integer in a particular base. Defaults to decimal (base 10).

spork/misc/int/ function source
(int/ & xs)
 
-Perform integer division.
Community Examples

spork/misc/log macro source
(log level & args)
+Perform integer division.

spork/misc/log macro source
(log level & args)
 
 Print to a dynamic binding stream if that stream is set, otherwise do
 nothing. Evaluate to nil. 
 For example, `(log :err "value error: %V" my-value)` will print 
-to `(dyn :err)` only if `(dyn :err)` has been set.
Community Examples

spork/misc/make macro source
(make prototype & pairs)
+to `(dyn :err)` only if `(dyn :err)` has been set.

spork/misc/make macro source
(make prototype & pairs)
 
 Convenience macro for creating new table from even number of kvs pairs in a variadic `table-or-pairs`
 arguments and setting its prototype to `prototype`.
-Factory function for creating new objects from prototypes.
Community Examples

spork/misc/make-id function source
(make-id &opt prefix)
+Factory function for creating new objects from prototypes.

spork/misc/make-id function source
(make-id &opt prefix)
 
 Create a random, printable keyword id with 10 bytes of entropy
-with an optional prefix.
Community Examples

spork/misc/map-keys function source
(map-keys f data)
+with an optional prefix.

spork/misc/map-keys function source
(map-keys f data)
 
 Returns new table with function `f` applied to `data`'s
-keys recursively.
Community Examples

spork/misc/map-vals function source
(map-vals f data)
+keys recursively.

spork/misc/map-vals function source
(map-vals f data)
 
-Returns new table with function `f` applied to `data`'s values.
Community Examples

spork/misc/penultimate function source
(penultimate xs)
+Returns new table with function `f` applied to `data`'s values.

spork/misc/penultimate function source
(penultimate xs)
 
-Get the second-to-last element from an indexed data structure.
Community Examples

spork/misc/print-table function source
(print-table data &opt columns header-mapping)
+Get the second-to-last element from an indexed data structure.

spork/misc/print-table function source
(print-table data &opt columns header-mapping)
 
 Iterate through the rows of a data structure and print a table in a human
 readable way, with padding and heading information. Can optionally provide
@@ -382,280 +382,280 @@ 

Spork

for each row. Lastly, a `header-mapping` dictionary can be provided that changes the printed header names my mapping column keys to the desired header name. If no mapping is found, then the column key will be used as -the header name. Returns nil.
Community Examples

spork/misc/randomize-array function source
(randomize-array arr &opt rng)
+the header name. Returns nil.

spork/misc/randomize-array function source
(randomize-array arr &opt rng)
 
 Randomizes array using the fisher-yates shuffle, takes an optional random
-number generator.
Community Examples

spork/misc/second function source
(second xs)
+number generator.

spork/misc/second function source
(second xs)
 
-Get the second element from an indexed data structure.
Community Examples

spork/misc/select-keys function source
(select-keys data keyz)
+Get the second element from an indexed data structure.

spork/misc/select-keys function source
(select-keys data keyz)
 
-Returns new table with selected `keyz` from dictionary `data`.
Community Examples

spork/misc/set* macro source
(set* tgts exprs)
+Returns new table with selected `keyz` from dictionary `data`.

spork/misc/set* macro source
(set* tgts exprs)
 
 Parallel `set` function. Takes a list of targets and
 expressions, evaluates all the expressions, and then
 assigns them to the targets. Each target can be a variable
-or a 2-tuple, just like in the normal `set` special form.
Community Examples

spork/misc/string->int function source
(string->int str &opt base)
+or a 2-tuple, just like in the normal `set` special form.

spork/misc/string->int function source
(string->int str &opt base)
 
 Parse an integer in the given base. Defaults to decimal (base 10). Differs
-from scan-number in that this does not recognize floating point notation.
Community Examples

spork/misc/table-filter function source
(table-filter pred dict)
+from scan-number in that this does not recognize floating point notation.

spork/misc/table-filter function source
(table-filter pred dict)
 
 Filter a key-value structure info a table. Semantics are the same as for
 built-in `filter`, except that `pred` takes two arguments (key and value.)
-Does not consider prototypes.
Community Examples

spork/misc/third function source
(third xs)
+Does not consider prototypes.

spork/misc/third function source
(third xs)
 
-Get the third element from an indexed data structure.
Community Examples

spork/misc/trim-prefix function source
(trim-prefix prefix str)
+Get the third element from an indexed data structure.

spork/misc/trim-prefix function source
(trim-prefix prefix str)
 
-Trim the specified prefix of a string if it has one
Community Examples

spork/misc/trim-suffix function source
(trim-suffix suffix str)
+Trim the specified prefix of a string if it has one

spork/misc/trim-suffix function source
(trim-suffix suffix str)
 
-Trim the specified suffix of a string if it has one
Community Examples

spork/misc/until macro source
(until cnd & body)
+Trim the specified suffix of a string if it has one

spork/misc/until macro source
(until cnd & body)
 
 Repeat `body` while the `cnd` is false.
-Equivalent to (while (not cnd) ;body).
Community Examples

spork/misc/vars macro source
(vars & bindings)
+Equivalent to (while (not cnd) ;body).

spork/misc/vars macro source
(vars & bindings)
 
-Defines many variables as in let `bindings`, but without creating new scope.
Community Examples

spork/msg/make-proto function source
(make-proto stream &opt pack unpack)
+Defines many variables as in let `bindings`, but without creating new scope.

spork/msg/make-proto function source
(make-proto stream &opt pack unpack)
 
-Create both a send an recv function from a stream, as with `make-send` and `make-recv`.
Community Examples

spork/msg/make-recv function source
(make-recv stream &opt unpack)
+Create both a send an recv function from a stream, as with `make-send` and `make-recv`.

spork/msg/make-recv function source
(make-recv stream &opt unpack)
 
-Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.
Community Examples

spork/msg/make-send function source
(make-send stream &opt pack)
+Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.

spork/msg/make-send function source
(make-send stream &opt pack)
 
-Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Community Examples

spork/netrepl/client function source
(client &opt host port name)
+Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.

spork/netrepl/client function source
(client &opt host port name)
 
-Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".
Community Examples

spork/netrepl/default-host string source
Default host to run server on and connect to.
Community Examples

spork/netrepl/default-port string source
Default port to run the net repl.
Community Examples

spork/netrepl/server function source
(server &opt host port env cleanup welcome-msg)
+Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".

spork/netrepl/default-host string source
Default host to run server on and connect to.

spork/netrepl/default-port string source
Default port to run the net repl.

spork/netrepl/server function source
(server &opt host port env cleanup welcome-msg)
 
-Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.
Community Examples

spork/netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
+Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.

spork/netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
 
-Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Community Examples

spork/path/abspath function source
(posix/abspath path)
+Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.

spork/path/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

spork/path/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/basename function source
(posix/basename path)
+Check if a path is absolute.

spork/path/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/delim string source
Platform delimiter
Community Examples

spork/path/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

spork/path/delim string source
Platform delimiter

spork/path/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/join function source
(posix/join & els)
+Get the file extension for a path.

spork/path/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

spork/path/normalize function source
(posix/normalize path)
+Join path elements together.

spork/path/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/posix/abspath function source
(posix/abspath path)
+Split a path into its parts.

spork/path/posix/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/posix/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

spork/path/posix/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/posix/basename function source
(posix/basename path)
+Check if a path is absolute.

spork/path/posix/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/posix/delim string source
Platform delimiter
Community Examples

spork/path/posix/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

spork/path/posix/delim string source
Platform delimiter

spork/path/posix/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/posix/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/posix/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/posix/join function source
(posix/join & els)
+Get the file extension for a path.

spork/path/posix/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

spork/path/posix/normalize function source
(posix/normalize path)
+Join path elements together.

spork/path/posix/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/posix/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/posix/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/posix/relpath function source
(posix/relpath source target)
+Split a path into its parts.

spork/path/posix/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/posix/sep string source
Platform separator
Community Examples

spork/path/relpath function source
(posix/relpath source target)
+Get the relative path between two subpaths.

spork/path/posix/sep string source
Platform separator

spork/path/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/sep string source
Platform separator
Community Examples

spork/path/win32/abspath function source
(win32/abspath path)
+Get the relative path between two subpaths.

spork/path/sep string source
Platform separator

spork/path/win32/abspath function source
(win32/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/win32/abspath? function source
(win32/abspath? path)
+Coerce a path to be absolute.

spork/path/win32/abspath? function source
(win32/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/win32/basename function source
(win32/basename path)
+Check if a path is absolute.

spork/path/win32/basename function source
(win32/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/win32/delim string source
Platform delimiter
Community Examples

spork/path/win32/dirname function source
(win32/dirname path)
+Gets the base file name of a path.

spork/path/win32/delim string source
Platform delimiter

spork/path/win32/dirname function source
(win32/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/win32/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/win32/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/win32/join function source
(win32/join & els)
+Get the file extension for a path.

spork/path/win32/join function source
(win32/join & els)
 
-Join path elements together.
Community Examples

spork/path/win32/normalize function source
(win32/normalize path)
+Join path elements together.

spork/path/win32/normalize function source
(win32/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/win32/parts function source
(win32/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/win32/parts function source
(win32/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/win32/relpath function source
(win32/relpath source target)
+Split a path into its parts.

spork/path/win32/relpath function source
(win32/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/win32/sep string source
Platform separator
Community Examples

spork/rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
+Get the relative path between two subpaths.

spork/path/win32/sep string source
Platform separator

spork/rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
 
-Begin raw terminal functionality. Return a stream that can be read from to get input.
Community Examples

spork/rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
+Begin raw terminal functionality. Return a stream that can be read from to get input.

spork/rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
 
-Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.
Community Examples

spork/rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
+Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.

spork/rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
 
-A handler that a user can use to handle ctrl-z from input to suspend the current process.
Community Examples

spork/rawterm/end cfunction source
(rawterm/end)
+A handler that a user can use to handle ctrl-z from input to suspend the current process.

spork/rawterm/end cfunction source
(rawterm/end)
 
-End raw terminal functionality.
Community Examples

spork/rawterm/getch cfunction source
(rawterm/getch &opt into)
+End raw terminal functionality.

spork/rawterm/getch cfunction source
(rawterm/getch &opt into)
 
-Get a byte of input from stdin, without blocking if possible. Returns a buffer.
Community Examples

spork/rawterm/isatty cfunction source
(rawterm/isatty)
+Get a byte of input from stdin, without blocking if possible. Returns a buffer.

spork/rawterm/isatty cfunction source
(rawterm/isatty)
 
-Check if the current stdin is a tty.
Community Examples

spork/rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
+Check if the current stdin is a tty.

spork/rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
 
-Measure the monospace width of a string.
Community Examples

spork/rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
+Measure the monospace width of a string.

spork/rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
 
-Get the monospace width of a rune. Returns either 0, 1, or 2.
Community Examples

spork/rawterm/size cfunction source
(rawterm/size)
+Get the monospace width of a rune. Returns either 0, 1, or 2.

spork/rawterm/size cfunction source
(rawterm/size)
 
-Get the number of rows and columns visible in the terminal as tuple [rows cols]
Community Examples

spork/rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
+Get the number of rows and columns visible in the terminal as tuple [rows cols]

spork/rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
 
-Get a byte slice that will fit into a number of columns.
Community Examples

spork/regex/compile function source
(compile pattern)
+Get a byte slice that will fit into a number of columns.

spork/regex/compile function source
(compile pattern)
 
-Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.
Community Examples

spork/regex/find function source
(find reg text &opt start)
+Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.

spork/regex/find function source
(find reg text &opt start)
 
-Similar to peg/find, but for regexes.
Community Examples

spork/regex/find-all function source
(find-all reg text &opt start)
+Similar to peg/find, but for regexes.

spork/regex/find-all function source
(find-all reg text &opt start)
 
-Similar to peg/find-all, but for regexes.
Community Examples

spork/regex/match function source
(match reg text &opt start)
+Similar to peg/find-all, but for regexes.

spork/regex/match function source
(match reg text &opt start)
 
-Similar to peg/match, but for regexes.
Community Examples

spork/regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.
Community Examples

spork/regex/replace function source
(replace reg rep text &opt start)
+Similar to peg/match, but for regexes.

spork/regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.

spork/regex/replace function source
(replace reg rep text &opt start)
 
-Similar to peg/replace, but for regexes.
Community Examples

spork/regex/replace-all function source
(replace-all reg rep text &opt start)
+Similar to peg/replace, but for regexes.

spork/regex/replace-all function source
(replace-all reg rep text &opt start)
 
-Similar to peg/replace-all, but for regexes.
Community Examples

spork/regex/source function source
(source pattern)
+Similar to peg/replace-all, but for regexes.

spork/regex/source function source
(source pattern)
 
-Compile a subset of regex to PEG source code.
Community Examples

spork/rpc/client function source
(client &opt host port name)
+Compile a subset of regex to PEG source code.

spork/rpc/client function source
(client &opt host port name)
 
-Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.
Community Examples

spork/rpc/default-host string source
Default host to run server on and connect to.
Community Examples

spork/rpc/default-port string source
Default port to run the net repl.
Community Examples

spork/rpc/server function source
(server functions &opt host port workers-per-connection)
+Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.

spork/rpc/default-host string source
Default host to run server on and connect to.

spork/rpc/default-port string source
Default port to run the net repl.

spork/rpc/server function source
(server functions &opt host port workers-per-connection)
 
-Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Community Examples

spork/schema/make-predicate function source
(make-predicate schema)
+Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.

spork/schema/make-predicate function source
(make-predicate schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `predicate`.
Community Examples

spork/schema/make-validator function source
(make-validator schema)
+Generate a function that can be used to validate a data structure. This is the function form of `predicate`.

spork/schema/make-validator function source
(make-validator schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `validator`.
Community Examples

spork/schema/predicate macro source
(predicate pattern)
+Generate a function that can be used to validate a data structure. This is the function form of `validator`.

spork/schema/predicate macro source
(predicate pattern)
 
-Make a validation predicate given a certain schema.
Community Examples

spork/schema/validator macro source
(validator pattern)
+Make a validation predicate given a certain schema.

spork/schema/validator macro source
(validator pattern)
 
-Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Community Examples

spork/sh/copy function source
(copy src dest)
+Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.

spork/sh/copy function source
(copy src dest)
 
 Copy a file or directory recursively from one location to another.
-Expects input to be unix style paths
Community Examples

spork/sh/copy-file function source
(copy-file src-path dst-path)
+Expects input to be unix style paths

spork/sh/copy-file function source
(copy-file src-path dst-path)
 
-Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.
Community Examples

spork/sh/create-dirs function source
(create-dirs dir-path)
+Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.

spork/sh/create-dirs function source
(create-dirs dir-path)
 
-Create all directories in path specified as string including itself.
Community Examples

spork/sh/devnull function source
(devnull)
+Create all directories in path specified as string including itself.

spork/sh/devnull function source
(devnull)
 
-get the /dev/null equivalent of the current platform as an open file
Community Examples

spork/sh/exec-slurp function source
(exec-slurp & args)
+get the /dev/null equivalent of the current platform as an open file

spork/sh/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

spork/sh/exec-slurp-all function source
(exec-slurp-all & args)
+Read stdout of subprocess and return it trimmed in a string.

spork/sh/exec-slurp-all function source
(exec-slurp-all & args)
 
 Read stdout and stderr of subprocess and return it trimmed in a struct with :err and :out containing the output as string.
-This will also return the exit code under the :status key.
Community Examples

spork/sh/exists? function source
(exists? path)
+This will also return the exit code under the :status key.

spork/sh/exists? function source
(exists? path)
 
-Check if the given file or directory exists. (Follows symlinks)
Community Examples

spork/sh/list-all-files function source
(list-all-files dir &opt into)
+Check if the given file or directory exists. (Follows symlinks)

spork/sh/list-all-files function source
(list-all-files dir &opt into)
 
-List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.
Community Examples

spork/sh/make-new-file function source
(make-new-file file-path &opt mode)
+List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.

spork/sh/make-new-file function source
(make-new-file file-path &opt mode)
 
-Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).
Community Examples

spork/sh/rm function source
(rm path)
+Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).

spork/sh/rm function source
(rm path)
 
-Remove a directory and all sub directories recursively.
Community Examples

spork/sh/scan-directory function source
(scan-directory dir func)
+Remove a directory and all sub directories recursively.

spork/sh/scan-directory function source
(scan-directory dir func)
 
-Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.
Community Examples

spork/tarray/buffer cfunction
(tarray/buffer array|size)
+Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.

spork/tarray/buffer cfunction
(tarray/buffer array|size)
 
-Return typed array buffer or create a new buffer.
Community Examples

spork/tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
+Return typed array buffer or create a new buffer.

spork/tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
 
-Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.
Community Examples

spork/tarray/length cfunction
(tarray/length array|buffer)
+Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.

spork/tarray/length cfunction
(tarray/length array|buffer)
 
-Return typed array or buffer size.
Community Examples

spork/tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
+Return typed array or buffer size.

spork/tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
 
-Create new typed array.
Community Examples

spork/tarray/properties cfunction
(tarray/properties array)
+Create new typed array.

spork/tarray/properties cfunction
(tarray/properties array)
 
-Return typed array properties as a struct.
Community Examples

spork/tarray/slice cfunction
(tarray/slice tarr &opt start end)
+Return typed array properties as a struct.

spork/tarray/slice cfunction
(tarray/slice tarr &opt start end)
 
-Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.
Community Examples

spork/tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
+Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.

spork/tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
 
-Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Community Examples

spork/tasker/all-tasks function source
(all-tasks tasker &opt detailed)
+Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.

spork/tasker/all-tasks function source
(all-tasks tasker &opt detailed)
 
-Get an array of all task ids for which there is still data on disk. If `detailed` is truthy, return full task metadata instead of ids.
Community Examples

spork/tasker/cancel-task function source
(cancel-task tasker task-id)
+Get an array of all task ids for which there is still data on disk. If `detailed` is truthy, return full task metadata instead of ids.

spork/tasker/cancel-task function source
(cancel-task tasker task-id)
 
-Cancel a queued or running task.
Community Examples

spork/tasker/close-queues function source
(close-queues tasker)
+Cancel a queued or running task.

spork/tasker/close-queues function source
(close-queues tasker)
 
-Prevent any tasks from being added to queues. When an executor finishes it's current job, if there are any, it will terminate. When all executors complete, the call to `run-executors` will complete.
Community Examples

spork/tasker/default-expiration number source
Default expiration time (1 day)
Community Examples

spork/tasker/default-priority number source
Default task priority
Community Examples

spork/tasker/default-task-directory string source
Default location of task records
Community Examples

spork/tasker/err-file-name string source
Name of the file for logging errors
Community Examples

spork/tasker/max-priority number source
Maximum allowed priority (lower priority tasks will execute first)
Community Examples

spork/tasker/min-priority number source
Minimum allowed priority (lower priority tasks will execute first)
Community Examples

spork/tasker/new-tasker function source
(new-tasker &opt task-directory queues queue-size)
+Prevent any tasks from being added to queues. When an executor finishes it's current job, if there are any, it will terminate. When all executors complete, the call to `run-executors` will complete.

spork/tasker/default-expiration number source
Default expiration time (1 day)

spork/tasker/default-priority number source
Default task priority

spork/tasker/default-task-directory string source
Default location of task records

spork/tasker/err-file-name string source
Name of the file for logging errors

spork/tasker/max-priority number source
Maximum allowed priority (lower priority tasks will execute first)

spork/tasker/min-priority number source
Minimum allowed priority (lower priority tasks will execute first)

spork/tasker/new-tasker function source
(new-tasker &opt task-directory queues queue-size)
 
-Create queues and various settings to run tasks. Create a new tasker table.
Community Examples

spork/tasker/out-file-name string source
Name of the file for general logging
Community Examples

spork/tasker/queue-task function source
(queue-task tasker argv &opt note priority qname timeout expiration input)
+Create queues and various settings to run tasks. Create a new tasker table.

spork/tasker/out-file-name string source
Name of the file for general logging

spork/tasker/queue-task function source
(queue-task tasker argv &opt note priority qname timeout expiration input)
 
-Add a task specification to a queue. Supply an argv string array that will be used to invoke s a subprocess. The optional `note` parameter is just a textual note for task trackingv. The `priority` parameter should be an integer between 0 and 9 inclusive, default is 4. Lower priority jobs in the same queue will be executed by higher priority. Use input to pass in generic, unstructured input to a task.
Community Examples

spork/tasker/run-cleanup function source
(run-cleanup tasker)
+Add a task specification to a queue. Supply an argv string array that will be used to invoke s a subprocess. The optional `note` parameter is just a textual note for task trackingv. The `priority` parameter should be an integer between 0 and 9 inclusive, default is 4. Lower priority jobs in the same queue will be executed by higher priority. Use input to pass in generic, unstructured input to a task.

spork/tasker/run-cleanup function source
(run-cleanup tasker)
 
-Delete old expired jobs saved on disk
Community Examples

spork/tasker/run-executors function source
(run-executors tasker &opt workers-per-queue pre-task post-task)
+Delete old expired jobs saved on disk

spork/tasker/run-executors function source
(run-executors tasker &opt workers-per-queue pre-task post-task)
 
-Start a number of executors to run tasks as with `tasker/spawn-executors`, and then wait for all executors to complete.
Community Examples

spork/tasker/spawn-executors function source
(spawn-executors tasker &opt qnames workers-per-queue pre-task post-task)
+Start a number of executors to run tasks as with `tasker/spawn-executors`, and then wait for all executors to complete.

spork/tasker/spawn-executors function source
(spawn-executors tasker &opt qnames workers-per-queue pre-task post-task)
 
-Start a number of executors to run tasks. Tasks can be added to a queue by calling queue-task. A single tasker object can make multiple calls to spawn-executors.
Community Examples

spork/tasker/statuses tuple source
A tuple of all possible statuses that a task can have.
Community Examples

spork/tasker/task-file function source
(task-file tasker task-id &opt file-name)
+Start a number of executors to run tasks. Tasks can be added to a queue by calling queue-task. A single tasker object can make multiple calls to spawn-executors.

spork/tasker/statuses tuple source
A tuple of all possible statuses that a task can have.

spork/tasker/task-file function source
(task-file tasker task-id &opt file-name)
 
-Get a log file for a path. By default, will get a path to out.log.
Community Examples

spork/tasker/task-meta-name string source
Name of the task metadata file
Community Examples

spork/tasker/task-status function source
(task-status tasker task-id)
+Get a log file for a path. By default, will get a path to out.log.

spork/tasker/task-meta-name string source
Name of the task metadata file

spork/tasker/task-status function source
(task-status tasker task-id)
 
-Look up the status of a given task by id.
Community Examples

spork/temple/add-loader function source
(add-loader)
+Look up the status of a given task by id.

spork/temple/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

spork/temple/base-env table source
Base environment for rendering
Community Examples

spork/temple/compile function source
(compile str)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

spork/temple/base-env table source
Base environment for rendering

spork/temple/compile function source
(compile str)
 
 Compile a Temple template into a function which will return a
 rendered buffer.
 
 The resulting function should receive the template arguments in the
-&keys format.
Community Examples

spork/temple/create function source
(create source &opt where)
+&keys format.

spork/temple/create function source
(create source &opt where)
 
-Compile a template string into a function. Optionally provide a location where the source is from to improve debugging. Returns the template function.
Community Examples

spork/test/assert function source
(assert x &opt e)
+Compile a template string into a function. Optionally provide a location where the source is from to improve debugging. Returns the template function.

spork/test/assert function source
(assert x &opt e)
 
-Override's the default assert with some nice error handling.
Community Examples

spork/test/assert-docs function source
(assert-docs path)
+Override's the default assert with some nice error handling.

spork/test/assert-docs function source
(assert-docs path)
 
 Assert that all symbols, when module on the path is required,
-have proper doc string
Community Examples

spork/test/assert-error macro source
(assert-error msg & forms)
+have proper doc string

spork/test/assert-error macro source
(assert-error msg & forms)
 
-Test passes if forms error.
Community Examples

spork/test/assert-no-error macro source
(assert-no-error msg & forms)
+Test passes if forms error.

spork/test/assert-no-error macro source
(assert-no-error msg & forms)
 
-Test passes if forms do not error.
Community Examples

spork/test/assert-not function source
(assert-not x &opt e)
+Test passes if forms do not error.

spork/test/assert-not function source
(assert-not x &opt e)
 
-Invert assert.
Community Examples

spork/test/capture-stderr macro source
(capture-stderr & body)
+Invert assert.

spork/test/capture-stderr macro source
(capture-stderr & body)
 
 Runs the form and captures stderr. Returns tuple with result of the form
-and a string with captured stderr.
Community Examples

spork/test/capture-stdout macro source
(capture-stdout & body)
+and a string with captured stderr.

spork/test/capture-stdout macro source
(capture-stdout & body)
 
 Runs the form and captures stdout. Returns tuple with result of the form
-and a string with captured stdout.
Community Examples

spork/test/end-suite function source
(end-suite)
+and a string with captured stdout.

spork/test/end-suite function source
(end-suite)
 
-Ends test suite, prints summary and exits if any have failed.
Community Examples

spork/test/start-suite function source
(start-suite &opt name)
+Ends test suite, prints summary and exits if any have failed.

spork/test/start-suite function source
(start-suite &opt name)
 
-Starts test suite.
Community Examples

spork/test/suppress-stderr macro source
(suppress-stderr & body)
+Starts test suite.

spork/test/suppress-stderr macro source
(suppress-stderr & body)
 
-Suppreses stdout from the body
Community Examples

spork/test/suppress-stdout macro source
(suppress-stdout & body)
+Suppreses stdout from the body

spork/test/suppress-stdout macro source
(suppress-stdout & body)
 
-Suppreses stdout from the body
Community Examples

spork/test/timeit macro source
(timeit form &opt tag)
+Suppreses stdout from the body

spork/test/timeit macro source
(timeit form &opt tag)
 
 Time the execution of `form` using `os/clock` before and after,
 and print the result to stdout. returns: result of executing `form`.
-Uses `tag` (default "Elapsed time:") to tag the printout.
Community Examples

spork/utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
+Uses `tag` (default "Elapsed time:") to tag the printout.

spork/utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
 
-Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].
Community Examples

spork/utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
+Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].

spork/utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
 
-Encode a Unicode codepoint into the end of a buffer.
Community Examples

spork/utf8/prefix->width cfunction source
(utf8/prefix->width c)
+Encode a Unicode codepoint into the end of a buffer.

spork/utf8/prefix->width cfunction source
(utf8/prefix->width c)
 
-Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Community Examples

spork/zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
+Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.

spork/zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
 
-Add a byte sequence to the zip writer.
Community Examples

spork/zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
+Add a byte sequence to the zip writer.

spork/zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
 
-Add a file to the zip writer.
Community Examples

spork/zip/compress cfunction source
(zip/compress bytes &opt level into)
+Add a file to the zip writer.

spork/zip/compress cfunction source
(zip/compress bytes &opt level into)
 
-Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.
Community Examples

spork/zip/decompress cfunction source
(zip/decompress bytes &opt into)
+Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.

spork/zip/decompress cfunction source
(zip/decompress bytes &opt into)
 
-Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.
Community Examples

spork/zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
+Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.

spork/zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
 
-Extract a file from the zip archive, either to memory or to a file on disk.
Community Examples

spork/zip/file-directory? cfunction source
(zip/file-directory? reader idx)
+Extract a file from the zip archive, either to memory or to a file on disk.

spork/zip/file-directory? cfunction source
(zip/file-directory? reader idx)
 
-Check if a file index is a directory.
Community Examples

spork/zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
+Check if a file index is a directory.

spork/zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
 
-Check if a file is encrypted inside an archive.
Community Examples

spork/zip/file-supported? cfunction source
(zip/file-supported? reader idx)
+Check if a file is encrypted inside an archive.

spork/zip/file-supported? cfunction source
(zip/file-supported? reader idx)
 
-Check if a file is supported with this verstion of miniz.
Community Examples

spork/zip/get-filename cfunction source
(zip/get-filename reader idx)
+Check if a file is supported with this verstion of miniz.

spork/zip/get-filename cfunction source
(zip/get-filename reader idx)
 
-Convert a file index index in the archive to a filename.
Community Examples

spork/zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
+Convert a file index index in the archive to a filename.

spork/zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
 
-Get the index of a particular filename in the archive.
Community Examples

spork/zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
+Get the index of a particular filename in the archive.

spork/zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
 
-Read a byte sequence as a zip archive. Returns a new zip reader.
Community Examples

spork/zip/read-file cfunction source
(zip/read-file filename &opt flags)
+Read a byte sequence as a zip archive. Returns a new zip reader.

spork/zip/read-file cfunction source
(zip/read-file filename &opt flags)
 
-Read a file as a zip archive. Returns a new zip reader.
Community Examples

spork/zip/reader-close cfunction source
(zip/reader-close reader)
+Read a file as a zip archive. Returns a new zip reader.

spork/zip/reader-close cfunction source
(zip/reader-close reader)
 
-Close a reader and free related memory.
Community Examples

spork/zip/reader-count cfunction source
(zip/reader-count reader)
+Close a reader and free related memory.

spork/zip/reader-count cfunction source
(zip/reader-count reader)
 
-Get the number of files inside the zip archive. The files can be indexed 
Community Examples

spork/zip/stat cfunction source
(zip/stat reader idx)
+Get the number of files inside the zip archive. The files can be indexed 

spork/zip/stat cfunction source
(zip/stat reader idx)
 
 Get stat information of file. Returns a new struct with the following fields:
 
@@ -672,17 +672,17 @@ 

Spork

* :comment * :internal-attr * :external-attr -
Community Examples

spork/zip/version cfunction source
(zip/version)
+

spork/zip/version cfunction source
(zip/version)
 
-Get the version string of the underlying miniz library.
Community Examples

spork/zip/write-buffer cfunction source
(zip/write-buffer)
+Get the version string of the underlying miniz library.

spork/zip/write-buffer cfunction source
(zip/write-buffer)
 
-Create a new zip archive writer that write to memory.
Community Examples

spork/zip/write-file cfunction source
(zip/write-file dest-path)
+Create a new zip archive writer that write to memory.

spork/zip/write-file cfunction source
(zip/write-file dest-path)
 
-Create a new zip archive writer that will write into an archive file.
Community Examples

spork/zip/writer-close cfunction source
(zip/writer-close writer)
+Create a new zip archive writer that will write into an archive file.

spork/zip/writer-close cfunction source
(zip/writer-close writer)
 
-Close a ZipWriter.
Community Examples

spork/zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
+Close a ZipWriter.

spork/zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
 
-Finalize a writer, writing any zip files to disk. Return the writer.
Community Examples
+Finalize a writer, writing any zip files to disk. Return the writer.
Parser Module Argument Parsing diff --git a/static/1.26.0/api/spork/json.html b/static/1.26.0/api/spork/json.html index d1c96128..2559425a 100644 --- a/static/1.26.0/api/spork/json.html +++ b/static/1.26.0/api/spork/json.html @@ -112,9 +112,9 @@

Index

json/decode json/encode


json/decode cfunction
(json/decode json-source &opt keywords nils)
 
-Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.
Community Examples

json/encode cfunction
(json/encode x &opt tab newline buf)
+Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.

json/encode cfunction
(json/encode x &opt tab newline buf)
 
-Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
Community Examples
+Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
HTTP Framework Math extended diff --git a/static/1.26.0/api/spork/math.html b/static/1.26.0/api/spork/math.html index f674fad9..a786aebf 100644 --- a/static/1.26.0/api/spork/math.html +++ b/static/1.26.0/api/spork/math.html @@ -113,144 +113,144 @@

Index

math/add math/add-to-mean math/approx-eq math/bernoulli-distribution math/binominal-coeficient math/binominal-distribution math/check-propability math/chi-squared-distribution-table math/cols math/cumulative-std-normal-probability math/det math/dot math/epsilon math/extent math/factorial math/geometric-mean math/get-only-el math/harmonic-mean math/ident math/interquartile-range math/linear-regression math/linear-regression-line math/median math/median-absolute-deviation math/minor math/mode math/mop math/mul math/perm math/permutation-test math/permutations math/poisson-distribution math/quantile math/quantile-rank math/quantile-rank-sorted math/quantile-sorted math/quickselect math/relative-err math/root-mean-square math/rows math/sample-correlation math/sample-covariance math/sample-skewness math/sample-standard-deviation math/sample-variance math/scalar math/shuffle-in-place math/size math/sop math/standard-deviation math/standard-normal-table math/sum-compensated math/sum-nth-power-deviations math/swap math/t-test math/t-test-2 math/trans math/variance math/z-score math/zero


math/add function source
(add m a)
 
 Add `a` to matrix `m` where it can be matrix or scalar.
-Matrix `m` is mutated.
Community Examples

math/add-to-mean function source
(add-to-mean m n v)
+Matrix `m` is mutated.

math/add-to-mean function source
(add-to-mean m n v)
 
-Adds new value `v` to mean `m` from `n` values.
Community Examples

math/approx-eq function source
(approx-eq a e &opt t)
+Adds new value `v` to mean `m` from `n` values.

math/approx-eq function source
(approx-eq a e &opt t)
 
 Approximate equality between actual number `a`
 and expected number `e`. Default tolerance `t`
-is `epsilon`.
Community Examples

math/bernoulli-distribution function source
(bernoulli-distribution p)
+is `epsilon`.

math/bernoulli-distribution function source
(bernoulli-distribution p)
 
-Creates Bernoulli distribution from popability `p` in the tuple.
Community Examples

math/binominal-coeficient function source
(binominal-coeficient n k)
+Creates Bernoulli distribution from popability `p` in the tuple.

math/binominal-coeficient function source
(binominal-coeficient n k)
 
 Computes binominal coeficient from set of size `n`
-and sample size `k`.
Community Examples

math/binominal-distribution function source
(binominal-distribution t p)
+and sample size `k`.

math/binominal-distribution function source
(binominal-distribution t p)
 
 Creates binominal distribution from trials `t`
-and propability `p` in the tuple.
Community Examples

math/check-propability function source
(check-propability p)
+and propability `p` in the tuple.

math/check-propability function source
(check-propability p)
 
-Asserts that probability in in the [0 1] range.
Community Examples

math/chi-squared-distribution-table struct source
Chi Squared distribution table.
Community Examples

math/cols function source
(cols m)
+Asserts that probability in in the [0 1] range.

math/chi-squared-distribution-table struct source
Chi Squared distribution table.

math/cols function source
(cols m)
 
-Returns numbers of columns of matrix `m`.
Community Examples

math/cumulative-std-normal-probability function source
(cumulative-std-normal-probability z)
+Returns numbers of columns of matrix `m`.

math/cumulative-std-normal-probability function source
(cumulative-std-normal-probability z)
 
-Computes standard normal probability for `y`.
Community Examples

math/det function source
(det m)
+Computes standard normal probability for `y`.

math/det function source
(det m)
 
-Computes determinant of matrix `m`.
Community Examples

math/dot function source
(dot mx my)
+Computes determinant of matrix `m`.

math/dot function source
(dot mx my)
 
-Computes dot product of matrices or vectors `x` and `y`.
Community Examples

math/epsilon number source
Epsilon constant
Community Examples

math/extent function source
(extent xs)
+Computes dot product of matrices or vectors `x` and `y`.

math/epsilon number source
Epsilon constant

math/extent function source
(extent xs)
 
-Returns the minimum & maximum number in an `xs` as tuple.
Community Examples

math/factorial function source
(factorial n)
+Returns the minimum & maximum number in an `xs` as tuple.

math/factorial function source
(factorial n)
 
-Returns factorial of `n`.
Community Examples

math/geometric-mean function source
(geometric-mean xs)
+Returns factorial of `n`.

math/geometric-mean function source
(geometric-mean xs)
 
-Gets the geometric mean from `xs`.
Community Examples

math/get-only-el macro source
(get-only-el m)
+Gets the geometric mean from `xs`.

math/get-only-el macro source
(get-only-el m)
 
 Convenience macro for geting first element
-from first row of the two dimensional array `m`.
Community Examples

math/harmonic-mean function source
(harmonic-mean xs)
+from first row of the two dimensional array `m`.

math/harmonic-mean function source
(harmonic-mean xs)
 
-Gets the harmonic mean from `xs`.
Community Examples

math/ident function source
(ident c)
+Gets the harmonic mean from `xs`.

math/ident function source
(ident c)
 
-Creates identity matrix with `c` x `c` size.
Community Examples

math/interquartile-range function source
(interquartile-range xs)
+Creates identity matrix with `c` x `c` size.

math/interquartile-range function source
(interquartile-range xs)
 
-Gets the interquartile range from `xs`.
Community Examples

math/linear-regression function source
(linear-regression coords)
+Gets the interquartile range from `xs`.

math/linear-regression function source
(linear-regression coords)
 
 Computes the slope `:m` and y-intercept `:b`
-of the function in the struct from set of coordinates.
Community Examples

math/linear-regression-line function source
(linear-regression-line {:m m :b b})
+of the function in the struct from set of coordinates.

math/linear-regression-line function source
(linear-regression-line {:m m :b b})
 
-Constructs function from struct returned by linear regression.
Community Examples

math/median function source
(median xs)
+Constructs function from struct returned by linear regression.

math/median function source
(median xs)
 
-Gets the median value from `xs`
Community Examples

math/median-absolute-deviation function source
(median-absolute-deviation xs)
+Gets the median value from `xs`

math/median-absolute-deviation function source
(median-absolute-deviation xs)
 
-Gets median absolute deviation from `xs`.
Community Examples

math/minor function source
(minor m x y)
+Gets median absolute deviation from `xs`.

math/minor function source
(minor m x y)
 
-Computes minor matrix of matrix `m` and `x`, `y`.
Community Examples

math/mode function source
(mode xs)
+Computes minor matrix of matrix `m` and `x`, `y`.

math/mode function source
(mode xs)
 
-Gets the mode value from `xs`.
Community Examples

math/mop function source
(mop m op a)
+Gets the mode value from `xs`.

math/mop function source
(mop m op a)
 
 Mutates every cell of the matrix `m` with `op`
-and corresponding cell from matrix arg `a`.
Community Examples

math/mul function source
(mul m a)
+and corresponding cell from matrix arg `a`.

math/mul function source
(mul m a)
 
 Multiply matrix `m` with `a` which can be matrix or vector.
-Matrix `m` is mutated.
Community Examples

math/perm function source
(perm m)
+Matrix `m` is mutated.

math/perm function source
(perm m)
 
-Computes permanent of the matrix `m`.
Community Examples

math/permutation-test function source
(permutation-test xs ys &opt a k)
+Computes permanent of the matrix `m`.

math/permutation-test function source
(permutation-test xs ys &opt a k)
 
 Conducts a permutation test to determine if two data sets
 `xs` and `ys` are *significantly* different from each other.
 You can use alternative hypotesis `a`, which defaults to `:two-side`,
 with `:greater` and `:lesser` being the other two options.
 The last optional argument is `k` number of values
-in permutation distribution
Community Examples

math/permutations function source
(permutations s &opt k)
+in permutation distribution

math/permutations function source
(permutations s &opt k)
 
-Returns permutations of length `k` from members of `s`
Community Examples

math/poisson-distribution function source
(poisson-distribution lambda)
+Returns permutations of length `k` from members of `s`

math/poisson-distribution function source
(poisson-distribution lambda)
 
-Creates Poisson distribution from `lambda` in tuple.
Community Examples

math/quantile function source
(quantile xs p)
+Creates Poisson distribution from `lambda` in tuple.

math/quantile function source
(quantile xs p)
 
-Gets the quantile value from `xs` at `p` from unsorted population.
Community Examples

math/quantile-rank function source
(quantile-rank xs p)
+Gets the quantile value from `xs` at `p` from unsorted population.

math/quantile-rank function source
(quantile-rank xs p)
 
-Gets the quantile rank of value `v` from unsorted `xs`.
Community Examples

math/quantile-rank-sorted function source
(quantile-rank-sorted xs v)
+Gets the quantile rank of value `v` from unsorted `xs`.

math/quantile-rank-sorted function source
(quantile-rank-sorted xs v)
 
-Gets the quantile rank of value `v` from sorted `xs`.
Community Examples

math/quantile-sorted function source
(quantile-sorted xs p)
+Gets the quantile rank of value `v` from sorted `xs`.

math/quantile-sorted function source
(quantile-sorted xs p)
 
-Gets the quantile value from `xs` at `p` from sorted population.
Community Examples

math/quickselect function source
(quickselect arr k &opt left right)
+Gets the quantile value from `xs` at `p` from sorted population.

math/quickselect function source
(quickselect arr k &opt left right)
 
 Rearrange items in `arr` so that all items in `[left, k]` range
 are the smallest.
 The `k`-th element will have the `(k - left + 1)`-th smallest value
 in `[left, right]`.
-Mutates `arr`.
Community Examples

math/relative-err function source
(relative-err a e)
+Mutates `arr`.

math/relative-err function source
(relative-err a e)
 
 Gets the relative err between actual number `a`
-and expected number `e`.
Community Examples

math/root-mean-square function source
(root-mean-square xs)
+and expected number `e`.

math/root-mean-square function source
(root-mean-square xs)
 
-Gets the root mean square from `xs`.
Community Examples

math/rows function source
(rows m)
+Gets the root mean square from `xs`.

math/rows function source
(rows m)
 
-Returns numbers of rows of matrix `m`.
Community Examples

math/sample-correlation function source
(sample-correlation xs ys)
+Returns numbers of rows of matrix `m`.

math/sample-correlation function source
(sample-correlation xs ys)
 
-Gets the sample correlation between `xs` and `ys`.
Community Examples

math/sample-covariance function source
(sample-covariance xs ys)
+Gets the sample correlation between `xs` and `ys`.

math/sample-covariance function source
(sample-covariance xs ys)
 
-Gets the sample covariance between `xs` and `ys`.
Community Examples

math/sample-skewness function source
(sample-skewness xs)
+Gets the sample covariance between `xs` and `ys`.

math/sample-skewness function source
(sample-skewness xs)
 
-Gets the sample skeweness from the `xs`.
Community Examples

math/sample-standard-deviation function source
(sample-standard-deviation xs)
+Gets the sample skeweness from the `xs`.

math/sample-standard-deviation function source
(sample-standard-deviation xs)
 
-Gets sample standard deviation from `xs`.
Community Examples

math/sample-variance function source
(sample-variance xs)
+Gets sample standard deviation from `xs`.

math/sample-variance function source
(sample-variance xs)
 
-Get the sample variance from `xs`.
Community Examples

math/scalar function source
(scalar c s)
+Get the sample variance from `xs`.

math/scalar function source
(scalar c s)
 
-Creates scalar `s` matrix with `c` x `c` size.
Community Examples

math/shuffle-in-place function source
(shuffle-in-place xs)
+Creates scalar `s` matrix with `c` x `c` size.

math/shuffle-in-place function source
(shuffle-in-place xs)
 
 Generate random permutation of the array `xs`
-which is shuffled in place.
Community Examples

math/size function source
(size m)
+which is shuffled in place.

math/size function source
(size m)
 
-Returns tuple with the matrix `m` size [rows cols].
Community Examples

math/sop function source
(sop m op & a)
+Returns tuple with the matrix `m` size [rows cols].

math/sop function source
(sop m op & a)
 
 Mutates every cell of the matrix `m` with `op`
-and variadic args `a`.
Community Examples

math/standard-deviation function source
(standard-deviation xs)
+and variadic args `a`.

math/standard-deviation function source
(standard-deviation xs)
 
-Gets the standard deviation from `ds`.
Community Examples

math/standard-normal-table tuple source
Computed standard normal table.
Community Examples

math/sum-compensated function source
(sum-compensated xs)
+Gets the standard deviation from `ds`.

math/standard-normal-table tuple source
Computed standard normal table.

math/sum-compensated function source
(sum-compensated xs)
 
-Returns sum of the members of `xs` with Kahan-Babushka algorithm.
Community Examples

math/sum-nth-power-deviations function source
(sum-nth-power-deviations xs n)
+Returns sum of the members of `xs` with Kahan-Babushka algorithm.

math/sum-nth-power-deviations function source
(sum-nth-power-deviations xs n)
 
-Get the sum of deviations to the n power.
Community Examples

math/swap function source
(swap arr i j)
+Get the sum of deviations to the n power.

math/swap function source
(swap arr i j)
 
 Swaps members with indices `i` and `j` of arr.
-Noop when `i` equals `j`.
Community Examples

math/t-test function source
(t-test xs expv)
+Noop when `i` equals `j`.

math/t-test function source
(t-test xs expv)
 
 Computes one sample t-test comparing the mean of `xs`
-to known value `expv`.
Community Examples

math/t-test-2 function source
(t-test-2 xs ys &opt d)
+to known value `expv`.

math/t-test-2 function source
(t-test-2 xs ys &opt d)
 
 Computes two sample t-test of two samples `xs` and `ys`
-with difference optional `d` which defaults to 0.
Community Examples

math/trans function source
(trans m)
+with difference optional `d` which defaults to 0.

math/trans function source
(trans m)
 
-Returns a new transposed matrix from `m`.
Community Examples

math/variance function source
(variance xs)
+Returns a new transposed matrix from `m`.

math/variance function source
(variance xs)
 
-Get the variance from the `xs`.
Community Examples

math/z-score function source
(z-score x m d)
+Get the variance from the `xs`.

math/z-score function source
(z-score x m d)
 
 Gets the standard score for number `x` from mean `m` 
-and standard deviation `d`.
Community Examples

math/zero function source
(zero c &opt r)
+and standard deviation `d`.

math/zero function source
(zero c &opt r)
 
 Creates vector of length `c`, or matrix if `r`
-is provided, and fills it with zeros.
Community Examples
+is provided, and fills it with zeros.

JSON Miscellaneous Functions diff --git a/static/1.26.0/api/spork/misc.html b/static/1.26.0/api/spork/misc.html index f3c0bc26..969f5f24 100644 --- a/static/1.26.0/api/spork/misc.html +++ b/static/1.26.0/api/spork/misc.html @@ -112,79 +112,79 @@

Index

misc/always misc/antepenultimate misc/caperr misc/capout misc/cond-> misc/cond->> misc/dedent misc/defs misc/dfs misc/do-def misc/do-var misc/gett misc/insert-sorted misc/insert-sorted-by misc/int->string misc/int/ misc/log misc/make misc/make-id misc/map-keys misc/map-vals misc/penultimate misc/print-table misc/randomize-array misc/second misc/select-keys misc/set* misc/string->int misc/table-filter misc/third misc/trim-prefix misc/trim-suffix misc/until misc/vars


misc/always function source
(always x)
 
-Return a function that discards any arguments and always returns `x`.
Community Examples

misc/antepenultimate function source
(antepenultimate xs)
+Return a function that discards any arguments and always returns `x`.

misc/antepenultimate function source
(antepenultimate xs)
 
-Get the third-to-last element from an indexed data structure.
Community Examples

misc/caperr macro source
(caperr & body)
+Get the third-to-last element from an indexed data structure.

misc/caperr macro source
(caperr & body)
 
 Captures the standart error output of the variadic `body` and returns it
-as a buffer.
Community Examples

misc/capout macro source
(capout & body)
+as a buffer.

misc/capout macro source
(capout & body)
 
 Captures the standart output of the variadic `body` and returns it as
-a buffer.
Community Examples

misc/cond-> macro source
(cond-> val & clauses)
+a buffer.

misc/cond-> macro source
(cond-> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs with condition and operation to which the `val`,
 is put as first argument. All conditions are tried and
 for truthy conditions the operation is executed.
-Returns the value mutated if any condition is truthy.
Community Examples

misc/cond->> macro source
(cond->> val & clauses)
+Returns the value mutated if any condition is truthy.

misc/cond->> macro source
(cond->> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs of condition and operation to which the `val`,
 is put as last argument. All conditions are tried and
 for truthy the operation is ran.
-Returns mutated value if any condition is truthy.
Community Examples

misc/dedent function source
(dedent & xs)
+Returns mutated value if any condition is truthy.

misc/dedent function source
(dedent & xs)
 
 Remove indentation after concatenating the arguments. Works by removing
 leading whitespace, and then removing that same pattern of whitepsace after
-new lines.
Community Examples

misc/defs macro source
(defs & bindings)
+new lines.

misc/defs macro source
(defs & bindings)
 
-Defines many constants as in let `bindings`, but without creating new scope.
Community Examples

misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
+Defines many constants as in let `bindings`, but without creating new scope.

misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
 
 Do a depth first, pre-order traversal over a data structure.
 Also allow for callbacks before and after visiting the children
 of a node. Also allow for a custom `get-children` function to
 change traversal as needed. Will detect cycles if an empty table
 is passed as the `seen` parameter, which is used to cached values
-that have been visited.
Community Examples

misc/do-def macro source
(do-def c d & body)
+that have been visited.

misc/do-def macro source
(do-def c d & body)
 
 Convenience macro for defining constant named `c` with value `d` before `body`
 and returning it after evaluating `body`, that presumably modifies 
-the `c` refered content. For example buffer, table or array.
Community Examples

misc/do-var macro source
(do-var v d & body)
+the `c` refered content. For example buffer, table or array.

misc/do-var macro source
(do-var v d & body)
 
 Convenience macro for defining varible named `v` with value `d` before `body`
-and returning it after evaluating `body`, that presumably modifies `v`.
Community Examples

misc/gett macro source
(gett ds & keys)
+and returning it after evaluating `body`, that presumably modifies `v`.

misc/gett macro source
(gett ds & keys)
 
-Recursive macro (get). Similar to get-in, but keys are variadic argument.
Community Examples

misc/insert-sorted function source
(insert-sorted arr <? & xs)
+Recursive macro (get). Similar to get-in, but keys are variadic argument.

misc/insert-sorted function source
(insert-sorted arr <? & xs)
 
 Insert elements in `arr` such that it remains sorted by the comparator. If
-`arr` is not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
+`arr` is not sorted beforehand, the results are undefined. Returns `arr`.

misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
 
 Insert elements in `arr` such that it remains sorted by the value returned
 when `f` is called with the element, comparing the values with <. If `arr` is
-not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

misc/int->string function source
(int->string int &opt base)
+not sorted beforehand, the results are undefined. Returns `arr`.

misc/int->string function source
(int->string int &opt base)
 
-Stringify an integer in a particular base. Defaults to decimal (base 10).
Community Examples

misc/int/ function source
(int/ & xs)
+Stringify an integer in a particular base. Defaults to decimal (base 10).

misc/int/ function source
(int/ & xs)
 
-Perform integer division.
Community Examples

misc/log macro source
(log level & args)
+Perform integer division.

misc/log macro source
(log level & args)
 
 Print to a dynamic binding stream if that stream is set, otherwise do
 nothing. Evaluate to nil. 
 For example, `(log :err "value error: %V" my-value)` will print 
-to `(dyn :err)` only if `(dyn :err)` has been set.
Community Examples

misc/make macro source
(make prototype & pairs)
+to `(dyn :err)` only if `(dyn :err)` has been set.

misc/make macro source
(make prototype & pairs)
 
 Convenience macro for creating new table from even number of kvs pairs in a variadic `table-or-pairs`
 arguments and setting its prototype to `prototype`.
-Factory function for creating new objects from prototypes.
Community Examples

misc/make-id function source
(make-id &opt prefix)
+Factory function for creating new objects from prototypes.

misc/make-id function source
(make-id &opt prefix)
 
 Create a random, printable keyword id with 10 bytes of entropy
-with an optional prefix.
Community Examples

misc/map-keys function source
(map-keys f data)
+with an optional prefix.

misc/map-keys function source
(map-keys f data)
 
 Returns new table with function `f` applied to `data`'s
-keys recursively.
Community Examples

misc/map-vals function source
(map-vals f data)
+keys recursively.

misc/map-vals function source
(map-vals f data)
 
-Returns new table with function `f` applied to `data`'s values.
Community Examples

misc/penultimate function source
(penultimate xs)
+Returns new table with function `f` applied to `data`'s values.

misc/penultimate function source
(penultimate xs)
 
-Get the second-to-last element from an indexed data structure.
Community Examples

misc/print-table function source
(print-table data &opt columns header-mapping)
+Get the second-to-last element from an indexed data structure.

misc/print-table function source
(print-table data &opt columns header-mapping)
 
 Iterate through the rows of a data structure and print a table in a human
 readable way, with padding and heading information. Can optionally provide
@@ -192,37 +192,37 @@ 

Index for each row. Lastly, a `header-mapping` dictionary can be provided that changes the printed header names my mapping column keys to the desired header name. If no mapping is found, then the column key will be used as -the header name. Returns nil.

Community Examples

misc/randomize-array function source
(randomize-array arr &opt rng)
+the header name. Returns nil.

misc/randomize-array function source
(randomize-array arr &opt rng)
 
 Randomizes array using the fisher-yates shuffle, takes an optional random
-number generator.
Community Examples

misc/second function source
(second xs)
+number generator.

misc/second function source
(second xs)
 
-Get the second element from an indexed data structure.
Community Examples

misc/select-keys function source
(select-keys data keyz)
+Get the second element from an indexed data structure.

misc/select-keys function source
(select-keys data keyz)
 
-Returns new table with selected `keyz` from dictionary `data`.
Community Examples

misc/set* macro source
(set* tgts exprs)
+Returns new table with selected `keyz` from dictionary `data`.

misc/set* macro source
(set* tgts exprs)
 
 Parallel `set` function. Takes a list of targets and
 expressions, evaluates all the expressions, and then
 assigns them to the targets. Each target can be a variable
-or a 2-tuple, just like in the normal `set` special form.
Community Examples

misc/string->int function source
(string->int str &opt base)
+or a 2-tuple, just like in the normal `set` special form.

misc/string->int function source
(string->int str &opt base)
 
 Parse an integer in the given base. Defaults to decimal (base 10). Differs
-from scan-number in that this does not recognize floating point notation.
Community Examples

misc/table-filter function source
(table-filter pred dict)
+from scan-number in that this does not recognize floating point notation.

misc/table-filter function source
(table-filter pred dict)
 
 Filter a key-value structure info a table. Semantics are the same as for
 built-in `filter`, except that `pred` takes two arguments (key and value.)
-Does not consider prototypes.
Community Examples

misc/third function source
(third xs)
+Does not consider prototypes.

misc/third function source
(third xs)
 
-Get the third element from an indexed data structure.
Community Examples

misc/trim-prefix function source
(trim-prefix prefix str)
+Get the third element from an indexed data structure.

misc/trim-prefix function source
(trim-prefix prefix str)
 
-Trim the specified prefix of a string if it has one
Community Examples

misc/trim-suffix function source
(trim-suffix suffix str)
+Trim the specified prefix of a string if it has one

misc/trim-suffix function source
(trim-suffix suffix str)
 
-Trim the specified suffix of a string if it has one
Community Examples

misc/until macro source
(until cnd & body)
+Trim the specified suffix of a string if it has one

misc/until macro source
(until cnd & body)
 
 Repeat `body` while the `cnd` is false.
-Equivalent to (while (not cnd) ;body).
Community Examples

misc/vars macro source
(vars & bindings)
+Equivalent to (while (not cnd) ;body).

misc/vars macro source
(vars & bindings)
 
-Defines many variables as in let `bindings`, but without creating new scope.
Community Examples
+Defines many variables as in let `bindings`, but without creating new scope.
Math extended NetREPL diff --git a/static/1.26.0/api/spork/msg.html b/static/1.26.0/api/spork/msg.html index 8c27b2cb..27c596f2 100644 --- a/static/1.26.0/api/spork/msg.html +++ b/static/1.26.0/api/spork/msg.html @@ -112,11 +112,11 @@

Index

msg/make-proto msg/make-recv msg/make-send


msg/make-proto function source
(make-proto stream &opt pack unpack)
 
-Create both a send an recv function from a stream, as with `make-send` and `make-recv`.
Community Examples

msg/make-recv function source
(make-recv stream &opt unpack)
+Create both a send an recv function from a stream, as with `make-send` and `make-recv`.

msg/make-recv function source
(make-recv stream &opt unpack)
 
-Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.
Community Examples

msg/make-send function source
(make-send stream &opt pack)
+Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.

msg/make-send function source
(make-send stream &opt pack)
 
-Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Community Examples
+Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Shell Utilities Test diff --git a/static/1.26.0/api/spork/netrepl.html b/static/1.26.0/api/spork/netrepl.html index 1c5737fa..b900d48d 100644 --- a/static/1.26.0/api/spork/netrepl.html +++ b/static/1.26.0/api/spork/netrepl.html @@ -112,11 +112,11 @@

Index

netrepl/client netrepl/default-host netrepl/default-port netrepl/server netrepl/server-single


netrepl/client function source
(client &opt host port name)
 
-Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".
Community Examples

netrepl/default-host string source
Default host to run server on and connect to.
Community Examples

netrepl/default-port string source
Default port to run the net repl.
Community Examples

netrepl/server function source
(server &opt host port env cleanup welcome-msg)
+Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".

netrepl/default-host string source
Default host to run server on and connect to.

netrepl/default-port string source
Default port to run the net repl.

netrepl/server function source
(server &opt host port env cleanup welcome-msg)
 
-Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.
Community Examples

netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
+Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.

netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
 
-Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Community Examples
+Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Miscellaneous Functions Path Utilities diff --git a/static/1.26.0/api/spork/path.html b/static/1.26.0/api/spork/path.html index e6a0d504..495aa9b6 100644 --- a/static/1.26.0/api/spork/path.html +++ b/static/1.26.0/api/spork/path.html @@ -112,59 +112,59 @@

Index

path/abspath path/abspath? path/basename path/delim path/dirname path/ext path/join path/normalize path/parts path/posix/abspath path/posix/abspath? path/posix/basename path/posix/delim path/posix/dirname path/posix/ext path/posix/join path/posix/normalize path/posix/parts path/posix/relpath path/posix/sep path/relpath path/sep path/win32/abspath path/win32/abspath? path/win32/basename path/win32/delim path/win32/dirname path/win32/ext path/win32/join path/win32/normalize path/win32/parts path/win32/relpath path/win32/sep


path/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

path/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/basename function source
(posix/basename path)
+Check if a path is absolute.

path/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

path/delim string source
Platform delimiter
Community Examples

path/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

path/delim string source
Platform delimiter

path/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/ext function source
(ext path)
+Gets the directory name of a path.

path/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/join function source
(posix/join & els)
+Get the file extension for a path.

path/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

path/normalize function source
(posix/normalize path)
+Join path elements together.

path/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

path/posix/abspath function source
(posix/abspath path)
+Split a path into its parts.

path/posix/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/posix/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

path/posix/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/posix/basename function source
(posix/basename path)
+Check if a path is absolute.

path/posix/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

path/posix/delim string source
Platform delimiter
Community Examples

path/posix/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

path/posix/delim string source
Platform delimiter

path/posix/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/posix/ext function source
(ext path)
+Gets the directory name of a path.

path/posix/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/posix/join function source
(posix/join & els)
+Get the file extension for a path.

path/posix/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

path/posix/normalize function source
(posix/normalize path)
+Join path elements together.

path/posix/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/posix/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/posix/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

path/posix/relpath function source
(posix/relpath source target)
+Split a path into its parts.

path/posix/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/posix/sep string source
Platform separator
Community Examples

path/relpath function source
(posix/relpath source target)
+Get the relative path between two subpaths.

path/posix/sep string source
Platform separator

path/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/sep string source
Platform separator
Community Examples

path/win32/abspath function source
(win32/abspath path)
+Get the relative path between two subpaths.

path/sep string source
Platform separator

path/win32/abspath function source
(win32/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/win32/abspath? function source
(win32/abspath? path)
+Coerce a path to be absolute.

path/win32/abspath? function source
(win32/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/win32/basename function source
(win32/basename path)
+Check if a path is absolute.

path/win32/basename function source
(win32/basename path)
 
-Gets the base file name of a path.
Community Examples

path/win32/delim string source
Platform delimiter
Community Examples

path/win32/dirname function source
(win32/dirname path)
+Gets the base file name of a path.

path/win32/delim string source
Platform delimiter

path/win32/dirname function source
(win32/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/win32/ext function source
(ext path)
+Gets the directory name of a path.

path/win32/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/win32/join function source
(win32/join & els)
+Get the file extension for a path.

path/win32/join function source
(win32/join & els)
 
-Join path elements together.
Community Examples

path/win32/normalize function source
(win32/normalize path)
+Join path elements together.

path/win32/normalize function source
(win32/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/win32/parts function source
(win32/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/win32/parts function source
(win32/parts path)
 
-Split a path into its parts.
Community Examples

path/win32/relpath function source
(win32/relpath source target)
+Split a path into its parts.

path/win32/relpath function source
(win32/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/win32/sep string source
Platform separator
Community Examples
+Get the relative path between two subpaths.

path/win32/sep string source
Platform separator
NetREPL Raw Terminal Functionality diff --git a/static/1.26.0/api/spork/rawterm.html b/static/1.26.0/api/spork/rawterm.html index 0f0025e9..9ced4888 100644 --- a/static/1.26.0/api/spork/rawterm.html +++ b/static/1.26.0/api/spork/rawterm.html @@ -112,25 +112,25 @@

Index

rawterm/begin rawterm/buffer-traverse rawterm/ctrl-z rawterm/end rawterm/getch rawterm/isatty rawterm/monowidth rawterm/rune-monowidth rawterm/size rawterm/slice-monowidth


rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
 
-Begin raw terminal functionality. Return a stream that can be read from to get input.
Community Examples

rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
+Begin raw terminal functionality. Return a stream that can be read from to get input.

rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
 
-Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.
Community Examples

rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
+Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.

rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
 
-A handler that a user can use to handle ctrl-z from input to suspend the current process.
Community Examples

rawterm/end cfunction source
(rawterm/end)
+A handler that a user can use to handle ctrl-z from input to suspend the current process.

rawterm/end cfunction source
(rawterm/end)
 
-End raw terminal functionality.
Community Examples

rawterm/getch cfunction source
(rawterm/getch &opt into)
+End raw terminal functionality.

rawterm/getch cfunction source
(rawterm/getch &opt into)
 
-Get a byte of input from stdin, without blocking if possible. Returns a buffer.
Community Examples

rawterm/isatty cfunction source
(rawterm/isatty)
+Get a byte of input from stdin, without blocking if possible. Returns a buffer.

rawterm/isatty cfunction source
(rawterm/isatty)
 
-Check if the current stdin is a tty.
Community Examples

rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
+Check if the current stdin is a tty.

rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
 
-Measure the monospace width of a string.
Community Examples

rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
+Measure the monospace width of a string.

rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
 
-Get the monospace width of a rune. Returns either 0, 1, or 2.
Community Examples

rawterm/size cfunction source
(rawterm/size)
+Get the monospace width of a rune. Returns either 0, 1, or 2.

rawterm/size cfunction source
(rawterm/size)
 
-Get the number of rows and columns visible in the terminal as tuple [rows cols]
Community Examples

rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
+Get the number of rows and columns visible in the terminal as tuple [rows cols]

rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
 
-Get a byte slice that will fit into a number of columns.
Community Examples
+Get a byte slice that will fit into a number of columns.
Path Utilities Regular Expression PEG Syntax diff --git a/static/1.26.0/api/spork/regex.html b/static/1.26.0/api/spork/regex.html index a00dd689..909b5cab 100644 --- a/static/1.26.0/api/spork/regex.html +++ b/static/1.26.0/api/spork/regex.html @@ -115,19 +115,19 @@

Index

regex/compile regex/find regex/find-all regex/match regex/peg regex/replace regex/replace-all regex/source


regex/compile function source
(compile pattern)
 
-Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.
Community Examples

regex/find function source
(find reg text &opt start)
+Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.

regex/find function source
(find reg text &opt start)
 
-Similar to peg/find, but for regexes.
Community Examples

regex/find-all function source
(find-all reg text &opt start)
+Similar to peg/find, but for regexes.

regex/find-all function source
(find-all reg text &opt start)
 
-Similar to peg/find-all, but for regexes.
Community Examples

regex/match function source
(match reg text &opt start)
+Similar to peg/find-all, but for regexes.

regex/match function source
(match reg text &opt start)
 
-Similar to peg/match, but for regexes.
Community Examples

regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.
Community Examples

regex/replace function source
(replace reg rep text &opt start)
+Similar to peg/match, but for regexes.

regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.

regex/replace function source
(replace reg rep text &opt start)
 
-Similar to peg/replace, but for regexes.
Community Examples

regex/replace-all function source
(replace-all reg rep text &opt start)
+Similar to peg/replace, but for regexes.

regex/replace-all function source
(replace-all reg rep text &opt start)
 
-Similar to peg/replace-all, but for regexes.
Community Examples

regex/source function source
(source pattern)
+Similar to peg/replace-all, but for regexes.

regex/source function source
(source pattern)
 
-Compile a subset of regex to PEG source code.
Community Examples
+Compile a subset of regex to PEG source code.
Raw Terminal Functionality Remote Procedure Calls diff --git a/static/1.26.0/api/spork/rpc.html b/static/1.26.0/api/spork/rpc.html index f8c844ab..cdd67005 100644 --- a/static/1.26.0/api/spork/rpc.html +++ b/static/1.26.0/api/spork/rpc.html @@ -112,9 +112,9 @@

Index

rpc/client rpc/default-host rpc/default-port rpc/server


rpc/client function source
(client &opt host port name)
 
-Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.
Community Examples

rpc/default-host string source
Default host to run server on and connect to.
Community Examples

rpc/default-port string source
Default port to run the net repl.
Community Examples

rpc/server function source
(server functions &opt host port workers-per-connection)
+Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.

rpc/default-host string source
Default host to run server on and connect to.

rpc/default-port string source
Default port to run the net repl.

rpc/server function source
(server functions &opt host port workers-per-connection)
 
-Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Community Examples
+Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Regular Expression PEG Syntax Schema diff --git a/static/1.26.0/api/spork/schema.html b/static/1.26.0/api/spork/schema.html index 6ac983c0..c826d47a 100644 --- a/static/1.26.0/api/spork/schema.html +++ b/static/1.26.0/api/spork/schema.html @@ -112,13 +112,13 @@

Index

schema/make-predicate schema/make-validator schema/predicate schema/validator


schema/make-predicate function source
(make-predicate schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `predicate`.
Community Examples

schema/make-validator function source
(make-validator schema)
+Generate a function that can be used to validate a data structure. This is the function form of `predicate`.

schema/make-validator function source
(make-validator schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `validator`.
Community Examples

schema/predicate macro source
(predicate pattern)
+Generate a function that can be used to validate a data structure. This is the function form of `validator`.

schema/predicate macro source
(predicate pattern)
 
-Make a validation predicate given a certain schema.
Community Examples

schema/validator macro source
(validator pattern)
+Make a validation predicate given a certain schema.

schema/validator macro source
(validator pattern)
 
-Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Community Examples
+Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Remote Procedure Calls Shell Utilities diff --git a/static/1.26.0/api/spork/sh.html b/static/1.26.0/api/spork/sh.html index 6afc2ab9..47b82a11 100644 --- a/static/1.26.0/api/spork/sh.html +++ b/static/1.26.0/api/spork/sh.html @@ -113,28 +113,28 @@

Index

sh/copy sh/copy-file sh/create-dirs sh/devnull sh/exec-slurp sh/exec-slurp-all sh/exists? sh/list-all-files sh/make-new-file sh/rm sh/scan-directory


sh/copy function source
(copy src dest)
 
 Copy a file or directory recursively from one location to another.
-Expects input to be unix style paths
Community Examples

sh/copy-file function source
(copy-file src-path dst-path)
+Expects input to be unix style paths

sh/copy-file function source
(copy-file src-path dst-path)
 
-Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.
Community Examples

sh/create-dirs function source
(create-dirs dir-path)
+Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.

sh/create-dirs function source
(create-dirs dir-path)
 
-Create all directories in path specified as string including itself.
Community Examples

sh/devnull function source
(devnull)
+Create all directories in path specified as string including itself.

sh/devnull function source
(devnull)
 
-get the /dev/null equivalent of the current platform as an open file
Community Examples

sh/exec-slurp function source
(exec-slurp & args)
+get the /dev/null equivalent of the current platform as an open file

sh/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

sh/exec-slurp-all function source
(exec-slurp-all & args)
+Read stdout of subprocess and return it trimmed in a string.

sh/exec-slurp-all function source
(exec-slurp-all & args)
 
 Read stdout and stderr of subprocess and return it trimmed in a struct with :err and :out containing the output as string.
-This will also return the exit code under the :status key.
Community Examples

sh/exists? function source
(exists? path)
+This will also return the exit code under the :status key.

sh/exists? function source
(exists? path)
 
-Check if the given file or directory exists. (Follows symlinks)
Community Examples

sh/list-all-files function source
(list-all-files dir &opt into)
+Check if the given file or directory exists. (Follows symlinks)

sh/list-all-files function source
(list-all-files dir &opt into)
 
-List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.
Community Examples

sh/make-new-file function source
(make-new-file file-path &opt mode)
+List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.

sh/make-new-file function source
(make-new-file file-path &opt mode)
 
-Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).
Community Examples

sh/rm function source
(rm path)
+Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).

sh/rm function source
(rm path)
 
-Remove a directory and all sub directories recursively.
Community Examples

sh/scan-directory function source
(scan-directory dir func)
+Remove a directory and all sub directories recursively.

sh/scan-directory function source
(scan-directory dir func)
 
-Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.
Community Examples
+Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.

Schema Simple Messaging Protocol diff --git a/static/1.26.0/api/spork/tarray.html b/static/1.26.0/api/spork/tarray.html index b13a84b5..37786c54 100644 --- a/static/1.26.0/api/spork/tarray.html +++ b/static/1.26.0/api/spork/tarray.html @@ -112,19 +112,19 @@

Index

tarray/buffer tarray/copy-bytes tarray/length tarray/new tarray/properties tarray/slice tarray/swap-bytes


tarray/buffer cfunction
(tarray/buffer array|size)
 
-Return typed array buffer or create a new buffer.
Community Examples

tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
+Return typed array buffer or create a new buffer.

tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
 
-Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.
Community Examples

tarray/length cfunction
(tarray/length array|buffer)
+Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.

tarray/length cfunction
(tarray/length array|buffer)
 
-Return typed array or buffer size.
Community Examples

tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
+Return typed array or buffer size.

tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
 
-Create new typed array.
Community Examples

tarray/properties cfunction
(tarray/properties array)
+Create new typed array.

tarray/properties cfunction
(tarray/properties array)
 
-Return typed array properties as a struct.
Community Examples

tarray/slice cfunction
(tarray/slice tarr &opt start end)
+Return typed array properties as a struct.

tarray/slice cfunction
(tarray/slice tarr &opt start end)
 
-Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.
Community Examples

tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
+Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.

tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
 
-Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Community Examples
+Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Test Zip Files diff --git a/static/1.26.0/api/spork/test.html b/static/1.26.0/api/spork/test.html index 84575337..91e62772 100644 --- a/static/1.26.0/api/spork/test.html +++ b/static/1.26.0/api/spork/test.html @@ -112,34 +112,34 @@

Index

test/assert test/assert-docs test/assert-error test/assert-no-error test/assert-not test/capture-stderr test/capture-stdout test/end-suite test/start-suite test/suppress-stderr test/suppress-stdout test/timeit


test/assert function source
(assert x &opt e)
 
-Override's the default assert with some nice error handling.
Community Examples

test/assert-docs function source
(assert-docs path)
+Override's the default assert with some nice error handling.

test/assert-docs function source
(assert-docs path)
 
 Assert that all symbols, when module on the path is required,
-have proper doc string
Community Examples

test/assert-error macro source
(assert-error msg & forms)
+have proper doc string

test/assert-error macro source
(assert-error msg & forms)
 
-Test passes if forms error.
Community Examples

test/assert-no-error macro source
(assert-no-error msg & forms)
+Test passes if forms error.

test/assert-no-error macro source
(assert-no-error msg & forms)
 
-Test passes if forms do not error.
Community Examples

test/assert-not function source
(assert-not x &opt e)
+Test passes if forms do not error.

test/assert-not function source
(assert-not x &opt e)
 
-Invert assert.
Community Examples

test/capture-stderr macro source
(capture-stderr & body)
+Invert assert.

test/capture-stderr macro source
(capture-stderr & body)
 
 Runs the form and captures stderr. Returns tuple with result of the form
-and a string with captured stderr.
Community Examples

test/capture-stdout macro source
(capture-stdout & body)
+and a string with captured stderr.

test/capture-stdout macro source
(capture-stdout & body)
 
 Runs the form and captures stdout. Returns tuple with result of the form
-and a string with captured stdout.
Community Examples

test/end-suite function source
(end-suite)
+and a string with captured stdout.

test/end-suite function source
(end-suite)
 
-Ends test suite, prints summary and exits if any have failed.
Community Examples

test/start-suite function source
(start-suite &opt name)
+Ends test suite, prints summary and exits if any have failed.

test/start-suite function source
(start-suite &opt name)
 
-Starts test suite.
Community Examples

test/suppress-stderr macro source
(suppress-stderr & body)
+Starts test suite.

test/suppress-stderr macro source
(suppress-stderr & body)
 
-Suppreses stdout from the body
Community Examples

test/suppress-stdout macro source
(suppress-stdout & body)
+Suppreses stdout from the body

test/suppress-stdout macro source
(suppress-stdout & body)
 
-Suppreses stdout from the body
Community Examples

test/timeit macro source
(timeit form &opt tag)
+Suppreses stdout from the body

test/timeit macro source
(timeit form &opt tag)
 
 Time the execution of `form` using `os/clock` before and after,
 and print the result to stdout. returns: result of executing `form`.
-Uses `tag` (default "Elapsed time:") to tag the printout.
Community Examples
+Uses `tag` (default "Elapsed time:") to tag the printout.
Simple Messaging Protocol Typed Arrays diff --git a/static/1.26.0/api/spork/zip.html b/static/1.26.0/api/spork/zip.html index 4aaa22cc..31d9b513 100644 --- a/static/1.26.0/api/spork/zip.html +++ b/static/1.26.0/api/spork/zip.html @@ -112,33 +112,33 @@

Index

zip/add-bytes zip/add-file zip/compress zip/decompress zip/extract zip/file-directory? zip/file-encrypted? zip/file-supported? zip/get-filename zip/locate-file zip/read-bytes zip/read-file zip/reader-close zip/reader-count zip/stat zip/version zip/write-buffer zip/write-file zip/writer-close zip/writer-finalize


zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
 
-Add a byte sequence to the zip writer.
Community Examples

zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
+Add a byte sequence to the zip writer.

zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
 
-Add a file to the zip writer.
Community Examples

zip/compress cfunction source
(zip/compress bytes &opt level into)
+Add a file to the zip writer.

zip/compress cfunction source
(zip/compress bytes &opt level into)
 
-Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.
Community Examples

zip/decompress cfunction source
(zip/decompress bytes &opt into)
+Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.

zip/decompress cfunction source
(zip/decompress bytes &opt into)
 
-Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.
Community Examples

zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
+Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.

zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
 
-Extract a file from the zip archive, either to memory or to a file on disk.
Community Examples

zip/file-directory? cfunction source
(zip/file-directory? reader idx)
+Extract a file from the zip archive, either to memory or to a file on disk.

zip/file-directory? cfunction source
(zip/file-directory? reader idx)
 
-Check if a file index is a directory.
Community Examples

zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
+Check if a file index is a directory.

zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
 
-Check if a file is encrypted inside an archive.
Community Examples

zip/file-supported? cfunction source
(zip/file-supported? reader idx)
+Check if a file is encrypted inside an archive.

zip/file-supported? cfunction source
(zip/file-supported? reader idx)
 
-Check if a file is supported with this verstion of miniz.
Community Examples

zip/get-filename cfunction source
(zip/get-filename reader idx)
+Check if a file is supported with this verstion of miniz.

zip/get-filename cfunction source
(zip/get-filename reader idx)
 
-Convert a file index index in the archive to a filename.
Community Examples

zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
+Convert a file index index in the archive to a filename.

zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
 
-Get the index of a particular filename in the archive.
Community Examples

zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
+Get the index of a particular filename in the archive.

zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
 
-Read a byte sequence as a zip archive. Returns a new zip reader.
Community Examples

zip/read-file cfunction source
(zip/read-file filename &opt flags)
+Read a byte sequence as a zip archive. Returns a new zip reader.

zip/read-file cfunction source
(zip/read-file filename &opt flags)
 
-Read a file as a zip archive. Returns a new zip reader.
Community Examples

zip/reader-close cfunction source
(zip/reader-close reader)
+Read a file as a zip archive. Returns a new zip reader.

zip/reader-close cfunction source
(zip/reader-close reader)
 
-Close a reader and free related memory.
Community Examples

zip/reader-count cfunction source
(zip/reader-count reader)
+Close a reader and free related memory.

zip/reader-count cfunction source
(zip/reader-count reader)
 
-Get the number of files inside the zip archive. The files can be indexed 
Community Examples

zip/stat cfunction source
(zip/stat reader idx)
+Get the number of files inside the zip archive. The files can be indexed 

zip/stat cfunction source
(zip/stat reader idx)
 
 Get stat information of file. Returns a new struct with the following fields:
 
@@ -155,17 +155,17 @@ 

Index * :comment * :internal-attr * :external-attr -

Community Examples

zip/version cfunction source
(zip/version)
+

zip/version cfunction source
(zip/version)
 
-Get the version string of the underlying miniz library.
Community Examples

zip/write-buffer cfunction source
(zip/write-buffer)
+Get the version string of the underlying miniz library.

zip/write-buffer cfunction source
(zip/write-buffer)
 
-Create a new zip archive writer that write to memory.
Community Examples

zip/write-file cfunction source
(zip/write-file dest-path)
+Create a new zip archive writer that write to memory.

zip/write-file cfunction source
(zip/write-file dest-path)
 
-Create a new zip archive writer that will write into an archive file.
Community Examples

zip/writer-close cfunction source
(zip/writer-close writer)
+Create a new zip archive writer that will write into an archive file.

zip/writer-close cfunction source
(zip/writer-close writer)
 
-Close a ZipWriter.
Community Examples

zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
+Close a ZipWriter.

zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
 
-Finalize a writer, writing any zip files to disk. Return the writer.
Community Examples
+Finalize a writer, writing any zip files to disk. Return the writer.
Typed Arrays String Module diff --git a/static/1.27.0/api/jpm/cc.html b/static/1.27.0/api/jpm/cc.html index 04f02d72..ed7316f5 100644 --- a/static/1.27.0/api/jpm/cc.html +++ b/static/1.27.0/api/jpm/cc.html @@ -114,35 +114,35 @@

Index

cc/archive-c cc/compile-c cc/create-buffer-c cc/create-buffer-c-impl cc/create-executable cc/embed-name cc/entry-name cc/entry-replace cc/link-c cc/make-bin-source cc/make-define cc/make-defines cc/modpath-to-meta cc/modpath-to-static cc/out-path


cc/archive-c function source
(archive-c opts target & objects)
 
-Link object files together to make a static library.
Community Examples

cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
+Link object files together to make a static library.

cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
 
-Compile a C file into an object file.
Community Examples

cc/create-buffer-c function source
(create-buffer-c source dest name)
+Compile a C file into an object file.

cc/create-buffer-c function source
(create-buffer-c source dest name)
 
-Inline raw byte file as a c file.
Community Examples

cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
+Inline raw byte file as a c file.

cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
 
-
Community Examples

cc/create-executable function source
(create-executable opts source dest no-core)
+

cc/create-executable function source
(create-executable opts source dest no-core)
 
-Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.
Community Examples

cc/embed-name function source
(embed-name path)
+Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.

cc/embed-name function source
(embed-name path)
 
-Rename a janet symbol for embedding.
Community Examples

cc/entry-name function source
(entry-name name)
+Rename a janet symbol for embedding.

cc/entry-name function source
(entry-name name)
 
-Name of symbol that enters static compilation of a module.
Community Examples

cc/entry-replace function source
(entry-replace name)
+Name of symbol that enters static compilation of a module.

cc/entry-replace function source
(entry-replace name)
 
-Escape special characters in the entry-name
Community Examples

cc/link-c function source
(link-c has-cpp opts target & objects)
+Escape special characters in the entry-name

cc/link-c function source
(link-c has-cpp opts target & objects)
 
-Link C or C++ object files together to make a native module.
Community Examples

cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
+Link C or C++ object files together to make a native module.

cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
 
-
Community Examples

cc/make-define function source
(make-define define value)
+

cc/make-define function source
(make-define define value)
 
-Generate strings for adding custom defines to the compiler.
Community Examples

cc/make-defines function source
(make-defines defines)
+Generate strings for adding custom defines to the compiler.

cc/make-defines function source
(make-defines defines)
 
-Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.
Community Examples

cc/modpath-to-meta function source
(modpath-to-meta path)
+Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.

cc/modpath-to-meta function source
(modpath-to-meta path)
 
-Get the meta file path (.meta.janet) corresponding to a native module path (.so).
Community Examples

cc/modpath-to-static function source
(modpath-to-static path)
+Get the meta file path (.meta.janet) corresponding to a native module path (.so).

cc/modpath-to-static function source
(modpath-to-static path)
 
-Get the static library (.a) path corresponding to a native module path (.so).
Community Examples

cc/out-path function source
(out-path path from-ext to-ext)
+Get the static library (.a) path corresponding to a native module path (.so).

cc/out-path function source
(out-path path from-ext to-ext)
 
-Take a source file path and convert it to an output path.
Community Examples
+Take a source file path and convert it to an output path.
Build Rules C Source Generation diff --git a/static/1.27.0/api/jpm/cgen.html b/static/1.27.0/api/jpm/cgen.html index 9bfb4406..53022cb0 100644 --- a/static/1.27.0/api/jpm/cgen.html +++ b/static/1.27.0/api/jpm/cgen.html @@ -114,13 +114,13 @@

Index

cgen/add-loader cgen/ir cgen/mangle cgen/print-ir


cgen/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

cgen/ir macro source
(ir & body)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

cgen/ir macro source
(ir & body)
 
-Macro that automatically quotes the body provided and calls (print-ir ...) on the body.
Community Examples

cgen/mangle function source
(mangle token)
+Macro that automatically quotes the body provided and calls (print-ir ...) on the body.

cgen/mangle function source
(mangle token)
 
-Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.
Community Examples

cgen/print-ir function source
(print-ir ir)
+Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.

cgen/print-ir function source
(print-ir ir)
 
-Compile the CGEN IR to C and print it to (dyn :out).
Community Examples
+Compile the CGEN IR to C and print it to (dyn :out).
C Compiler Command Line Interface diff --git a/static/1.27.0/api/jpm/cli.html b/static/1.27.0/api/jpm/cli.html index 486bca15..fccedf63 100644 --- a/static/1.27.0/api/jpm/cli.html +++ b/static/1.27.0/api/jpm/cli.html @@ -114,11 +114,11 @@

Index

cli/jpm cli/main cli/run cli/setup


cli/jpm macro source
(jpm & argv)
 
-A Macro User Interface for jpm to be used from a repl in a way similar to the command line.
Community Examples

cli/main function source
(main & argv)
+A Macro User Interface for jpm to be used from a repl in a way similar to the command line.

cli/main function source
(main & argv)
 
-Script entry.
Community Examples

cli/run function source
(run & args)
+Script entry.

cli/run function source
(run & args)
 
-Run CLI commands.
Community Examples

cli/setup function source
(setup args)
+Run CLI commands.

cli/setup function source
(setup args)
 
 Load configuration from the command line, environment variables, and
 configuration files. Returns array of non-configuration arguments as well.
@@ -126,7 +126,7 @@ 

Index 1. Commmand line settings 2. The value of `(dyn :jpm-config)` 3. Environment variables - 4. Config file settings (default-config if non specified)

Community Examples
+ 4. Config file settings (default-config if non specified)
C Source Generation Commands diff --git a/static/1.27.0/api/jpm/commands.html b/static/1.27.0/api/jpm/commands.html index 62a4bd0e..d6d17515 100644 --- a/static/1.27.0/api/jpm/commands.html +++ b/static/1.27.0/api/jpm/commands.html @@ -114,45 +114,45 @@

Index

commands/build commands/clean commands/configure commands/deps commands/enable-local-mode commands/help commands/install commands/jpm-debug-repl commands/list-installed commands/list-pkgs commands/list-rules commands/list-tasks commands/new-c-project commands/new-project commands/quickbin commands/set-tree commands/show-paths commands/show-rule-tree commands/test commands/update-pkgs


commands/build function source
(build)
 
-
Community Examples

commands/clean function source
(clean)
+

commands/clean function source
(clean)
 
-
Community Examples

commands/configure function source
(configure &opt path)
+

commands/configure function source
(configure &opt path)
 
-Setup an out-of-tree build with certain configuration options.
Community Examples

commands/deps function source
(deps)
+Setup an out-of-tree build with certain configuration options.

commands/deps function source
(deps)
 
-
Community Examples

commands/enable-local-mode function source
(enable-local-mode)
+

commands/enable-local-mode function source
(enable-local-mode)
 
-Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/
Community Examples

commands/help function source
(help)
+Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/

commands/help function source
(help)
 
-
Community Examples

commands/install function source
(install & repo)
+

commands/install function source
(install & repo)
 
-
Community Examples

commands/jpm-debug-repl function source
(jpm-debug-repl)
+

commands/jpm-debug-repl function source
(jpm-debug-repl)
 
-
Community Examples

commands/list-installed function source
(list-installed)
+

commands/list-installed function source
(list-installed)
 
-
Community Examples

commands/list-pkgs function source
(list-pkgs &opt search)
+

commands/list-pkgs function source
(list-pkgs &opt search)
 
-
Community Examples

commands/list-rules function source
(list-rules &opt ctx)
+

commands/list-rules function source
(list-rules &opt ctx)
 
-
Community Examples

commands/list-tasks function source
(list-tasks &opt ctx)
+

commands/list-tasks function source
(list-tasks &opt ctx)
 
-
Community Examples

commands/new-c-project function source
(new-c-project name)
+

commands/new-c-project function source
(new-c-project name)
 
-Create a new C project
Community Examples

commands/new-project function source
(new-project name)
+Create a new C project

commands/new-project function source
(new-project name)
 
-Create a new project
Community Examples

commands/quickbin function source
(quickbin input output)
+Create a new project

commands/quickbin function source
(quickbin input output)
 
-
Community Examples

commands/set-tree function source
(set-tree tree)
+

commands/set-tree function source
(set-tree tree)
 
-Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.
Community Examples

commands/show-paths function source
(show-paths)
+Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.

commands/show-paths function source
(show-paths)
 
-
Community Examples

commands/show-rule-tree function source
(show-rule-tree &opt root depth)
+

commands/show-rule-tree function source
(show-rule-tree &opt root depth)
 
-
Community Examples

commands/test function source
(test)
+

commands/test function source
(test)
 
-
Community Examples

commands/update-pkgs function source
(update-pkgs)
+

commands/update-pkgs function source
(update-pkgs)
 
-
Community Examples
+
Command Line Interface Config diff --git a/static/1.27.0/api/jpm/config.html b/static/1.27.0/api/jpm/config.html index 0d1faee4..bdac11e2 100644 --- a/static/1.27.0/api/jpm/config.html +++ b/static/1.27.0/api/jpm/config.html @@ -112,111 +112,111 @@

Config

Index

-

config/builtin-configs config/config-checkers config/config-docs config/config-options config/config-parsers config/config-set config/defconf config/dyn:ar config/dyn:auto-shebang config/dyn:binpath config/dyn:build-type config/dyn:buildpath config/dyn:c++ config/dyn:c++-link config/dyn:cc config/dyn:cc-link config/dyn:cflags config/dyn:cflags-verbose config/dyn:config-file config/dyn:cppflags config/dyn:curlpath config/dyn:dest-dir config/dyn:dynamic-cflags config/dyn:dynamic-lflags config/dyn:gitpath config/dyn:headerpath config/dyn:is-msvc config/dyn:janet config/dyn:janet-cflags config/dyn:janet-importlib config/dyn:janet-lflags config/dyn:ldflags config/dyn:lflags config/dyn:libpath config/dyn:local config/dyn:manpath config/dyn:modext config/dyn:modpath config/dyn:nocolor config/dyn:offline config/dyn:optimize config/dyn:pkglist config/dyn:silent config/dyn:statext config/dyn:tarpath config/dyn:test config/dyn:tree config/dyn:update-pkgs config/dyn:use-batch-shell config/dyn:verbose config/dyn:workers config/load-config config/load-config-file config/load-default config/load-options config/opt config/read-env-variables config/save-config config/shorthand-mapping


config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.
Community Examples

config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).
Community Examples

config/config-docs table source
Table of all of the help text for each config option.
Community Examples

config/config-options table source
A table of possible options for enum option types.
Community Examples

config/config-parsers table source
A table of all of the dynamic config bindings to parsers.
Community Examples

config/config-set table source
Listing of all config dyns.
Community Examples

config/defconf macro source
(defconf kw &opt parser docs options)
+

config/builtin-configs config/config-checkers config/config-docs config/config-options config/config-parsers config/config-set config/defconf config/dyn:ar config/dyn:auto-shebang config/dyn:binpath config/dyn:build-type config/dyn:buildpath config/dyn:c++ config/dyn:c++-link config/dyn:cc config/dyn:cc-link config/dyn:cflags config/dyn:cflags-verbose config/dyn:config-file config/dyn:cppflags config/dyn:curlpath config/dyn:dest-dir config/dyn:dynamic-cflags config/dyn:dynamic-lflags config/dyn:gitpath config/dyn:headerpath config/dyn:is-msvc config/dyn:janet config/dyn:janet-cflags config/dyn:janet-importlib config/dyn:janet-lflags config/dyn:ldflags config/dyn:lflags config/dyn:libpath config/dyn:local config/dyn:manpath config/dyn:modext config/dyn:modpath config/dyn:nocolor config/dyn:offline config/dyn:optimize config/dyn:pkglist config/dyn:silent config/dyn:statext config/dyn:tarpath config/dyn:test config/dyn:tree config/dyn:update-pkgs config/dyn:use-batch-shell config/dyn:verbose config/dyn:workers config/load-config config/load-config-file config/load-default config/load-options config/opt config/read-env-variables config/save-config config/shorthand-mapping


config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.

config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).

config/config-docs table source
Table of all of the help text for each config option.

config/config-options table source
A table of possible options for enum option types.

config/config-parsers table source
A table of all of the dynamic config bindings to parsers.

config/config-set table source
Listing of all config dyns.

config/defconf macro source
(defconf kw &opt parser docs options)
 
-Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.
Community Examples

config/dyn:ar function source
(dyn:ar &opt dflt)
+Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.

config/dyn:ar function source
(dyn:ar &opt dflt)
 
-
Community Examples

config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
+

config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
 
-
Community Examples

config/dyn:binpath function source
(dyn:binpath &opt dflt)
+

config/dyn:binpath function source
(dyn:binpath &opt dflt)
 
-
Community Examples

config/dyn:build-type function source
(dyn:build-type &opt dflt)
+

config/dyn:build-type function source
(dyn:build-type &opt dflt)
 
-
Community Examples

config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
+

config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
 
-
Community Examples

config/dyn:c++ function source
(dyn:c++ &opt dflt)
+

config/dyn:c++ function source
(dyn:c++ &opt dflt)
 
-
Community Examples

config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
+

config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
 
-
Community Examples

config/dyn:cc function source
(dyn:cc &opt dflt)
+

config/dyn:cc function source
(dyn:cc &opt dflt)
 
-
Community Examples

config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
+

config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
 
-
Community Examples

config/dyn:cflags function source
(dyn:cflags &opt dflt)
+

config/dyn:cflags function source
(dyn:cflags &opt dflt)
 
-
Community Examples

config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
+

config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
 
-
Community Examples

config/dyn:config-file function source
(dyn:config-file &opt dflt)
+

config/dyn:config-file function source
(dyn:config-file &opt dflt)
 
-
Community Examples

config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
+

config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
 
-
Community Examples

config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
+

config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
 
-
Community Examples

config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
+

config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
 
-
Community Examples

config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
+

config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
 
-
Community Examples

config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
+

config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
 
-
Community Examples

config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
+

config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
 
-
Community Examples

config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
+

config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
 
-
Community Examples

config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
+

config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
 
-
Community Examples

config/dyn:janet function source
(dyn:janet &opt dflt)
+

config/dyn:janet function source
(dyn:janet &opt dflt)
 
-
Community Examples

config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
+

config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
 
-
Community Examples

config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
+

config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
 
-
Community Examples

config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
+

config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
 
-
Community Examples

config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
+

config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
 
-
Community Examples

config/dyn:lflags function source
(dyn:lflags &opt dflt)
+

config/dyn:lflags function source
(dyn:lflags &opt dflt)
 
-
Community Examples

config/dyn:libpath function source
(dyn:libpath &opt dflt)
+

config/dyn:libpath function source
(dyn:libpath &opt dflt)
 
-
Community Examples

config/dyn:local function source
(dyn:local &opt dflt)
+

config/dyn:local function source
(dyn:local &opt dflt)
 
-
Community Examples

config/dyn:manpath function source
(dyn:manpath &opt dflt)
+

config/dyn:manpath function source
(dyn:manpath &opt dflt)
 
-
Community Examples

config/dyn:modext function source
(dyn:modext &opt dflt)
+

config/dyn:modext function source
(dyn:modext &opt dflt)
 
-
Community Examples

config/dyn:modpath function source
(dyn:modpath &opt dflt)
+

config/dyn:modpath function source
(dyn:modpath &opt dflt)
 
-
Community Examples

config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
+

config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
 
-
Community Examples

config/dyn:offline function source
(dyn:offline &opt dflt)
+

config/dyn:offline function source
(dyn:offline &opt dflt)
 
-
Community Examples

config/dyn:optimize function source
(dyn:optimize &opt dflt)
+

config/dyn:optimize function source
(dyn:optimize &opt dflt)
 
-
Community Examples

config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
+

config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
 
-
Community Examples

config/dyn:silent function source
(dyn:silent &opt dflt)
+

config/dyn:silent function source
(dyn:silent &opt dflt)
 
-
Community Examples

config/dyn:statext function source
(dyn:statext &opt dflt)
+

config/dyn:statext function source
(dyn:statext &opt dflt)
 
-
Community Examples

config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
+

config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
 
-
Community Examples

config/dyn:test function source
(dyn:test &opt dflt)
+

config/dyn:test function source
(dyn:test &opt dflt)
 
-
Community Examples

config/dyn:tree function source
(dyn:tree &opt dflt)
+

config/dyn:tree function source
(dyn:tree &opt dflt)
 
-
Community Examples

config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
+

config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
 
-
Community Examples

config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
+

config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
 
-
Community Examples

config/dyn:verbose function source
(dyn:verbose &opt dflt)
+

config/dyn:verbose function source
(dyn:verbose &opt dflt)
 
-
Community Examples

config/dyn:workers function source
(dyn:workers &opt dflt)
+

config/dyn:workers function source
(dyn:workers &opt dflt)
 
-
Community Examples

config/load-config function source
(load-config settings &opt override)
+

config/load-config function source
(load-config settings &opt override)
 
-Load a configuration from a table or struct.
Community Examples

config/load-config-file function source
(load-config-file path &opt override)
+Load a configuration from a table or struct.

config/load-config-file function source
(load-config-file path &opt override)
 
-Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.
Community Examples

config/load-default function source
(load-default &opt override)
+Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.

config/load-default function source
(load-default &opt override)
 
-Load the default configuration.
Community Examples

config/load-options function source
(load-options &opt path)
+Load the default configuration.

config/load-options function source
(load-options &opt path)
 
-Load a file that contains config options that can be set. If no such file exists, then do nothing.
Community Examples

config/opt function source
(opt opts key &opt dflt)
+Load a file that contains config options that can be set. If no such file exists, then do nothing.

config/opt function source
(opt opts key &opt dflt)
 
-Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.
Community Examples

config/read-env-variables function source
(read-env-variables)
+Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.

config/read-env-variables function source
(read-env-variables)
 
-Read environment variables that correspond to config variables into dyns.
Community Examples

config/save-config function source
(save-config path)
+Read environment variables that correspond to config variables into dyns.

config/save-config function source
(save-config path)
 
-Write the current configuration information to a file.
Community Examples

config/shorthand-mapping struct source
Map some single characters to long options.
Community Examples
+Write the current configuration information to a file.

config/shorthand-mapping struct source
Map some single characters to long options.
Commands Configuration Generation diff --git a/static/1.27.0/api/jpm/dagbuild.html b/static/1.27.0/api/jpm/dagbuild.html index 57ddc10c..01f52919 100644 --- a/static/1.27.0/api/jpm/dagbuild.html +++ b/static/1.27.0/api/jpm/dagbuild.html @@ -114,9 +114,9 @@

Index

dagbuild/pdag dagbuild/pmap


dagbuild/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.
Community Examples

dagbuild/pmap function source
(pmap f data)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.

dagbuild/pmap function source
(pmap f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Community Examples
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Configuration Generation Project Management diff --git a/static/1.27.0/api/jpm/index.html b/static/1.27.0/api/jpm/index.html index ff148937..fa7e1cd2 100644 --- a/static/1.27.0/api/jpm/index.html +++ b/static/1.27.0/api/jpm/index.html @@ -114,307 +114,307 @@

Index

jpm/cc/archive-c jpm/cc/compile-c jpm/cc/create-buffer-c jpm/cc/create-buffer-c-impl jpm/cc/create-executable jpm/cc/embed-name jpm/cc/entry-name jpm/cc/entry-replace jpm/cc/link-c jpm/cc/make-bin-source jpm/cc/make-define jpm/cc/make-defines jpm/cc/modpath-to-meta jpm/cc/modpath-to-static jpm/cc/out-path jpm/cgen/add-loader jpm/cgen/ir jpm/cgen/mangle jpm/cgen/print-ir jpm/commands/build jpm/commands/clean jpm/commands/configure jpm/commands/deps jpm/commands/enable-local-mode jpm/commands/help jpm/commands/install jpm/commands/jpm-debug-repl jpm/commands/list-installed jpm/commands/list-pkgs jpm/commands/list-rules jpm/commands/list-tasks jpm/commands/new-c-project jpm/commands/new-project jpm/commands/quickbin jpm/commands/set-tree jpm/commands/show-paths jpm/commands/show-rule-tree jpm/commands/test jpm/commands/update-pkgs jpm/config/builtin-configs jpm/config/config-checkers jpm/config/config-docs jpm/config/config-options jpm/config/config-parsers jpm/config/config-set jpm/config/defconf jpm/config/dyn:ar jpm/config/dyn:auto-shebang jpm/config/dyn:binpath jpm/config/dyn:build-type jpm/config/dyn:buildpath jpm/config/dyn:c++ jpm/config/dyn:c++-link jpm/config/dyn:cc jpm/config/dyn:cc-link jpm/config/dyn:cflags jpm/config/dyn:cflags-verbose jpm/config/dyn:config-file jpm/config/dyn:cppflags jpm/config/dyn:curlpath jpm/config/dyn:dest-dir jpm/config/dyn:dynamic-cflags jpm/config/dyn:dynamic-lflags jpm/config/dyn:gitpath jpm/config/dyn:headerpath jpm/config/dyn:is-msvc jpm/config/dyn:janet jpm/config/dyn:janet-cflags jpm/config/dyn:janet-importlib jpm/config/dyn:janet-lflags jpm/config/dyn:ldflags jpm/config/dyn:lflags jpm/config/dyn:libpath jpm/config/dyn:local jpm/config/dyn:manpath jpm/config/dyn:modext jpm/config/dyn:modpath jpm/config/dyn:nocolor jpm/config/dyn:offline jpm/config/dyn:optimize jpm/config/dyn:pkglist jpm/config/dyn:silent jpm/config/dyn:statext jpm/config/dyn:tarpath jpm/config/dyn:test jpm/config/dyn:tree jpm/config/dyn:update-pkgs jpm/config/dyn:use-batch-shell jpm/config/dyn:verbose jpm/config/dyn:workers jpm/config/load-config jpm/config/load-config-file jpm/config/load-default jpm/config/load-options jpm/config/opt jpm/config/read-env-variables jpm/config/save-config jpm/config/shorthand-mapping jpm/dagbuild/pdag jpm/dagbuild/pmap jpm/make-config/auto jpm/make-config/generate-config jpm/pm/bundle-install jpm/pm/curl jpm/pm/do-rule jpm/pm/download-bundle jpm/pm/download-git-bundle jpm/pm/download-tar-bundle jpm/pm/git jpm/pm/import-rules jpm/pm/load-lockfile jpm/pm/load-project-meta jpm/pm/make-jpm-env jpm/pm/make-lockfile jpm/pm/out-of-tree-config jpm/pm/post-deps jpm/pm/require-jpm jpm/pm/resolve-bundle jpm/pm/tar jpm/pm/update-git-bundle jpm/pm/update-installed jpm/rules/add-body jpm/rules/add-dep jpm/rules/add-input jpm/rules/add-output jpm/rules/add-thunk jpm/rules/build-rules jpm/rules/getrules jpm/rules/phony jpm/rules/rule jpm/rules/sh-phony jpm/rules/sh-rule jpm/rules/sh-task jpm/rules/task jpm/scaffold/scaffold-project jpm/shutil/abspath jpm/shutil/basename jpm/shutil/clear-cache jpm/shutil/clear-manifest jpm/shutil/clexe-shell jpm/shutil/copy jpm/shutil/copyfile jpm/shutil/create-dirs jpm/shutil/devnull jpm/shutil/dirname jpm/shutil/drop1-shell jpm/shutil/exec-slurp jpm/shutil/filepath-replace jpm/shutil/find-build-dir jpm/shutil/find-cache jpm/shutil/find-manifest jpm/shutil/find-manifest-dir jpm/shutil/is-mingw jpm/shutil/is-win jpm/shutil/is-win-or-mingw jpm/shutil/path-splitter jpm/shutil/rimraf jpm/shutil/rm jpm/shutil/shell


jpm/cc/archive-c function source
(archive-c opts target & objects)
 
-Link object files together to make a static library.
Community Examples

jpm/cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
+Link object files together to make a static library.

jpm/cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
 
-Compile a C file into an object file.
Community Examples

jpm/cc/create-buffer-c function source
(create-buffer-c source dest name)
+Compile a C file into an object file.

jpm/cc/create-buffer-c function source
(create-buffer-c source dest name)
 
-Inline raw byte file as a c file.
Community Examples

jpm/cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
+Inline raw byte file as a c file.

jpm/cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
 
-
Community Examples

jpm/cc/create-executable function source
(create-executable opts source dest no-core)
+

jpm/cc/create-executable function source
(create-executable opts source dest no-core)
 
-Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.
Community Examples

jpm/cc/embed-name function source
(embed-name path)
+Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.

jpm/cc/embed-name function source
(embed-name path)
 
-Rename a janet symbol for embedding.
Community Examples

jpm/cc/entry-name function source
(entry-name name)
+Rename a janet symbol for embedding.

jpm/cc/entry-name function source
(entry-name name)
 
-Name of symbol that enters static compilation of a module.
Community Examples

jpm/cc/entry-replace function source
(entry-replace name)
+Name of symbol that enters static compilation of a module.

jpm/cc/entry-replace function source
(entry-replace name)
 
-Escape special characters in the entry-name
Community Examples

jpm/cc/link-c function source
(link-c has-cpp opts target & objects)
+Escape special characters in the entry-name

jpm/cc/link-c function source
(link-c has-cpp opts target & objects)
 
-Link C or C++ object files together to make a native module.
Community Examples

jpm/cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
+Link C or C++ object files together to make a native module.

jpm/cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
 
-
Community Examples

jpm/cc/make-define function source
(make-define define value)
+

jpm/cc/make-define function source
(make-define define value)
 
-Generate strings for adding custom defines to the compiler.
Community Examples

jpm/cc/make-defines function source
(make-defines defines)
+Generate strings for adding custom defines to the compiler.

jpm/cc/make-defines function source
(make-defines defines)
 
-Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.
Community Examples

jpm/cc/modpath-to-meta function source
(modpath-to-meta path)
+Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.

jpm/cc/modpath-to-meta function source
(modpath-to-meta path)
 
-Get the meta file path (.meta.janet) corresponding to a native module path (.so).
Community Examples

jpm/cc/modpath-to-static function source
(modpath-to-static path)
+Get the meta file path (.meta.janet) corresponding to a native module path (.so).

jpm/cc/modpath-to-static function source
(modpath-to-static path)
 
-Get the static library (.a) path corresponding to a native module path (.so).
Community Examples

jpm/cc/out-path function source
(out-path path from-ext to-ext)
+Get the static library (.a) path corresponding to a native module path (.so).

jpm/cc/out-path function source
(out-path path from-ext to-ext)
 
-Take a source file path and convert it to an output path.
Community Examples

jpm/cgen/add-loader function source
(add-loader)
+Take a source file path and convert it to an output path.

jpm/cgen/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

jpm/cgen/ir macro source
(ir & body)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

jpm/cgen/ir macro source
(ir & body)
 
-Macro that automatically quotes the body provided and calls (print-ir ...) on the body.
Community Examples

jpm/cgen/mangle function source
(mangle token)
+Macro that automatically quotes the body provided and calls (print-ir ...) on the body.

jpm/cgen/mangle function source
(mangle token)
 
-Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.
Community Examples

jpm/cgen/print-ir function source
(print-ir ir)
+Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.

jpm/cgen/print-ir function source
(print-ir ir)
 
-Compile the CGEN IR to C and print it to (dyn :out).
Community Examples

jpm/commands/build function source
(build)
+Compile the CGEN IR to C and print it to (dyn :out).

jpm/commands/build function source
(build)
 
-
Community Examples

jpm/commands/clean function source
(clean)
+

jpm/commands/clean function source
(clean)
 
-
Community Examples

jpm/commands/configure function source
(configure &opt path)
+

jpm/commands/configure function source
(configure &opt path)
 
-Setup an out-of-tree build with certain configuration options.
Community Examples

jpm/commands/deps function source
(deps)
+Setup an out-of-tree build with certain configuration options.

jpm/commands/deps function source
(deps)
 
-
Community Examples

jpm/commands/enable-local-mode function source
(enable-local-mode)
+

jpm/commands/enable-local-mode function source
(enable-local-mode)
 
-Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/
Community Examples

jpm/commands/help function source
(help)
+Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/

jpm/commands/help function source
(help)
 
-
Community Examples

jpm/commands/install function source
(install & repo)
+

jpm/commands/install function source
(install & repo)
 
-
Community Examples

jpm/commands/jpm-debug-repl function source
(jpm-debug-repl)
+

jpm/commands/jpm-debug-repl function source
(jpm-debug-repl)
 
-
Community Examples

jpm/commands/list-installed function source
(list-installed)
+

jpm/commands/list-installed function source
(list-installed)
 
-
Community Examples

jpm/commands/list-pkgs function source
(list-pkgs &opt search)
+

jpm/commands/list-pkgs function source
(list-pkgs &opt search)
 
-
Community Examples

jpm/commands/list-rules function source
(list-rules &opt ctx)
+

jpm/commands/list-rules function source
(list-rules &opt ctx)
 
-
Community Examples

jpm/commands/list-tasks function source
(list-tasks &opt ctx)
+

jpm/commands/list-tasks function source
(list-tasks &opt ctx)
 
-
Community Examples

jpm/commands/new-c-project function source
(new-c-project name)
+

jpm/commands/new-c-project function source
(new-c-project name)
 
-Create a new C project
Community Examples

jpm/commands/new-project function source
(new-project name)
+Create a new C project

jpm/commands/new-project function source
(new-project name)
 
-Create a new project
Community Examples

jpm/commands/quickbin function source
(quickbin input output)
+Create a new project

jpm/commands/quickbin function source
(quickbin input output)
 
-
Community Examples

jpm/commands/set-tree function source
(set-tree tree)
+

jpm/commands/set-tree function source
(set-tree tree)
 
-Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.
Community Examples

jpm/commands/show-paths function source
(show-paths)
+Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.

jpm/commands/show-paths function source
(show-paths)
 
-
Community Examples

jpm/commands/show-rule-tree function source
(show-rule-tree &opt root depth)
+

jpm/commands/show-rule-tree function source
(show-rule-tree &opt root depth)
 
-
Community Examples

jpm/commands/test function source
(test)
+

jpm/commands/test function source
(test)
 
-
Community Examples

jpm/commands/update-pkgs function source
(update-pkgs)
+

jpm/commands/update-pkgs function source
(update-pkgs)
 
-
Community Examples

jpm/config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.
Community Examples

jpm/config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).
Community Examples

jpm/config/config-docs table source
Table of all of the help text for each config option.
Community Examples

jpm/config/config-options table source
A table of possible options for enum option types.
Community Examples

jpm/config/config-parsers table source
A table of all of the dynamic config bindings to parsers.
Community Examples

jpm/config/config-set table source
Listing of all config dyns.
Community Examples

jpm/config/defconf macro source
(defconf kw &opt parser docs options)
+

jpm/config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.

jpm/config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).

jpm/config/config-docs table source
Table of all of the help text for each config option.

jpm/config/config-options table source
A table of possible options for enum option types.

jpm/config/config-parsers table source
A table of all of the dynamic config bindings to parsers.

jpm/config/config-set table source
Listing of all config dyns.

jpm/config/defconf macro source
(defconf kw &opt parser docs options)
 
-Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.
Community Examples

jpm/config/dyn:ar function source
(dyn:ar &opt dflt)
+Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.

jpm/config/dyn:ar function source
(dyn:ar &opt dflt)
 
-
Community Examples

jpm/config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
+

jpm/config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
 
-
Community Examples

jpm/config/dyn:binpath function source
(dyn:binpath &opt dflt)
+

jpm/config/dyn:binpath function source
(dyn:binpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:build-type function source
(dyn:build-type &opt dflt)
+

jpm/config/dyn:build-type function source
(dyn:build-type &opt dflt)
 
-
Community Examples

jpm/config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
+

jpm/config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:c++ function source
(dyn:c++ &opt dflt)
+

jpm/config/dyn:c++ function source
(dyn:c++ &opt dflt)
 
-
Community Examples

jpm/config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
+

jpm/config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
 
-
Community Examples

jpm/config/dyn:cc function source
(dyn:cc &opt dflt)
+

jpm/config/dyn:cc function source
(dyn:cc &opt dflt)
 
-
Community Examples

jpm/config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
+

jpm/config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
 
-
Community Examples

jpm/config/dyn:cflags function source
(dyn:cflags &opt dflt)
+

jpm/config/dyn:cflags function source
(dyn:cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
+

jpm/config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
 
-
Community Examples

jpm/config/dyn:config-file function source
(dyn:config-file &opt dflt)
+

jpm/config/dyn:config-file function source
(dyn:config-file &opt dflt)
 
-
Community Examples

jpm/config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
+

jpm/config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
+

jpm/config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
+

jpm/config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
 
-
Community Examples

jpm/config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
+

jpm/config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
+

jpm/config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
+

jpm/config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
+

jpm/config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
+

jpm/config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet function source
(dyn:janet &opt dflt)
+

jpm/config/dyn:janet function source
(dyn:janet &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
+

jpm/config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
+

jpm/config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
+

jpm/config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
+

jpm/config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:lflags function source
(dyn:lflags &opt dflt)
+

jpm/config/dyn:lflags function source
(dyn:lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:libpath function source
(dyn:libpath &opt dflt)
+

jpm/config/dyn:libpath function source
(dyn:libpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:local function source
(dyn:local &opt dflt)
+

jpm/config/dyn:local function source
(dyn:local &opt dflt)
 
-
Community Examples

jpm/config/dyn:manpath function source
(dyn:manpath &opt dflt)
+

jpm/config/dyn:manpath function source
(dyn:manpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:modext function source
(dyn:modext &opt dflt)
+

jpm/config/dyn:modext function source
(dyn:modext &opt dflt)
 
-
Community Examples

jpm/config/dyn:modpath function source
(dyn:modpath &opt dflt)
+

jpm/config/dyn:modpath function source
(dyn:modpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
+

jpm/config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
 
-
Community Examples

jpm/config/dyn:offline function source
(dyn:offline &opt dflt)
+

jpm/config/dyn:offline function source
(dyn:offline &opt dflt)
 
-
Community Examples

jpm/config/dyn:optimize function source
(dyn:optimize &opt dflt)
+

jpm/config/dyn:optimize function source
(dyn:optimize &opt dflt)
 
-
Community Examples

jpm/config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
+

jpm/config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
 
-
Community Examples

jpm/config/dyn:silent function source
(dyn:silent &opt dflt)
+

jpm/config/dyn:silent function source
(dyn:silent &opt dflt)
 
-
Community Examples

jpm/config/dyn:statext function source
(dyn:statext &opt dflt)
+

jpm/config/dyn:statext function source
(dyn:statext &opt dflt)
 
-
Community Examples

jpm/config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
+

jpm/config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:test function source
(dyn:test &opt dflt)
+

jpm/config/dyn:test function source
(dyn:test &opt dflt)
 
-
Community Examples

jpm/config/dyn:tree function source
(dyn:tree &opt dflt)
+

jpm/config/dyn:tree function source
(dyn:tree &opt dflt)
 
-
Community Examples

jpm/config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
+

jpm/config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
 
-
Community Examples

jpm/config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
+

jpm/config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
 
-
Community Examples

jpm/config/dyn:verbose function source
(dyn:verbose &opt dflt)
+

jpm/config/dyn:verbose function source
(dyn:verbose &opt dflt)
 
-
Community Examples

jpm/config/dyn:workers function source
(dyn:workers &opt dflt)
+

jpm/config/dyn:workers function source
(dyn:workers &opt dflt)
 
-
Community Examples

jpm/config/load-config function source
(load-config settings &opt override)
+

jpm/config/load-config function source
(load-config settings &opt override)
 
-Load a configuration from a table or struct.
Community Examples

jpm/config/load-config-file function source
(load-config-file path &opt override)
+Load a configuration from a table or struct.

jpm/config/load-config-file function source
(load-config-file path &opt override)
 
-Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.
Community Examples

jpm/config/load-default function source
(load-default &opt override)
+Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.

jpm/config/load-default function source
(load-default &opt override)
 
-Load the default configuration.
Community Examples

jpm/config/load-options function source
(load-options &opt path)
+Load the default configuration.

jpm/config/load-options function source
(load-options &opt path)
 
-Load a file that contains config options that can be set. If no such file exists, then do nothing.
Community Examples

jpm/config/opt function source
(opt opts key &opt dflt)
+Load a file that contains config options that can be set. If no such file exists, then do nothing.

jpm/config/opt function source
(opt opts key &opt dflt)
 
-Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.
Community Examples

jpm/config/read-env-variables function source
(read-env-variables)
+Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.

jpm/config/read-env-variables function source
(read-env-variables)
 
-Read environment variables that correspond to config variables into dyns.
Community Examples

jpm/config/save-config function source
(save-config path)
+Read environment variables that correspond to config variables into dyns.

jpm/config/save-config function source
(save-config path)
 
-Write the current configuration information to a file.
Community Examples

jpm/config/shorthand-mapping struct source
Map some single characters to long options.
Community Examples

jpm/dagbuild/pdag function source
(pdag f dag &opt n-workers)
+Write the current configuration information to a file.

jpm/config/shorthand-mapping struct source
Map some single characters to long options.

jpm/dagbuild/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.
Community Examples

jpm/dagbuild/pmap function source
(pmap f data)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.

jpm/dagbuild/pmap function source
(pmap f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Community Examples

jpm/make-config/auto function source
(auto)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.

jpm/make-config/auto function source
(auto)
 
-Get an autodetected config.
Community Examples

jpm/make-config/generate-config function source
(generate-config &opt destdir silent as-data)
+Get an autodetected config.

jpm/make-config/generate-config function source
(generate-config &opt destdir silent as-data)
 
-Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Community Examples

jpm/pm/bundle-install function source
(bundle-install bundle &opt no-deps)
+Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.

jpm/pm/bundle-install function source
(bundle-install bundle &opt no-deps)
 
-Install a bundle from a git repository.
Community Examples

jpm/pm/curl function source
(curl & args)
+Install a bundle from a git repository.

jpm/pm/curl function source
(curl & args)
 
-Make a call to curl
Community Examples

jpm/pm/do-rule function source
(do-rule target)
+Make a call to curl

jpm/pm/do-rule function source
(do-rule target)
 
-Evaluate a given rule in a one-off manner.
Community Examples

jpm/pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
+Evaluate a given rule in a one-off manner.

jpm/pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
 
-Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.
Community Examples

jpm/pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
+Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.

jpm/pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
 
-Download a git bundle from a remote respository
Community Examples

jpm/pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
+Download a git bundle from a remote respository

jpm/pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
 
-Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.
Community Examples

jpm/pm/git function source
(git & args)
+Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.

jpm/pm/git function source
(git & args)
 
-Make a call to git.
Community Examples

jpm/pm/import-rules function source
(import-rules path &opt base-env)
+Make a call to git.

jpm/pm/import-rules function source
(import-rules path &opt base-env)
 
-Import another file that defines more rules. This ruleset is merged into the current ruleset.
Community Examples

jpm/pm/load-lockfile function source
(load-lockfile &opt filename)
+Import another file that defines more rules. This ruleset is merged into the current ruleset.

jpm/pm/load-lockfile function source
(load-lockfile &opt filename)
 
-Load packages from a lockfile.
Community Examples

jpm/pm/load-project-meta function source
(load-project-meta &opt path)
+Load packages from a lockfile.

jpm/pm/load-project-meta function source
(load-project-meta &opt path)
 
-Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.
Community Examples

jpm/pm/make-jpm-env function source
(make-jpm-env &opt base-env)
+Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.

jpm/pm/make-jpm-env function source
(make-jpm-env &opt base-env)
 
-Create an environment that is preloaded with jpm symbols.
Community Examples

jpm/pm/make-lockfile function source
(make-lockfile &opt filename)
+Create an environment that is preloaded with jpm symbols.

jpm/pm/make-lockfile function source
(make-lockfile &opt filename)
 
-
Community Examples

jpm/pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
+

jpm/pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
 
-Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.
Community Examples

jpm/pm/post-deps macro source
(post-deps & body)
+Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.

jpm/pm/post-deps macro source
(post-deps & body)
 
-Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.
Community Examples

jpm/pm/require-jpm function source
(require-jpm path &opt base-env)
+Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.

jpm/pm/require-jpm function source
(require-jpm path &opt base-env)
 
-Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.
Community Examples

jpm/pm/resolve-bundle function source
(resolve-bundle bundle)
+Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.

jpm/pm/resolve-bundle function source
(resolve-bundle bundle)
 
-Convert any bundle string/table to the normalized table form.
Community Examples

jpm/pm/tar function source
(tar & args)
+Convert any bundle string/table to the normalized table form.

jpm/pm/tar function source
(tar & args)
 
-Make a call to tar.
Community Examples

jpm/pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
+Make a call to tar.

jpm/pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
 
-Fetch latest tag version from remote repository
Community Examples

jpm/pm/update-installed function source
(update-installed)
+Fetch latest tag version from remote repository

jpm/pm/update-installed function source
(update-installed)
 
-Update all previously installed packages to their latest versions.
Community Examples

jpm/rules/add-body macro source
(add-body target & body)
+Update all previously installed packages to their latest versions.

jpm/rules/add-body macro source
(add-body target & body)
 
-Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.
Community Examples

jpm/rules/add-dep function source
(add-dep target dep)
+Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.

jpm/rules/add-dep function source
(add-dep target dep)
 
-Alias for `add-input`
Community Examples

jpm/rules/add-input function source
(add-input target input)
+Alias for `add-input`

jpm/rules/add-input function source
(add-input target input)
 
-Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.
Community Examples

jpm/rules/add-output function source
(add-output target output)
+Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.

jpm/rules/add-output function source
(add-output target output)
 
-Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.
Community Examples

jpm/rules/add-thunk function source
(add-thunk target thunk)
+Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.

jpm/rules/add-thunk function source
(add-thunk target thunk)
 
-Append a thunk to a target's recipe.
Community Examples

jpm/rules/build-rules function source
(build-rules rules targets &opt n-workers)
+Append a thunk to a target's recipe.

jpm/rules/build-rules function source
(build-rules rules targets &opt n-workers)
 
-Given a graph of all rules, extract a work graph that will build out-of-date files.
Community Examples

jpm/rules/getrules function source
(getrules)
+Given a graph of all rules, extract a work graph that will build out-of-date files.

jpm/rules/getrules function source
(getrules)
 
-
Community Examples

jpm/rules/phony macro source
(phony target deps & body)
+

jpm/rules/phony macro source
(phony target deps & body)
 
-Alias for `task`.
Community Examples

jpm/rules/rule macro source
(rule target deps & body)
+Alias for `task`.

jpm/rules/rule macro source
(rule target deps & body)
 
-Add a rule to the rule graph.
Community Examples

jpm/rules/sh-phony macro source
(sh-phony target deps & body)
+Add a rule to the rule graph.

jpm/rules/sh-phony macro source
(sh-phony target deps & body)
 
-Alias for `sh-task`.
Community Examples

jpm/rules/sh-rule macro source
(sh-rule target deps & body)
+Alias for `sh-task`.

jpm/rules/sh-rule macro source
(sh-rule target deps & body)
 
-Add a rule that invokes a shell command, and fails if the command returns non-zero.
Community Examples

jpm/rules/sh-task macro source
(sh-task target deps & body)
+Add a rule that invokes a shell command, and fails if the command returns non-zero.

jpm/rules/sh-task macro source
(sh-task target deps & body)
 
-Add a task that invokes a shell command, and fails if the command returns non-zero.
Community Examples

jpm/rules/task macro source
(task target deps & body)
+Add a task that invokes a shell command, and fails if the command returns non-zero.

jpm/rules/task macro source
(task target deps & body)
 
-Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
Community Examples

jpm/scaffold/scaffold-project function source
(scaffold-project name &opt options)
+Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).

jpm/scaffold/scaffold-project function source
(scaffold-project name &opt options)
 
-Generate a standardized project scaffold.
Community Examples

jpm/shutil/abspath function source
(abspath path)
+Generate a standardized project scaffold.

jpm/shutil/abspath function source
(abspath path)
 
-Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).
Community Examples

jpm/shutil/basename function source
(basename path)
+Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).

jpm/shutil/basename function source
(basename path)
 
-Get the filename of a path without any leading directory components.
Community Examples

jpm/shutil/clear-cache function source
(clear-cache)
+Get the filename of a path without any leading directory components.

jpm/shutil/clear-cache function source
(clear-cache)
 
-Clear the global git cache.
Community Examples

jpm/shutil/clear-manifest function source
(clear-manifest)
+Clear the global git cache.

jpm/shutil/clear-manifest function source
(clear-manifest)
 
-Clear the global installation manifest.
Community Examples

jpm/shutil/clexe-shell function source
(clexe-shell & args)
+Clear the global installation manifest.

jpm/shutil/clexe-shell function source
(clexe-shell & args)
 
-
Community Examples

jpm/shutil/copy function source
(copy src dest)
+

jpm/shutil/copy function source
(copy src dest)
 
-Copy a file or directory recursively from one location to another.
Community Examples

jpm/shutil/copyfile function source
(copyfile src dest)
+Copy a file or directory recursively from one location to another.

jpm/shutil/copyfile function source
(copyfile src dest)
 
-Copy a file one location to another.
Community Examples

jpm/shutil/create-dirs function source
(create-dirs dest)
+Copy a file one location to another.

jpm/shutil/create-dirs function source
(create-dirs dest)
 
-Create all directories needed for a file (mkdir -p).
Community Examples

jpm/shutil/devnull function source
(devnull)
+Create all directories needed for a file (mkdir -p).

jpm/shutil/devnull function source
(devnull)
 
-
Community Examples

jpm/shutil/dirname function source
(dirname path)
+

jpm/shutil/dirname function source
(dirname path)
 
-Get the directory of a file without the filename.
Community Examples

jpm/shutil/drop1-shell function source
(drop1-shell std args)
+Get the directory of a file without the filename.

jpm/shutil/drop1-shell function source
(drop1-shell std args)
 
-Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.
Community Examples

jpm/shutil/exec-slurp function source
(exec-slurp & args)
+Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.

jpm/shutil/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

jpm/shutil/filepath-replace function source
(filepath-replace repo)
+Read stdout of subprocess and return it trimmed in a string.

jpm/shutil/filepath-replace function source
(filepath-replace repo)
 
-Remove special characters from a string or path to make it into a path segment.
Community Examples

jpm/shutil/find-build-dir function source
(find-build-dir)
+Remove special characters from a string or path to make it into a path segment.

jpm/shutil/find-build-dir function source
(find-build-dir)
 
-Gets the build directory to output files to.
Community Examples

jpm/shutil/find-cache function source
(find-cache)
+Gets the build directory to output files to.

jpm/shutil/find-cache function source
(find-cache)
 
-Return the path to the global cache.
Community Examples

jpm/shutil/find-manifest function source
(find-manifest name)
+Return the path to the global cache.

jpm/shutil/find-manifest function source
(find-manifest name)
 
-Get the full path of a manifest file given a package name.
Community Examples

jpm/shutil/find-manifest-dir function source
(find-manifest-dir)
+Get the full path of a manifest file given a package name.

jpm/shutil/find-manifest-dir function source
(find-manifest-dir)
 
-Get the path to the directory containing manifests for installed packages.
Community Examples

jpm/shutil/is-mingw function source
(is-mingw)
+Get the path to the directory containing manifests for installed packages.

jpm/shutil/is-mingw function source
(is-mingw)
 
-Check if built with mingw
Community Examples

jpm/shutil/is-win function source
(is-win)
+Check if built with mingw

jpm/shutil/is-win function source
(is-win)
 
-Check if we should assume a DOS-like shell or default to posix shell.
Community Examples

jpm/shutil/is-win-or-mingw function source
(is-win-or-mingw)
+Check if we should assume a DOS-like shell or default to posix shell.

jpm/shutil/is-win-or-mingw function source
(is-win-or-mingw)
 
-Check if built with mingw
Community Examples

jpm/shutil/path-splitter core/peg source
split paths on / and \.
Community Examples

jpm/shutil/rimraf function source
(rimraf path)
+Check if built with mingw

jpm/shutil/path-splitter core/peg source
split paths on / and \.

jpm/shutil/rimraf function source
(rimraf path)
 
-Hard delete directory tree
Community Examples

jpm/shutil/rm function source
(rm path)
+Hard delete directory tree

jpm/shutil/rm function source
(rm path)
 
-Remove a directory and all sub directories.
Community Examples

jpm/shutil/shell function source
(shell & args)
+Remove a directory and all sub directories.

jpm/shutil/shell function source
(shell & args)
 
-Do a shell command
Community Examples
+Do a shell command
Integer Types Module Build Rules diff --git a/static/1.27.0/api/jpm/make-config.html b/static/1.27.0/api/jpm/make-config.html index 2499dd72..49f0d093 100644 --- a/static/1.27.0/api/jpm/make-config.html +++ b/static/1.27.0/api/jpm/make-config.html @@ -114,9 +114,9 @@

Index

make-config/auto make-config/generate-config


make-config/auto function source
(auto)
 
-Get an autodetected config.
Community Examples

make-config/generate-config function source
(generate-config &opt destdir silent as-data)
+Get an autodetected config.

make-config/generate-config function source
(generate-config &opt destdir silent as-data)
 
-Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Community Examples
+Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Config DAG Build diff --git a/static/1.27.0/api/jpm/pm.html b/static/1.27.0/api/jpm/pm.html index 9d2f2287..a9c9aa3c 100644 --- a/static/1.27.0/api/jpm/pm.html +++ b/static/1.27.0/api/jpm/pm.html @@ -114,43 +114,43 @@

Index

pm/bundle-install pm/curl pm/do-rule pm/download-bundle pm/download-git-bundle pm/download-tar-bundle pm/git pm/import-rules pm/load-lockfile pm/load-project-meta pm/make-jpm-env pm/make-lockfile pm/out-of-tree-config pm/post-deps pm/require-jpm pm/resolve-bundle pm/tar pm/update-git-bundle pm/update-installed


pm/bundle-install function source
(bundle-install bundle &opt no-deps)
 
-Install a bundle from a git repository.
Community Examples

pm/curl function source
(curl & args)
+Install a bundle from a git repository.

pm/curl function source
(curl & args)
 
-Make a call to curl
Community Examples

pm/do-rule function source
(do-rule target)
+Make a call to curl

pm/do-rule function source
(do-rule target)
 
-Evaluate a given rule in a one-off manner.
Community Examples

pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
+Evaluate a given rule in a one-off manner.

pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
 
-Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.
Community Examples

pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
+Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.

pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
 
-Download a git bundle from a remote respository
Community Examples

pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
+Download a git bundle from a remote respository

pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
 
-Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.
Community Examples

pm/git function source
(git & args)
+Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.

pm/git function source
(git & args)
 
-Make a call to git.
Community Examples

pm/import-rules function source
(import-rules path &opt base-env)
+Make a call to git.

pm/import-rules function source
(import-rules path &opt base-env)
 
-Import another file that defines more rules. This ruleset is merged into the current ruleset.
Community Examples

pm/load-lockfile function source
(load-lockfile &opt filename)
+Import another file that defines more rules. This ruleset is merged into the current ruleset.

pm/load-lockfile function source
(load-lockfile &opt filename)
 
-Load packages from a lockfile.
Community Examples

pm/load-project-meta function source
(load-project-meta &opt path)
+Load packages from a lockfile.

pm/load-project-meta function source
(load-project-meta &opt path)
 
-Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.
Community Examples

pm/make-jpm-env function source
(make-jpm-env &opt base-env)
+Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.

pm/make-jpm-env function source
(make-jpm-env &opt base-env)
 
-Create an environment that is preloaded with jpm symbols.
Community Examples

pm/make-lockfile function source
(make-lockfile &opt filename)
+Create an environment that is preloaded with jpm symbols.

pm/make-lockfile function source
(make-lockfile &opt filename)
 
-
Community Examples

pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
+

pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
 
-Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.
Community Examples

pm/post-deps macro source
(post-deps & body)
+Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.

pm/post-deps macro source
(post-deps & body)
 
-Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.
Community Examples

pm/require-jpm function source
(require-jpm path &opt base-env)
+Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.

pm/require-jpm function source
(require-jpm path &opt base-env)
 
-Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.
Community Examples

pm/resolve-bundle function source
(resolve-bundle bundle)
+Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.

pm/resolve-bundle function source
(resolve-bundle bundle)
 
-Convert any bundle string/table to the normalized table form.
Community Examples

pm/tar function source
(tar & args)
+Convert any bundle string/table to the normalized table form.

pm/tar function source
(tar & args)
 
-Make a call to tar.
Community Examples

pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
+Make a call to tar.

pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
 
-Fetch latest tag version from remote repository
Community Examples

pm/update-installed function source
(update-installed)
+Fetch latest tag version from remote repository

pm/update-installed function source
(update-installed)
 
-Update all previously installed packages to their latest versions.
Community Examples
+Update all previously installed packages to their latest versions.
DAG Build Project Scaffolding diff --git a/static/1.27.0/api/jpm/rules.html b/static/1.27.0/api/jpm/rules.html index e0bf0c47..07835b75 100644 --- a/static/1.27.0/api/jpm/rules.html +++ b/static/1.27.0/api/jpm/rules.html @@ -114,31 +114,31 @@

Index

rules/add-body rules/add-dep rules/add-input rules/add-output rules/add-thunk rules/build-rules rules/getrules rules/phony rules/rule rules/sh-phony rules/sh-rule rules/sh-task rules/task


rules/add-body macro source
(add-body target & body)
 
-Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.
Community Examples

rules/add-dep function source
(add-dep target dep)
+Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.

rules/add-dep function source
(add-dep target dep)
 
-Alias for `add-input`
Community Examples

rules/add-input function source
(add-input target input)
+Alias for `add-input`

rules/add-input function source
(add-input target input)
 
-Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.
Community Examples

rules/add-output function source
(add-output target output)
+Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.

rules/add-output function source
(add-output target output)
 
-Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.
Community Examples

rules/add-thunk function source
(add-thunk target thunk)
+Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.

rules/add-thunk function source
(add-thunk target thunk)
 
-Append a thunk to a target's recipe.
Community Examples

rules/build-rules function source
(build-rules rules targets &opt n-workers)
+Append a thunk to a target's recipe.

rules/build-rules function source
(build-rules rules targets &opt n-workers)
 
-Given a graph of all rules, extract a work graph that will build out-of-date files.
Community Examples

rules/getrules function source
(getrules)
+Given a graph of all rules, extract a work graph that will build out-of-date files.

rules/getrules function source
(getrules)
 
-
Community Examples

rules/phony macro source
(phony target deps & body)
+

rules/phony macro source
(phony target deps & body)
 
-Alias for `task`.
Community Examples

rules/rule macro source
(rule target deps & body)
+Alias for `task`.

rules/rule macro source
(rule target deps & body)
 
-Add a rule to the rule graph.
Community Examples

rules/sh-phony macro source
(sh-phony target deps & body)
+Add a rule to the rule graph.

rules/sh-phony macro source
(sh-phony target deps & body)
 
-Alias for `sh-task`.
Community Examples

rules/sh-rule macro source
(sh-rule target deps & body)
+Alias for `sh-task`.

rules/sh-rule macro source
(sh-rule target deps & body)
 
-Add a rule that invokes a shell command, and fails if the command returns non-zero.
Community Examples

rules/sh-task macro source
(sh-task target deps & body)
+Add a rule that invokes a shell command, and fails if the command returns non-zero.

rules/sh-task macro source
(sh-task target deps & body)
 
-Add a task that invokes a shell command, and fails if the command returns non-zero.
Community Examples

rules/task macro source
(task target deps & body)
+Add a task that invokes a shell command, and fails if the command returns non-zero.

rules/task macro source
(task target deps & body)
 
-Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
Community Examples
+Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
JPM C Compiler diff --git a/static/1.27.0/api/jpm/scaffold.html b/static/1.27.0/api/jpm/scaffold.html index a31eeccf..d40e9c7f 100644 --- a/static/1.27.0/api/jpm/scaffold.html +++ b/static/1.27.0/api/jpm/scaffold.html @@ -114,7 +114,7 @@

Index

scaffold/scaffold-project


scaffold/scaffold-project function source
(scaffold-project name &opt options)
 
-Generate a standardized project scaffold.
Community Examples
+Generate a standardized project scaffold.
Project Management Shell Utilities diff --git a/static/1.27.0/api/jpm/shutil.html b/static/1.27.0/api/jpm/shutil.html index ac319f03..cabda915 100644 --- a/static/1.27.0/api/jpm/shutil.html +++ b/static/1.27.0/api/jpm/shutil.html @@ -114,51 +114,51 @@

Index

shutil/abspath shutil/basename shutil/clear-cache shutil/clear-manifest shutil/clexe-shell shutil/copy shutil/copyfile shutil/create-dirs shutil/devnull shutil/dirname shutil/drop1-shell shutil/exec-slurp shutil/filepath-replace shutil/find-build-dir shutil/find-cache shutil/find-manifest shutil/find-manifest-dir shutil/is-mingw shutil/is-win shutil/is-win-or-mingw shutil/path-splitter shutil/rimraf shutil/rm shutil/shell


shutil/abspath function source
(abspath path)
 
-Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).
Community Examples

shutil/basename function source
(basename path)
+Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).

shutil/basename function source
(basename path)
 
-Get the filename of a path without any leading directory components.
Community Examples

shutil/clear-cache function source
(clear-cache)
+Get the filename of a path without any leading directory components.

shutil/clear-cache function source
(clear-cache)
 
-Clear the global git cache.
Community Examples

shutil/clear-manifest function source
(clear-manifest)
+Clear the global git cache.

shutil/clear-manifest function source
(clear-manifest)
 
-Clear the global installation manifest.
Community Examples

shutil/clexe-shell function source
(clexe-shell & args)
+Clear the global installation manifest.

shutil/clexe-shell function source
(clexe-shell & args)
 
-
Community Examples

shutil/copy function source
(copy src dest)
+

shutil/copy function source
(copy src dest)
 
-Copy a file or directory recursively from one location to another.
Community Examples

shutil/copyfile function source
(copyfile src dest)
+Copy a file or directory recursively from one location to another.

shutil/copyfile function source
(copyfile src dest)
 
-Copy a file one location to another.
Community Examples

shutil/create-dirs function source
(create-dirs dest)
+Copy a file one location to another.

shutil/create-dirs function source
(create-dirs dest)
 
-Create all directories needed for a file (mkdir -p).
Community Examples

shutil/devnull function source
(devnull)
+Create all directories needed for a file (mkdir -p).

shutil/devnull function source
(devnull)
 
-
Community Examples

shutil/dirname function source
(dirname path)
+

shutil/dirname function source
(dirname path)
 
-Get the directory of a file without the filename.
Community Examples

shutil/drop1-shell function source
(drop1-shell std args)
+Get the directory of a file without the filename.

shutil/drop1-shell function source
(drop1-shell std args)
 
-Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.
Community Examples

shutil/exec-slurp function source
(exec-slurp & args)
+Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.

shutil/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

shutil/filepath-replace function source
(filepath-replace repo)
+Read stdout of subprocess and return it trimmed in a string.

shutil/filepath-replace function source
(filepath-replace repo)
 
-Remove special characters from a string or path to make it into a path segment.
Community Examples

shutil/find-build-dir function source
(find-build-dir)
+Remove special characters from a string or path to make it into a path segment.

shutil/find-build-dir function source
(find-build-dir)
 
-Gets the build directory to output files to.
Community Examples

shutil/find-cache function source
(find-cache)
+Gets the build directory to output files to.

shutil/find-cache function source
(find-cache)
 
-Return the path to the global cache.
Community Examples

shutil/find-manifest function source
(find-manifest name)
+Return the path to the global cache.

shutil/find-manifest function source
(find-manifest name)
 
-Get the full path of a manifest file given a package name.
Community Examples

shutil/find-manifest-dir function source
(find-manifest-dir)
+Get the full path of a manifest file given a package name.

shutil/find-manifest-dir function source
(find-manifest-dir)
 
-Get the path to the directory containing manifests for installed packages.
Community Examples

shutil/is-mingw function source
(is-mingw)
+Get the path to the directory containing manifests for installed packages.

shutil/is-mingw function source
(is-mingw)
 
-Check if built with mingw
Community Examples

shutil/is-win function source
(is-win)
+Check if built with mingw

shutil/is-win function source
(is-win)
 
-Check if we should assume a DOS-like shell or default to posix shell.
Community Examples

shutil/is-win-or-mingw function source
(is-win-or-mingw)
+Check if we should assume a DOS-like shell or default to posix shell.

shutil/is-win-or-mingw function source
(is-win-or-mingw)
 
-Check if built with mingw
Community Examples

shutil/path-splitter core/peg source
split paths on / and \.
Community Examples

shutil/rimraf function source
(rimraf path)
+Check if built with mingw

shutil/path-splitter core/peg source
split paths on / and \.

shutil/rimraf function source
(rimraf path)
 
-Hard delete directory tree
Community Examples

shutil/rm function source
(rm path)
+Hard delete directory tree

shutil/rm function source
(rm path)
 
-Remove a directory and all sub directories.
Community Examples

shutil/shell function source
(shell & args)
+Remove a directory and all sub directories.

shutil/shell function source
(shell & args)
 
-Do a shell command
Community Examples
+Do a shell command
Project Scaffolding Math Module diff --git a/static/1.27.0/api/spork/argparse.html b/static/1.27.0/api/spork/argparse.html index cb79f6fa..998bdc32 100644 --- a/static/1.27.0/api/spork/argparse.html +++ b/static/1.27.0/api/spork/argparse.html @@ -144,7 +144,7 @@

Index Once parsed, values are accessible in the returned table by the name of the option. For example `(result "verbose")` will check if the verbose -flag is enabled.Community Examples

+flag is enabled.
Spork Base64 diff --git a/static/1.27.0/api/spork/base64.html b/static/1.27.0/api/spork/base64.html index ccb8bb47..1bc44823 100644 --- a/static/1.27.0/api/spork/base64.html +++ b/static/1.27.0/api/spork/base64.html @@ -115,9 +115,9 @@

Index

base64/decode base64/encode


base64/decode function source
(decode s)
 
 Converts a base64 encoded string to its binary representation of any format
-(UTF-8, binary, ..).
Community Examples

base64/encode function source
(encode s)
+(UTF-8, binary, ..).

base64/encode function source
(encode s)
 
-Converts a string of any format (UTF-8, binary, ..) to base64 encoding.
Community Examples
+Converts a string of any format (UTF-8, binary, ..) to base64 encoding.

Argument Parsing CRC diff --git a/static/1.27.0/api/spork/crc.html b/static/1.27.0/api/spork/crc.html index 52e44de9..38b16fee 100644 --- a/static/1.27.0/api/spork/crc.html +++ b/static/1.27.0/api/spork/crc.html @@ -114,9 +114,9 @@

Index

crc/make-variant crc/named-variant


crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
 
-Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.
Community Examples

crc/named-variant cfunction source
(crc/named-variant name)
+Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.

crc/named-variant cfunction source
(crc/named-variant name)
 
-Get a named CRC variant.
Community Examples
+Get a named CRC variant.
Base64 Cron diff --git a/static/1.27.0/api/spork/cron.html b/static/1.27.0/api/spork/cron.html index 66a8de93..01b8c49c 100644 --- a/static/1.27.0/api/spork/cron.html +++ b/static/1.27.0/api/spork/cron.html @@ -114,11 +114,11 @@

Index

cron/check cron/next-timestamp cron/parse-cron


cron/check function source
(check cron &opt time local)
 
-Check if a given time matches a cron specifier.
Community Examples

cron/next-timestamp function source
(next-timestamp cron &opt time local)
+Check if a given time matches a cron specifier.

cron/next-timestamp function source
(next-timestamp cron &opt time local)
 
-Given a cron schedule, get the next instance on the cron tab after time
Community Examples

cron/parse-cron function source
(parse-cron str)
+Given a cron schedule, get the next instance on the cron tab after time

cron/parse-cron function source
(parse-cron str)
 
-Parse a cron string into a valid cron schedule object
Community Examples
+Parse a cron string into a valid cron schedule object
CRC EV Utilities diff --git a/static/1.27.0/api/spork/ev-utils.html b/static/1.27.0/api/spork/ev-utils.html index 3f06a707..f6b4b0c3 100644 --- a/static/1.27.0/api/spork/ev-utils.html +++ b/static/1.27.0/api/spork/ev-utils.html @@ -114,27 +114,27 @@

Index

ev-utils/go-nursery ev-utils/join-nursery ev-utils/multithread-service ev-utils/nursery ev-utils/pcall ev-utils/pdag ev-utils/pmap ev-utils/pmap-full ev-utils/pmap-limited ev-utils/spawn-nursery ev-utils/wait-cancel


ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
 
-Spawn a fiber into a nursery, similar to ev/go.
Community Examples

ev-utils/join-nursery function source
(join-nursery nurse)
+Spawn a fiber into a nursery, similar to ev/go.

ev-utils/join-nursery function source
(join-nursery nurse)
 
-Suspend the current fiber until the nursery is emptied.
Community Examples

ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
+Suspend the current fiber until the nursery is emptied.

ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
 
-Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.
Community Examples

ev-utils/nursery function source
(nursery)
+Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.

ev-utils/nursery function source
(nursery)
 
-Group a number of fibers into a single object for structured concurrency
Community Examples

ev-utils/pcall function source
(pcall f n)
+Group a number of fibers into a single object for structured concurrency

ev-utils/pcall function source
(pcall f n)
 
-Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.
Community Examples

ev-utils/pdag function source
(pdag f dag &opt n-workers)
+Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.

ev-utils/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.
Community Examples

ev-utils/pmap function source
(pmap f data &opt n-workers)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.

ev-utils/pmap function source
(pmap f data &opt n-workers)
 
-Map `f` over data in parallel, optionally limiting parallelism to `n` workers.
Community Examples

ev-utils/pmap-full function source
(pmap-full f data)
+Map `f` over data in parallel, optionally limiting parallelism to `n` workers.

ev-utils/pmap-full function source
(pmap-full f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.
Community Examples

ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.

ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
 
-Similar to pmap-full, but only runs work n-ways parallel.
Community Examples

ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
+Similar to pmap-full, but only runs work n-ways parallel.

ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
 
-Similar to ev/spawn but associate spawned fibers with a nursery
Community Examples

ev-utils/wait-cancel macro source
(wait-cancel & body)
+Similar to ev/spawn but associate spawned fibers with a nursery

ev-utils/wait-cancel macro source
(wait-cancel & body)
 
-Wait forever until the current fiber is canceled, and then run some cleanup code.
Community Examples
+Wait forever until the current fiber is canceled, and then run some cleanup code.
Cron Format diff --git a/static/1.27.0/api/spork/fmt.html b/static/1.27.0/api/spork/fmt.html index a988b9de..1a10a232 100644 --- a/static/1.27.0/api/spork/fmt.html +++ b/static/1.27.0/api/spork/fmt.html @@ -114,11 +114,11 @@

Index

fmt/format fmt/format-file fmt/format-print


fmt/format function source
(format source)
 
-Format a string of source code to a buffer.
Community Examples

fmt/format-file function source
(format-file file)
+Format a string of source code to a buffer.

fmt/format-file function source
(format-file file)
 
-Format a file
Community Examples

fmt/format-print function source
(format-print source)
+Format a file

fmt/format-print function source
(format-print source)
 
-Format a string of source code and print the result.
Community Examples
+Format a string of source code and print the result.
EV Utilities Generators diff --git a/static/1.27.0/api/spork/generators.html b/static/1.27.0/api/spork/generators.html index 0cb2b8e8..2c694f5c 100644 --- a/static/1.27.0/api/spork/generators.html +++ b/static/1.27.0/api/spork/generators.html @@ -114,35 +114,35 @@

Index

generators/concat generators/cycle generators/drop generators/drop-until generators/drop-while generators/filter generators/from-iterable generators/map generators/mapcat generators/range generators/run generators/take generators/take-until generators/take-while generators/to-array


generators/concat function source
(concat & xs)
 
-Concatenate one or more generators or iterables into a single generator.
Community Examples

generators/cycle function source
(cycle ds)
+Concatenate one or more generators or iterables into a single generator.

generators/cycle function source
(cycle ds)
 
-Repeatedly yield the elements of `ds`, looping back to the beginning when finished.
Community Examples

generators/drop function source
(drop n ds)
+Repeatedly yield the elements of `ds`, looping back to the beginning when finished.

generators/drop function source
(drop n ds)
 
-Drop `n` elements from `ds`.
Community Examples

generators/drop-until function source
(drop-until p ds)
+Drop `n` elements from `ds`.

generators/drop-until function source
(drop-until p ds)
 
-Drop elements from `ds` until `p` is true.
Community Examples

generators/drop-while function source
(drop-while p ds)
+Drop elements from `ds` until `p` is true.

generators/drop-while function source
(drop-while p ds)
 
-Drop elements from `ds` while `p` is true.
Community Examples

generators/filter function source
(filter p ds)
+Drop elements from `ds` while `p` is true.

generators/filter function source
(filter p ds)
 
-Create a generator that filters `ds` with `p`.
Community Examples

generators/from-iterable function source
(from-iterable ds)
+Create a generator that filters `ds` with `p`.

generators/from-iterable function source
(from-iterable ds)
 
-Create a new generator around any iterable data structure.
Community Examples

generators/map function source
(map f ds)
+Create a new generator around any iterable data structure.

generators/map function source
(map f ds)
 
-Create a generator that maps `f` over `ds`.
Community Examples

generators/mapcat function source
(mapcat f ds)
+Create a generator that maps `f` over `ds`.

generators/mapcat function source
(mapcat f ds)
 
-Map `f` over `ds`, concatenating the results into a new generator.
Community Examples

generators/range function source
(range from to)
+Map `f` over `ds`, concatenating the results into a new generator.

generators/range function source
(range from to)
 
-Create a lazy range.
Community Examples

generators/run function source
(run s)
+Create a lazy range.

generators/run function source
(run s)
 
-Evaluate `s` for side effects.
Community Examples

generators/take function source
(take n ds)
+Evaluate `s` for side effects.

generators/take function source
(take n ds)
 
-Take `n` elements from iterable `ds`.
Community Examples

generators/take-until function source
(take-until p ds)
+Take `n` elements from iterable `ds`.

generators/take-until function source
(take-until p ds)
 
-Return elements from `ds` until `p` is true.
Community Examples

generators/take-while function source
(take-while p ds)
+Return elements from `ds` until `p` is true.

generators/take-while function source
(take-while p ds)
 
-Return elements from `ds` while `p` is true.
Community Examples

generators/to-array function source
(to-array s)
+Return elements from `ds` while `p` is true.

generators/to-array function source
(to-array s)
 
-Consume `s` into a new array.
Community Examples
+Consume `s` into a new array.
Format Getline diff --git a/static/1.27.0/api/spork/getline.html b/static/1.27.0/api/spork/getline.html index dee2c5c5..65678dd5 100644 --- a/static/1.27.0/api/spork/getline.html +++ b/static/1.27.0/api/spork/getline.html @@ -114,13 +114,13 @@

Index

getline/default-autocomplete-context getline/default-autocomplete-options getline/default-doc-fetch getline/make-getline getline/max-history


getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
 
-Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.
Community Examples

getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
+Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.

getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
 
-Default handler to get available autocomplete options for a given substring.
Community Examples

getline/default-doc-fetch function source
(default-doc-fetch sym w &)
+Default handler to get available autocomplete options for a given substring.

getline/default-doc-fetch function source
(default-doc-fetch sym w &)
 
-Default handler for Ctrl-G to lookup docstrings in the current environment.
Community Examples

getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
+Default handler for Ctrl-G to lookup docstrings in the current environment.

getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
 
-Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.
Community Examples

getline/max-history number source
Maximal amount of items in the history
Community Examples
+Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.

getline/max-history number source
Maximal amount of items in the history
Generators HTML Generation diff --git a/static/1.27.0/api/spork/htmlgen.html b/static/1.27.0/api/spork/htmlgen.html index 146246bc..80808fe7 100644 --- a/static/1.27.0/api/spork/htmlgen.html +++ b/static/1.27.0/api/spork/htmlgen.html @@ -112,13 +112,13 @@

HTML Generation

Index

-

htmlgen/doctype-html htmlgen/escape htmlgen/html htmlgen/raw


htmlgen/doctype-html function source
The html5 doctype header
Community Examples

htmlgen/escape function source
(escape x)
+

htmlgen/doctype-html htmlgen/escape htmlgen/html htmlgen/raw


htmlgen/doctype-html function source
The html5 doctype header

htmlgen/escape function source
(escape x)
 
-Escape characters in a string for HTML
Community Examples

htmlgen/html function source
(html data &opt buf)
+Escape characters in a string for HTML

htmlgen/html function source
(html data &opt buf)
 
-Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.
Community Examples

htmlgen/raw function source
(raw text)
+Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.

htmlgen/raw function source
(raw text)
 
-Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Community Examples
+Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Getline HTTP diff --git a/static/1.27.0/api/spork/http.html b/static/1.27.0/api/spork/http.html index 94fafaec..b7572710 100644 --- a/static/1.27.0/api/spork/http.html +++ b/static/1.27.0/api/spork/http.html @@ -112,29 +112,29 @@

HTTP

Index

-

http/cookie-grammar http/cookies http/logger http/middleware http/query-string-grammar http/read-body http/read-request http/read-response http/request http/request-peg http/response-peg http/router http/send-response http/server http/server-handler http/status-messages http/url-grammar


http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.
Community Examples

http/cookies function source
(cookies nextmw)
+

http/cookie-grammar http/cookies http/logger http/middleware http/query-string-grammar http/read-body http/read-request http/read-response http/request http/request-peg http/response-peg http/router http/send-response http/server http/server-handler http/status-messages http/url-grammar


http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.

http/cookies function source
(cookies nextmw)
 
-Parses cookies into the table under :cookies key
Community Examples

http/logger function source
(logger nextmw)
+Parses cookies into the table under :cookies key

http/logger function source
(logger nextmw)
 
-Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.
Community Examples

http/middleware function source
(middleware x)
+Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.

http/middleware function source
(middleware x)
 
-Coerce any type to http middleware
Community Examples

http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.
Community Examples

http/read-body function source
(read-body req)
+Coerce any type to http middleware

http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.

http/read-body function source
(read-body req)
 
-Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.
Community Examples

http/read-request function source
(read-request conn buf &opt no-query)
+Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.

http/read-request function source
(read-request conn buf &opt no-query)
 
-Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`
Community Examples

http/read-response function source
(read-response conn buf)
+Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`

http/read-response function source
(read-response conn buf)
 
-Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`
Community Examples

http/request function source
(request method url &keys {:headers headers :body body})
+Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`

http/request function source
(request method url &keys {:headers headers :body body})
 
-Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.
Community Examples

http/request-peg core/peg source
PEG for parsing HTTP requests
Community Examples

http/response-peg core/peg source
PEG for parsing HTTP responses
Community Examples

http/router function source
(router routes)
+Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.

http/request-peg core/peg source
PEG for parsing HTTP requests

http/response-peg core/peg source
PEG for parsing HTTP responses

http/router function source
(router routes)
 
-Creates a router middleware. A router will dispatch to different routes based on the URL path.
Community Examples

http/send-response function source
(send-response conn response &opt buf)
+Creates a router middleware. A router will dispatch to different routes based on the URL path.

http/send-response function source
(send-response conn response &opt buf)
 
-Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.
Community Examples

http/server function source
(server handler &opt host port)
+Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.

http/server function source
(server handler &opt host port)
 
-Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.
Community Examples

http/server-handler function source
(server-handler conn handler)
+Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.

http/server-handler function source
(server-handler conn handler)
 
-A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.
Community Examples

http/status-messages struct source
Mapping of HTTP status codes to their status message.
Community Examples

http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
Community Examples
+A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.

http/status-messages struct source
Mapping of HTTP status codes to their status message.

http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
HTML Generation HTTP Framework diff --git a/static/1.27.0/api/spork/httpf.html b/static/1.27.0/api/spork/httpf.html index 68fc41d2..851c8756 100644 --- a/static/1.27.0/api/spork/httpf.html +++ b/static/1.27.0/api/spork/httpf.html @@ -114,15 +114,15 @@

Index

httpf/add-bindings-as-routes httpf/add-route httpf/default-payload-wrapper httpf/listen httpf/server


httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
 
-Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.
Community Examples

httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
+Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.

httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
 
-Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.
Community Examples

httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
+Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.

httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
 
-Add some metadata to all responses
Community Examples

httpf/listen function source
(listen server &opt host port n-workers)
+Add some metadata to all responses

httpf/listen function source
(listen server &opt host port n-workers)
 
-Start server
Community Examples

httpf/server function source
(server &opt parent)
+Start server

httpf/server function source
(server &opt parent)
 
-Create a new server.
Community Examples
+Create a new server.
HTTP JSON diff --git a/static/1.27.0/api/spork/index.html b/static/1.27.0/api/spork/index.html index 93f8a41a..c5d77d15 100644 --- a/static/1.27.0/api/spork/index.html +++ b/static/1.27.0/api/spork/index.html @@ -149,238 +149,238 @@

Spork

Once parsed, values are accessible in the returned table by the name of the option. For example `(result "verbose")` will check if the verbose -flag is enabled.Community Examples

spork/base64/decode function source
(decode s)
+flag is enabled.

spork/base64/decode function source
(decode s)
 
 Converts a base64 encoded string to its binary representation of any format
-(UTF-8, binary, ..).
Community Examples

spork/base64/encode function source
(encode s)
+(UTF-8, binary, ..).

spork/base64/encode function source
(encode s)
 
-Converts a string of any format (UTF-8, binary, ..) to base64 encoding.
Community Examples

spork/crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
+Converts a string of any format (UTF-8, binary, ..) to base64 encoding.

spork/crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
 
-Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.
Community Examples

spork/crc/named-variant cfunction source
(crc/named-variant name)
+Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.

spork/crc/named-variant cfunction source
(crc/named-variant name)
 
-Get a named CRC variant.
Community Examples

spork/cron/check function source
(check cron &opt time local)
+Get a named CRC variant.

spork/cron/check function source
(check cron &opt time local)
 
-Check if a given time matches a cron specifier.
Community Examples

spork/cron/next-timestamp function source
(next-timestamp cron &opt time local)
+Check if a given time matches a cron specifier.

spork/cron/next-timestamp function source
(next-timestamp cron &opt time local)
 
-Given a cron schedule, get the next instance on the cron tab after time
Community Examples

spork/cron/parse-cron function source
(parse-cron str)
+Given a cron schedule, get the next instance on the cron tab after time

spork/cron/parse-cron function source
(parse-cron str)
 
-Parse a cron string into a valid cron schedule object
Community Examples

spork/ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
+Parse a cron string into a valid cron schedule object

spork/ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
 
-Spawn a fiber into a nursery, similar to ev/go.
Community Examples

spork/ev-utils/join-nursery function source
(join-nursery nurse)
+Spawn a fiber into a nursery, similar to ev/go.

spork/ev-utils/join-nursery function source
(join-nursery nurse)
 
-Suspend the current fiber until the nursery is emptied.
Community Examples

spork/ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
+Suspend the current fiber until the nursery is emptied.

spork/ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
 
-Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.
Community Examples

spork/ev-utils/nursery function source
(nursery)
+Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.

spork/ev-utils/nursery function source
(nursery)
 
-Group a number of fibers into a single object for structured concurrency
Community Examples

spork/ev-utils/pcall function source
(pcall f n)
+Group a number of fibers into a single object for structured concurrency

spork/ev-utils/pcall function source
(pcall f n)
 
-Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.
Community Examples

spork/ev-utils/pdag function source
(pdag f dag &opt n-workers)
+Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.

spork/ev-utils/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.
Community Examples

spork/ev-utils/pmap function source
(pmap f data &opt n-workers)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.

spork/ev-utils/pmap function source
(pmap f data &opt n-workers)
 
-Map `f` over data in parallel, optionally limiting parallelism to `n` workers.
Community Examples

spork/ev-utils/pmap-full function source
(pmap-full f data)
+Map `f` over data in parallel, optionally limiting parallelism to `n` workers.

spork/ev-utils/pmap-full function source
(pmap-full f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.
Community Examples

spork/ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.

spork/ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
 
-Similar to pmap-full, but only runs work n-ways parallel.
Community Examples

spork/ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
+Similar to pmap-full, but only runs work n-ways parallel.

spork/ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
 
-Similar to ev/spawn but associate spawned fibers with a nursery
Community Examples

spork/ev-utils/wait-cancel macro source
(wait-cancel & body)
+Similar to ev/spawn but associate spawned fibers with a nursery

spork/ev-utils/wait-cancel macro source
(wait-cancel & body)
 
-Wait forever until the current fiber is canceled, and then run some cleanup code.
Community Examples

spork/fmt/format function source
(format source)
+Wait forever until the current fiber is canceled, and then run some cleanup code.

spork/fmt/format function source
(format source)
 
-Format a string of source code to a buffer.
Community Examples

spork/fmt/format-file function source
(format-file file)
+Format a string of source code to a buffer.

spork/fmt/format-file function source
(format-file file)
 
-Format a file
Community Examples

spork/fmt/format-print function source
(format-print source)
+Format a file

spork/fmt/format-print function source
(format-print source)
 
-Format a string of source code and print the result.
Community Examples

spork/generators/concat function source
(concat & xs)
+Format a string of source code and print the result.

spork/generators/concat function source
(concat & xs)
 
-Concatenate one or more generators or iterables into a single generator.
Community Examples

spork/generators/cycle function source
(cycle ds)
+Concatenate one or more generators or iterables into a single generator.

spork/generators/cycle function source
(cycle ds)
 
-Repeatedly yield the elements of `ds`, looping back to the beginning when finished.
Community Examples

spork/generators/drop function source
(drop n ds)
+Repeatedly yield the elements of `ds`, looping back to the beginning when finished.

spork/generators/drop function source
(drop n ds)
 
-Drop `n` elements from `ds`.
Community Examples

spork/generators/drop-until function source
(drop-until p ds)
+Drop `n` elements from `ds`.

spork/generators/drop-until function source
(drop-until p ds)
 
-Drop elements from `ds` until `p` is true.
Community Examples

spork/generators/drop-while function source
(drop-while p ds)
+Drop elements from `ds` until `p` is true.

spork/generators/drop-while function source
(drop-while p ds)
 
-Drop elements from `ds` while `p` is true.
Community Examples

spork/generators/filter function source
(filter p ds)
+Drop elements from `ds` while `p` is true.

spork/generators/filter function source
(filter p ds)
 
-Create a generator that filters `ds` with `p`.
Community Examples

spork/generators/from-iterable function source
(from-iterable ds)
+Create a generator that filters `ds` with `p`.

spork/generators/from-iterable function source
(from-iterable ds)
 
-Create a new generator around any iterable data structure.
Community Examples

spork/generators/map function source
(map f ds)
+Create a new generator around any iterable data structure.

spork/generators/map function source
(map f ds)
 
-Create a generator that maps `f` over `ds`.
Community Examples

spork/generators/mapcat function source
(mapcat f ds)
+Create a generator that maps `f` over `ds`.

spork/generators/mapcat function source
(mapcat f ds)
 
-Map `f` over `ds`, concatenating the results into a new generator.
Community Examples

spork/generators/range function source
(range from to)
+Map `f` over `ds`, concatenating the results into a new generator.

spork/generators/range function source
(range from to)
 
-Create a lazy range.
Community Examples

spork/generators/run function source
(run s)
+Create a lazy range.

spork/generators/run function source
(run s)
 
-Evaluate `s` for side effects.
Community Examples

spork/generators/take function source
(take n ds)
+Evaluate `s` for side effects.

spork/generators/take function source
(take n ds)
 
-Take `n` elements from iterable `ds`.
Community Examples

spork/generators/take-until function source
(take-until p ds)
+Take `n` elements from iterable `ds`.

spork/generators/take-until function source
(take-until p ds)
 
-Return elements from `ds` until `p` is true.
Community Examples

spork/generators/take-while function source
(take-while p ds)
+Return elements from `ds` until `p` is true.

spork/generators/take-while function source
(take-while p ds)
 
-Return elements from `ds` while `p` is true.
Community Examples

spork/generators/to-array function source
(to-array s)
+Return elements from `ds` while `p` is true.

spork/generators/to-array function source
(to-array s)
 
-Consume `s` into a new array.
Community Examples

spork/getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
+Consume `s` into a new array.

spork/getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
 
-Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.
Community Examples

spork/getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
+Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.

spork/getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
 
-Default handler to get available autocomplete options for a given substring.
Community Examples

spork/getline/default-doc-fetch function source
(default-doc-fetch sym w &)
+Default handler to get available autocomplete options for a given substring.

spork/getline/default-doc-fetch function source
(default-doc-fetch sym w &)
 
-Default handler for Ctrl-G to lookup docstrings in the current environment.
Community Examples

spork/getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
+Default handler for Ctrl-G to lookup docstrings in the current environment.

spork/getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
 
-Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.
Community Examples

spork/getline/max-history number source
Maximal amount of items in the history
Community Examples

spork/htmlgen/doctype-html function source
The html5 doctype header
Community Examples

spork/htmlgen/escape function source
(escape x)
+Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.

spork/getline/max-history number source
Maximal amount of items in the history

spork/htmlgen/doctype-html function source
The html5 doctype header

spork/htmlgen/escape function source
(escape x)
 
-Escape characters in a string for HTML
Community Examples

spork/htmlgen/html function source
(html data &opt buf)
+Escape characters in a string for HTML

spork/htmlgen/html function source
(html data &opt buf)
 
-Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.
Community Examples

spork/htmlgen/raw function source
(raw text)
+Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.

spork/htmlgen/raw function source
(raw text)
 
-Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Community Examples

spork/http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.
Community Examples

spork/http/cookies function source
(cookies nextmw)
+Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.

spork/http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.

spork/http/cookies function source
(cookies nextmw)
 
-Parses cookies into the table under :cookies key
Community Examples

spork/http/logger function source
(logger nextmw)
+Parses cookies into the table under :cookies key

spork/http/logger function source
(logger nextmw)
 
-Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.
Community Examples

spork/http/middleware function source
(middleware x)
+Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.

spork/http/middleware function source
(middleware x)
 
-Coerce any type to http middleware
Community Examples

spork/http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.
Community Examples

spork/http/read-body function source
(read-body req)
+Coerce any type to http middleware

spork/http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.

spork/http/read-body function source
(read-body req)
 
-Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.
Community Examples

spork/http/read-request function source
(read-request conn buf &opt no-query)
+Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.

spork/http/read-request function source
(read-request conn buf &opt no-query)
 
-Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`
Community Examples

spork/http/read-response function source
(read-response conn buf)
+Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`

spork/http/read-response function source
(read-response conn buf)
 
-Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`
Community Examples

spork/http/request function source
(request method url &keys {:headers headers :body body})
+Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`

spork/http/request function source
(request method url &keys {:headers headers :body body})
 
-Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.
Community Examples

spork/http/request-peg core/peg source
PEG for parsing HTTP requests
Community Examples

spork/http/response-peg core/peg source
PEG for parsing HTTP responses
Community Examples

spork/http/router function source
(router routes)
+Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.

spork/http/request-peg core/peg source
PEG for parsing HTTP requests

spork/http/response-peg core/peg source
PEG for parsing HTTP responses

spork/http/router function source
(router routes)
 
-Creates a router middleware. A router will dispatch to different routes based on the URL path.
Community Examples

spork/http/send-response function source
(send-response conn response &opt buf)
+Creates a router middleware. A router will dispatch to different routes based on the URL path.

spork/http/send-response function source
(send-response conn response &opt buf)
 
-Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.
Community Examples

spork/http/server function source
(server handler &opt host port)
+Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.

spork/http/server function source
(server handler &opt host port)
 
-Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.
Community Examples

spork/http/server-handler function source
(server-handler conn handler)
+Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.

spork/http/server-handler function source
(server-handler conn handler)
 
-A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.
Community Examples

spork/http/status-messages struct source
Mapping of HTTP status codes to their status message.
Community Examples

spork/http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
Community Examples

spork/httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
+A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.

spork/http/status-messages struct source
Mapping of HTTP status codes to their status message.

spork/http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.

spork/httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
 
-Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.
Community Examples

spork/httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
+Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.

spork/httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
 
-Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.
Community Examples

spork/httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
+Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.

spork/httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
 
-Add some metadata to all responses
Community Examples

spork/httpf/listen function source
(listen server &opt host port n-workers)
+Add some metadata to all responses

spork/httpf/listen function source
(listen server &opt host port n-workers)
 
-Start server
Community Examples

spork/httpf/server function source
(server &opt parent)
+Start server

spork/httpf/server function source
(server &opt parent)
 
-Create a new server.
Community Examples

spork/json/decode cfunction
(json/decode json-source &opt keywords nils)
+Create a new server.

spork/json/decode cfunction
(json/decode json-source &opt keywords nils)
 
-Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.
Community Examples

spork/json/encode cfunction
(json/encode x &opt tab newline buf)
+Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.

spork/json/encode cfunction
(json/encode x &opt tab newline buf)
 
-Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
Community Examples

spork/mdz/*front-matter* keyword source
Dynamic binding to front matter after parsing, compilation, and evaluation, of markup completes.
Community Examples

spork/mdz/*markup-dom* keyword source
The htmlgen source that can be used to generate a document with htmlgen/html.
Community Examples

spork/mdz/add-loader function source
(add-loader)
+Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.

spork/mdz/*front-matter* keyword source
Dynamic binding to front matter after parsing, compilation, and evaluation, of markup completes.

spork/mdz/*markup-dom* keyword source
The htmlgen source that can be used to generate a document with htmlgen/html.

spork/mdz/add-loader function source
(add-loader)
 
-Allow importing and requiring markup as a module
Community Examples

spork/mdz/anchor function source
(anchor name & content)
+Allow importing and requiring markup as a module

spork/mdz/anchor function source
(anchor name & content)
 
-Create an in-page anchor for a local link.
Community Examples

spork/mdz/bigger function source
(bigger content)
+Create an in-page anchor for a local link.

spork/mdz/bigger function source
(bigger content)
 
-Make span element with bigger font
Community Examples

spork/mdz/blockquote function source
(blockquote content)
+Make span element with bigger font

spork/mdz/blockquote function source
(blockquote content)
 
-Make a block quote element
Community Examples

spork/mdz/center function source
(center content)
+Make a block quote element

spork/mdz/center function source
(center content)
 
-Center some content
Community Examples

spork/mdz/code function source
(code content)
+Center some content

spork/mdz/code function source
(code content)
 
-Make code element with class mendoza-code
Community Examples

spork/mdz/codeblock function source
(codeblock lang &opt source)
+Make code element with class mendoza-code

spork/mdz/codeblock function source
(codeblock lang &opt source)
 
-Inline code or codeblock
Community Examples

spork/mdz/div function
Make a div element
Community Examples

spork/mdz/em function
Make a em element
Community Examples

spork/mdz/hr function source
(hr)
+Inline code or codeblock

spork/mdz/div function
Make a div element

spork/mdz/em function
Make a em element

spork/mdz/hr function source
(hr)
 
-Add a horizontal rule
Community Examples

spork/mdz/html function source
(html source)
+Add a horizontal rule

spork/mdz/html function source
(html source)
 
-Embed some raw html
Community Examples

spork/mdz/image function source
(image src alt)
+Embed some raw html

spork/mdz/image function source
(image src alt)
 
-Make an image element
Community Examples

spork/mdz/li function
Make a li element
Community Examples

spork/mdz/link function source
(link url &opt content)
+Make an image element

spork/mdz/li function
Make a li element

spork/mdz/link function source
(link url &opt content)
 
-Create an anchor link
Community Examples

spork/mdz/markup function source
(markup source &opt env where)
+Create an anchor link

spork/mdz/markup function source
(markup source &opt env where)
 
-Parse mendoza markup and evaluate it returning an htmlgen document tree.
Community Examples

spork/mdz/mdz-loader function source
(mdz-loader path &)
+Parse mendoza markup and evaluate it returning an htmlgen document tree.

spork/mdz/mdz-loader function source
(mdz-loader path &)
 
-Loader for the mdz format
Community Examples

spork/mdz/ol function
Make a ol element
Community Examples

spork/mdz/p function
Make a p element
Community Examples

spork/mdz/pre function
Make a pre element
Community Examples

spork/mdz/section function source
(section name content)
+Loader for the mdz format

spork/mdz/ol function
Make a ol element

spork/mdz/p function
Make a p element

spork/mdz/pre function
Make a pre element

spork/mdz/section function source
(section name content)
 
-Create a section. Usually used to embed different parts of the content document into different parts of the main page.
Community Examples

spork/mdz/smaller function source
(smaller content)
+Create a section. Usually used to embed different parts of the content document into different parts of the main page.

spork/mdz/smaller function source
(smaller content)
 
-Make span element with smaller font
Community Examples

spork/mdz/strong function
Make a strong element
Community Examples

spork/mdz/sub function
Make a sub element
Community Examples

spork/mdz/sup function
Make a sup element
Community Examples

spork/mdz/tag function source
(tag name content)
+Make span element with smaller font

spork/mdz/strong function
Make a strong element

spork/mdz/sub function
Make a sub element

spork/mdz/sup function
Make a sup element

spork/mdz/tag function source
(tag name content)
 
-Wrap some content in an html tag. If you need attributes or other properties, you may want to use raw HTML via the html function.
Community Examples

spork/mdz/td function
Make a td element
Community Examples

spork/mdz/th function
Make a th element
Community Examples

spork/mdz/tr function
Make a tr element
Community Examples

spork/mdz/u function
Make a u element
Community Examples

spork/mdz/ul function
Make a ul element
Community Examples

spork/misc/always function source
(always x)
+Wrap some content in an html tag. If you need attributes or other properties, you may want to use raw HTML via the html function.

spork/mdz/td function
Make a td element

spork/mdz/th function
Make a th element

spork/mdz/tr function
Make a tr element

spork/mdz/u function
Make a u element

spork/mdz/ul function
Make a ul element

spork/misc/always function source
(always x)
 
-Return a function that discards any arguments and always returns `x`.
Community Examples

spork/misc/antepenultimate function source
(antepenultimate xs)
+Return a function that discards any arguments and always returns `x`.

spork/misc/antepenultimate function source
(antepenultimate xs)
 
-Get the third-to-last element from an indexed data structure.
Community Examples

spork/misc/caperr macro source
(caperr & body)
+Get the third-to-last element from an indexed data structure.

spork/misc/caperr macro source
(caperr & body)
 
 Captures the standart error output of the variadic `body` and returns it
-as a buffer.
Community Examples

spork/misc/capout macro source
(capout & body)
+as a buffer.

spork/misc/capout macro source
(capout & body)
 
 Captures the standart output of the variadic `body` and returns it as
-a buffer.
Community Examples

spork/misc/cond-> macro source
(cond-> val & clauses)
+a buffer.

spork/misc/cond-> macro source
(cond-> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs with condition and operation to which the `val`,
 is put as first argument. All conditions are tried and
 for truthy conditions the operation is executed.
-Returns the value mutated if any condition is truthy.
Community Examples

spork/misc/cond->> macro source
(cond->> val & clauses)
+Returns the value mutated if any condition is truthy.

spork/misc/cond->> macro source
(cond->> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs of condition and operation to which the `val`,
 is put as last argument. All conditions are tried and
 for truthy the operation is ran.
-Returns mutated value if any condition is truthy.
Community Examples

spork/misc/dedent function source
(dedent & xs)
+Returns mutated value if any condition is truthy.

spork/misc/dedent function source
(dedent & xs)
 
 Remove indentation after concatenating the arguments. Works by removing
 leading whitespace, and then removing that same pattern of whitepsace after
-new lines.
Community Examples

spork/misc/defs macro source
(defs & bindings)
+new lines.

spork/misc/defs macro source
(defs & bindings)
 
-Defines many constants as in let `bindings`, but without creating new scope.
Community Examples

spork/misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
+Defines many constants as in let `bindings`, but without creating new scope.

spork/misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
 
 Do a depth first, pre-order traversal over a data structure.
 Also allow for callbacks before and after visiting the children
 of a node. Also allow for a custom `get-children` function to
 change traversal as needed. Will detect cycles if an empty table
 is passed as the `seen` parameter, which is used to cached values
-that have been visited.
Community Examples

spork/misc/do-def macro source
(do-def c d & body)
+that have been visited.

spork/misc/do-def macro source
(do-def c d & body)
 
 Convenience macro for defining constant named `c` with value `d` before `body`
 and returning it after evaluating `body`, that presumably modifies 
-the `c` refered content. For example buffer, table or array.
Community Examples

spork/misc/do-var macro source
(do-var v d & body)
+the `c` refered content. For example buffer, table or array.

spork/misc/do-var macro source
(do-var v d & body)
 
 Convenience macro for defining varible named `v` with value `d` before `body`
-and returning it after evaluating `body`, that presumably modifies `v`.
Community Examples

spork/misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
+and returning it after evaluating `body`, that presumably modifies `v`.

spork/misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
 
-Same as print-table but pushes table into a buffer.
Community Examples

spork/misc/gett macro source
(gett ds & keys)
+Same as print-table but pushes table into a buffer.

spork/misc/gett macro source
(gett ds & keys)
 
-Recursive macro (get). Similar to get-in, but keys are variadic argument.
Community Examples

spork/misc/insert-sorted function source
(insert-sorted arr <? & xs)
+Recursive macro (get). Similar to get-in, but keys are variadic argument.

spork/misc/insert-sorted function source
(insert-sorted arr <? & xs)
 
 Insert elements in `arr` such that it remains sorted by the comparator. If
-`arr` is not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

spork/misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
+`arr` is not sorted beforehand, the results are undefined. Returns `arr`.

spork/misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
 
 Insert elements in `arr` such that it remains sorted by the value returned
 when `f` is called with the element, comparing the values with <. If `arr` is
-not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

spork/misc/int->string function source
(int->string int &opt base)
+not sorted beforehand, the results are undefined. Returns `arr`.

spork/misc/int->string function source
(int->string int &opt base)
 
-Stringify an integer in a particular base. Defaults to decimal (base 10).
Community Examples

spork/misc/int/ function source
(int/ & xs)
+Stringify an integer in a particular base. Defaults to decimal (base 10).

spork/misc/int/ function source
(int/ & xs)
 
-Perform integer division.
Community Examples

spork/misc/log macro source
(log level & args)
+Perform integer division.

spork/misc/log macro source
(log level & args)
 
 Print to a dynamic binding stream if that stream is set, otherwise do
 nothing. Evaluate to nil. 
 For example, `(log :err "value error: %V" my-value)` will print 
-to `(dyn :err)` only if `(dyn :err)` has been set.
Community Examples

spork/misc/make macro source
(make prototype & pairs)
+to `(dyn :err)` only if `(dyn :err)` has been set.

spork/misc/make macro source
(make prototype & pairs)
 
 Convenience macro for creating new table from even number of kvs pairs in a variadic `table-or-pairs`
 arguments and setting its prototype to `prototype`.
-Factory function for creating new objects from prototypes.
Community Examples

spork/misc/make-id function source
(make-id &opt prefix)
+Factory function for creating new objects from prototypes.

spork/misc/make-id function source
(make-id &opt prefix)
 
 Create a random, printable keyword id with 10 bytes of entropy
-with an optional prefix.
Community Examples

spork/misc/map-keys function source
(map-keys f data)
+with an optional prefix.

spork/misc/map-keys function source
(map-keys f data)
 
 Returns new table with function `f` applied to `data`'s
-keys recursively.
Community Examples

spork/misc/map-vals function source
(map-vals f data)
+keys recursively.

spork/misc/map-vals function source
(map-vals f data)
 
-Returns new table with function `f` applied to `data`'s values.
Community Examples

spork/misc/penultimate function source
(penultimate xs)
+Returns new table with function `f` applied to `data`'s values.

spork/misc/penultimate function source
(penultimate xs)
 
-Get the second-to-last element from an indexed data structure.
Community Examples

spork/misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
+Get the second-to-last element from an indexed data structure.

spork/misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
 
 Iterate through the rows of a data structure and print a table in a human
 readable way, with padding and heading information. Can optionally provide
@@ -388,302 +388,302 @@ 

Spork

for each row. Lastly, a `header-mapping` dictionary can be provided that changes the printed header names by mapping column keys to the desired header name. If no mapping is found, then the column key will be used as -the header name. Returns nil.
Community Examples

spork/misc/randomize-array function source
(randomize-array arr &opt rng)
+the header name. Returns nil.

spork/misc/randomize-array function source
(randomize-array arr &opt rng)
 
 Randomizes array using the fisher-yates shuffle, takes an optional random
-number generator.
Community Examples

spork/misc/second function source
(second xs)
+number generator.

spork/misc/second function source
(second xs)
 
-Get the second element from an indexed data structure.
Community Examples

spork/misc/select-keys function source
(select-keys data keyz)
+Get the second element from an indexed data structure.

spork/misc/select-keys function source
(select-keys data keyz)
 
-Returns new table with selected `keyz` from dictionary `data`.
Community Examples

spork/misc/set* macro source
(set* tgts exprs)
+Returns new table with selected `keyz` from dictionary `data`.

spork/misc/set* macro source
(set* tgts exprs)
 
 Parallel `set` function. Takes a list of targets and
 expressions, evaluates all the expressions, and then
 assigns them to the targets. Each target can be a variable
-or a 2-tuple, just like in the normal `set` special form.
Community Examples

spork/misc/string->int function source
(string->int str &opt base)
+or a 2-tuple, just like in the normal `set` special form.

spork/misc/string->int function source
(string->int str &opt base)
 
 Parse an integer in the given base. Defaults to decimal (base 10). Differs
-from scan-number in that this does not recognize floating point notation.
Community Examples

spork/misc/table-filter function source
(table-filter pred dict)
+from scan-number in that this does not recognize floating point notation.

spork/misc/table-filter function source
(table-filter pred dict)
 
 Filter a key-value structure info a table. Semantics are the same as for
 built-in `filter`, except that `pred` takes two arguments (key and value.)
-Does not consider prototypes.
Community Examples

spork/misc/third function source
(third xs)
+Does not consider prototypes.

spork/misc/third function source
(third xs)
 
-Get the third element from an indexed data structure.
Community Examples

spork/misc/trim-prefix function source
(trim-prefix prefix str)
+Get the third element from an indexed data structure.

spork/misc/trim-prefix function source
(trim-prefix prefix str)
 
-Trim the specified prefix of a string if it has one
Community Examples

spork/misc/trim-suffix function source
(trim-suffix suffix str)
+Trim the specified prefix of a string if it has one

spork/misc/trim-suffix function source
(trim-suffix suffix str)
 
-Trim the specified suffix of a string if it has one
Community Examples

spork/misc/until macro source
(until cnd & body)
+Trim the specified suffix of a string if it has one

spork/misc/until macro source
(until cnd & body)
 
 Repeat `body` while the `cnd` is false.
-Equivalent to (while (not cnd) ;body).
Community Examples

spork/misc/vars macro source
(vars & bindings)
+Equivalent to (while (not cnd) ;body).

spork/misc/vars macro source
(vars & bindings)
 
-Defines many variables as in let `bindings`, but without creating new scope.
Community Examples

spork/msg/make-proto function source
(make-proto stream &opt pack unpack)
+Defines many variables as in let `bindings`, but without creating new scope.

spork/msg/make-proto function source
(make-proto stream &opt pack unpack)
 
-Create both a send an recv function from a stream, as with `make-send` and `make-recv`.
Community Examples

spork/msg/make-recv function source
(make-recv stream &opt unpack)
+Create both a send an recv function from a stream, as with `make-send` and `make-recv`.

spork/msg/make-recv function source
(make-recv stream &opt unpack)
 
-Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.
Community Examples

spork/msg/make-send function source
(make-send stream &opt pack)
+Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.

spork/msg/make-send function source
(make-send stream &opt pack)
 
-Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Community Examples

spork/netrepl/client function source
(client &opt host port name)
+Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.

spork/netrepl/client function source
(client &opt host port name)
 
-Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".
Community Examples

spork/netrepl/default-host string source
Default host to run server on and connect to.
Community Examples

spork/netrepl/default-port string source
Default port to run the net repl.
Community Examples

spork/netrepl/server function source
(server &opt host port env cleanup welcome-msg)
+Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".

spork/netrepl/default-host string source
Default host to run server on and connect to.

spork/netrepl/default-port string source
Default port to run the net repl.

spork/netrepl/server function source
(server &opt host port env cleanup welcome-msg)
 
-Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.
Community Examples

spork/netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
+Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.

spork/netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
 
-Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Community Examples

spork/path/abspath function source
(posix/abspath path)
+Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.

spork/path/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

spork/path/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/basename function source
(posix/basename path)
+Check if a path is absolute.

spork/path/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/delim string source
Platform delimiter
Community Examples

spork/path/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

spork/path/delim string source
Platform delimiter

spork/path/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/join function source
(posix/join & els)
+Get the file extension for a path.

spork/path/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

spork/path/normalize function source
(posix/normalize path)
+Join path elements together.

spork/path/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/posix/abspath function source
(posix/abspath path)
+Split a path into its parts.

spork/path/posix/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/posix/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

spork/path/posix/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/posix/basename function source
(posix/basename path)
+Check if a path is absolute.

spork/path/posix/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/posix/delim string source
Platform delimiter
Community Examples

spork/path/posix/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

spork/path/posix/delim string source
Platform delimiter

spork/path/posix/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/posix/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/posix/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/posix/join function source
(posix/join & els)
+Get the file extension for a path.

spork/path/posix/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

spork/path/posix/normalize function source
(posix/normalize path)
+Join path elements together.

spork/path/posix/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/posix/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/posix/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/posix/relpath function source
(posix/relpath source target)
+Split a path into its parts.

spork/path/posix/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/posix/sep string source
Platform separator
Community Examples

spork/path/relpath function source
(posix/relpath source target)
+Get the relative path between two subpaths.

spork/path/posix/sep string source
Platform separator

spork/path/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/sep string source
Platform separator
Community Examples

spork/path/win32/abspath function source
(win32/abspath path)
+Get the relative path between two subpaths.

spork/path/sep string source
Platform separator

spork/path/win32/abspath function source
(win32/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/win32/abspath? function source
(win32/abspath? path)
+Coerce a path to be absolute.

spork/path/win32/abspath? function source
(win32/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/win32/basename function source
(win32/basename path)
+Check if a path is absolute.

spork/path/win32/basename function source
(win32/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/win32/delim string source
Platform delimiter
Community Examples

spork/path/win32/dirname function source
(win32/dirname path)
+Gets the base file name of a path.

spork/path/win32/delim string source
Platform delimiter

spork/path/win32/dirname function source
(win32/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/win32/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/win32/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/win32/join function source
(win32/join & els)
+Get the file extension for a path.

spork/path/win32/join function source
(win32/join & els)
 
-Join path elements together.
Community Examples

spork/path/win32/normalize function source
(win32/normalize path)
+Join path elements together.

spork/path/win32/normalize function source
(win32/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/win32/parts function source
(win32/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/win32/parts function source
(win32/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/win32/relpath function source
(win32/relpath source target)
+Split a path into its parts.

spork/path/win32/relpath function source
(win32/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/win32/sep string source
Platform separator
Community Examples

spork/rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
+Get the relative path between two subpaths.

spork/path/win32/sep string source
Platform separator

spork/rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
 
-Begin raw terminal functionality. Return a stream that can be read from to get input.
Community Examples

spork/rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
+Begin raw terminal functionality. Return a stream that can be read from to get input.

spork/rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
 
-Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.
Community Examples

spork/rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
+Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.

spork/rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
 
-A handler that a user can use to handle ctrl-z from input to suspend the current process.
Community Examples

spork/rawterm/end cfunction source
(rawterm/end)
+A handler that a user can use to handle ctrl-z from input to suspend the current process.

spork/rawterm/end cfunction source
(rawterm/end)
 
-End raw terminal functionality.
Community Examples

spork/rawterm/getch cfunction source
(rawterm/getch &opt into)
+End raw terminal functionality.

spork/rawterm/getch cfunction source
(rawterm/getch &opt into)
 
-Get a byte of input from stdin, without blocking if possible. Returns a buffer.
Community Examples

spork/rawterm/isatty cfunction source
(rawterm/isatty)
+Get a byte of input from stdin, without blocking if possible. Returns a buffer.

spork/rawterm/isatty cfunction source
(rawterm/isatty)
 
-Check if the current stdin is a tty.
Community Examples

spork/rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
+Check if the current stdin is a tty.

spork/rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
 
-Measure the monospace width of a string.
Community Examples

spork/rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
+Measure the monospace width of a string.

spork/rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
 
-Get the monospace width of a rune. Returns either 0, 1, or 2.
Community Examples

spork/rawterm/size cfunction source
(rawterm/size)
+Get the monospace width of a rune. Returns either 0, 1, or 2.

spork/rawterm/size cfunction source
(rawterm/size)
 
-Get the number of rows and columns visible in the terminal as tuple [rows cols]
Community Examples

spork/rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
+Get the number of rows and columns visible in the terminal as tuple [rows cols]

spork/rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
 
-Get a byte slice that will fit into a number of columns.
Community Examples

spork/regex/compile function source
(compile pattern)
+Get a byte slice that will fit into a number of columns.

spork/regex/compile function source
(compile pattern)
 
-Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.
Community Examples

spork/regex/find function source
(find reg text &opt start)
+Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.

spork/regex/find function source
(find reg text &opt start)
 
-Similar to peg/find, but for regexes.
Community Examples

spork/regex/find-all function source
(find-all reg text &opt start)
+Similar to peg/find, but for regexes.

spork/regex/find-all function source
(find-all reg text &opt start)
 
-Similar to peg/find-all, but for regexes.
Community Examples

spork/regex/match function source
(match reg text &opt start)
+Similar to peg/find-all, but for regexes.

spork/regex/match function source
(match reg text &opt start)
 
-Similar to peg/match, but for regexes.
Community Examples

spork/regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.
Community Examples

spork/regex/replace function source
(replace reg rep text &opt start)
+Similar to peg/match, but for regexes.

spork/regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.

spork/regex/replace function source
(replace reg rep text &opt start)
 
-Similar to peg/replace, but for regexes.
Community Examples

spork/regex/replace-all function source
(replace-all reg rep text &opt start)
+Similar to peg/replace, but for regexes.

spork/regex/replace-all function source
(replace-all reg rep text &opt start)
 
-Similar to peg/replace-all, but for regexes.
Community Examples

spork/regex/source function source
(source pattern)
+Similar to peg/replace-all, but for regexes.

spork/regex/source function source
(source pattern)
 
-Compile a subset of regex to PEG source code.
Community Examples

spork/rpc/client function source
(client &opt host port name)
+Compile a subset of regex to PEG source code.

spork/rpc/client function source
(client &opt host port name)
 
-Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.
Community Examples

spork/rpc/default-host string source
Default host to run server on and connect to.
Community Examples

spork/rpc/default-port string source
Default port to run the net repl.
Community Examples

spork/rpc/server function source
(server functions &opt host port workers-per-connection)
+Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.

spork/rpc/default-host string source
Default host to run server on and connect to.

spork/rpc/default-port string source
Default port to run the net repl.

spork/rpc/server function source
(server functions &opt host port workers-per-connection)
 
-Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Community Examples

spork/schema/make-predicate function source
(make-predicate schema)
+Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.

spork/schema/make-predicate function source
(make-predicate schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `predicate`.
Community Examples

spork/schema/make-validator function source
(make-validator schema)
+Generate a function that can be used to validate a data structure. This is the function form of `predicate`.

spork/schema/make-validator function source
(make-validator schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `validator`.
Community Examples

spork/schema/predicate macro source
(predicate pattern)
+Generate a function that can be used to validate a data structure. This is the function form of `validator`.

spork/schema/predicate macro source
(predicate pattern)
 
-Make a validation predicate given a certain schema.
Community Examples

spork/schema/validator macro source
(validator pattern)
+Make a validation predicate given a certain schema.

spork/schema/validator macro source
(validator pattern)
 
-Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Community Examples

spork/services/*current-manager* keyword source
The currently running service manager, if there is one
Community Examples

spork/services/*current-service* keyword source
The currently running service, if there is one
Community Examples

spork/services/add-service function source
(add-service service-name main-function & args)
+Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.

spork/services/*current-manager* keyword source
The currently running service manager, if there is one

spork/services/*current-service* keyword source
The currently running service, if there is one

spork/services/add-service function source
(add-service service-name main-function & args)
 
-Spawn a service
Community Examples

spork/services/all-services function source
(all-services)
+Spawn a service

spork/services/all-services function source
(all-services)
 
-Get a list of running services
Community Examples

spork/services/get-manager function source
(get-manager)
+Get a list of running services

spork/services/get-manager function source
(get-manager)
 
-Get the current manager. If no manager exists, create one.
Community Examples

spork/services/get-service function source
(get-service)
+Get the current manager. If no manager exists, create one.

spork/services/get-service function source
(get-service)
 
-Get the current service. If not in a service, raise an error
Community Examples

spork/services/make-manager function source
(make-manager &opt log-dir)
+Get the current service. If not in a service, raise an error

spork/services/make-manager function source
(make-manager &opt log-dir)
 
-Group a number of fibers into a single object for structured concurrency. Also includes utilities for running services like servers in the background.
Community Examples

spork/services/print-all function source
(print-all &opt filter-fn)
+Group a number of fibers into a single object for structured concurrency. Also includes utilities for running services like servers in the background.

spork/services/print-all function source
(print-all &opt filter-fn)
 
-Print a table of all running services.
Community Examples

spork/services/remove-service function source
(remove-service service-name)
+Print a table of all running services.

spork/services/remove-service function source
(remove-service service-name)
 
-Remove a service
Community Examples

spork/services/set-title function source
(set-title title)
+Remove a service

spork/services/set-title function source
(set-title title)
 
-Set a textual description of the service to describe what it is doing currently
Community Examples

spork/services/start-service function source
(start-service service-name)
+Set a textual description of the service to describe what it is doing currently

spork/services/start-service function source
(start-service service-name)
 
-Start or restart a service
Community Examples

spork/services/stop-service function source
(stop-service service-name &opt reason)
+Start or restart a service

spork/services/stop-service function source
(stop-service service-name &opt reason)
 
-Stop a running service
Community Examples

spork/services/wait function source
(wait)
+Stop a running service

spork/services/wait function source
(wait)
 
-Once a number of services have been spawned, call `wait` to block the fiber until the manager is canceled. This lets a manager fiber behave as a service itself.
Community Examples

spork/sh/copy function source
(copy src dest)
+Once a number of services have been spawned, call `wait` to block the fiber until the manager is canceled. This lets a manager fiber behave as a service itself.

spork/sh/copy function source
(copy src dest)
 
 Copy a file or directory recursively from one location to another.
-Expects input to be unix style paths
Community Examples

spork/sh/copy-file function source
(copy-file src-path dst-path)
+Expects input to be unix style paths

spork/sh/copy-file function source
(copy-file src-path dst-path)
 
-Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.
Community Examples

spork/sh/create-dirs function source
(create-dirs dir-path)
+Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.

spork/sh/create-dirs function source
(create-dirs dir-path)
 
-Create all directories in path specified as string including itself.
Community Examples

spork/sh/devnull function source
(devnull)
+Create all directories in path specified as string including itself.

spork/sh/devnull function source
(devnull)
 
-get the /dev/null equivalent of the current platform as an open file
Community Examples

spork/sh/exec-slurp function source
(exec-slurp & args)
+get the /dev/null equivalent of the current platform as an open file

spork/sh/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

spork/sh/exec-slurp-all function source
(exec-slurp-all & args)
+Read stdout of subprocess and return it trimmed in a string.

spork/sh/exec-slurp-all function source
(exec-slurp-all & args)
 
 Read stdout and stderr of subprocess and return it trimmed in a struct with :err and :out containing the output as string.
-This will also return the exit code under the :status key.
Community Examples

spork/sh/exists? function source
(exists? path)
+This will also return the exit code under the :status key.

spork/sh/exists? function source
(exists? path)
 
-Check if the given file or directory exists. (Follows symlinks)
Community Examples

spork/sh/list-all-files function source
(list-all-files dir &opt into)
+Check if the given file or directory exists. (Follows symlinks)

spork/sh/list-all-files function source
(list-all-files dir &opt into)
 
-List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.
Community Examples

spork/sh/make-new-file function source
(make-new-file file-path &opt mode)
+List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.

spork/sh/make-new-file function source
(make-new-file file-path &opt mode)
 
-Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).
Community Examples

spork/sh/rm function source
(rm path)
+Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).

spork/sh/rm function source
(rm path)
 
-Remove a directory and all sub directories recursively.
Community Examples

spork/sh/scan-directory function source
(scan-directory dir func)
+Remove a directory and all sub directories recursively.

spork/sh/scan-directory function source
(scan-directory dir func)
 
-Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.
Community Examples

spork/tarray/buffer cfunction
(tarray/buffer array|size)
+Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.

spork/tarray/buffer cfunction
(tarray/buffer array|size)
 
-Return typed array buffer or create a new buffer.
Community Examples

spork/tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
+Return typed array buffer or create a new buffer.

spork/tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
 
-Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.
Community Examples

spork/tarray/length cfunction
(tarray/length array|buffer)
+Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.

spork/tarray/length cfunction
(tarray/length array|buffer)
 
-Return typed array or buffer size.
Community Examples

spork/tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
+Return typed array or buffer size.

spork/tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
 
-Create new typed array.
Community Examples

spork/tarray/properties cfunction
(tarray/properties array)
+Create new typed array.

spork/tarray/properties cfunction
(tarray/properties array)
 
-Return typed array properties as a struct.
Community Examples

spork/tarray/slice cfunction
(tarray/slice tarr &opt start end)
+Return typed array properties as a struct.

spork/tarray/slice cfunction
(tarray/slice tarr &opt start end)
 
-Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.
Community Examples

spork/tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
+Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.

spork/tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
 
-Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Community Examples

spork/tasker/all-tasks function source
(all-tasks tasker &opt detailed)
+Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.

spork/tasker/all-tasks function source
(all-tasks tasker &opt detailed)
 
-Get an array of all task ids for which there is still data on disk. If `detailed` is truthy, return full task metadata instead of ids.
Community Examples

spork/tasker/cancel-task function source
(cancel-task tasker task-id)
+Get an array of all task ids for which there is still data on disk. If `detailed` is truthy, return full task metadata instead of ids.

spork/tasker/cancel-task function source
(cancel-task tasker task-id)
 
-Cancel a queued or running task.
Community Examples

spork/tasker/close-queues function source
(close-queues tasker)
+Cancel a queued or running task.

spork/tasker/close-queues function source
(close-queues tasker)
 
-Prevent any tasks from being added to queues. When an executor finishes it's current job, if there are any, it will terminate. When all executors complete, the call to `run-executors` will complete.
Community Examples

spork/tasker/default-expiration number source
Default expiration time (1 day)
Community Examples

spork/tasker/default-priority number source
Default task priority
Community Examples

spork/tasker/default-task-directory string source
Default location of task records
Community Examples

spork/tasker/err-file-name string source
Name of the file for logging errors
Community Examples

spork/tasker/max-priority number source
Maximum allowed priority (lower priority tasks will execute first)
Community Examples

spork/tasker/min-priority number source
Minimum allowed priority (lower priority tasks will execute first)
Community Examples

spork/tasker/new-tasker function source
(new-tasker &opt task-directory queues queue-size)
+Prevent any tasks from being added to queues. When an executor finishes it's current job, if there are any, it will terminate. When all executors complete, the call to `run-executors` will complete.

spork/tasker/default-expiration number source
Default expiration time (1 day)

spork/tasker/default-priority number source
Default task priority

spork/tasker/default-task-directory string source
Default location of task records

spork/tasker/err-file-name string source
Name of the file for logging errors

spork/tasker/max-priority number source
Maximum allowed priority (lower priority tasks will execute first)

spork/tasker/min-priority number source
Minimum allowed priority (lower priority tasks will execute first)

spork/tasker/new-tasker function source
(new-tasker &opt task-directory queues queue-size)
 
-Create queues and various settings to run tasks. Create a new tasker table.
Community Examples

spork/tasker/out-file-name string source
Name of the file for general logging
Community Examples

spork/tasker/queue-task function source
(queue-task tasker argv &opt note priority qname timeout expiration input)
+Create queues and various settings to run tasks. Create a new tasker table.

spork/tasker/out-file-name string source
Name of the file for general logging

spork/tasker/queue-task function source
(queue-task tasker argv &opt note priority qname timeout expiration input)
 
-Add a task specification to a queue. Supply an argv string array that will be used to invoke s a subprocess. The optional `note` parameter is just a textual note for task trackingv. The `priority` parameter should be an integer between 0 and 9 inclusive, default is 4. Lower priority jobs in the same queue will be executed by higher priority. Use input to pass in generic, unstructured input to a task.
Community Examples

spork/tasker/run-cleanup function source
(run-cleanup tasker)
+Add a task specification to a queue. Supply an argv string array that will be used to invoke s a subprocess. The optional `note` parameter is just a textual note for task trackingv. The `priority` parameter should be an integer between 0 and 9 inclusive, default is 4. Lower priority jobs in the same queue will be executed by higher priority. Use input to pass in generic, unstructured input to a task.

spork/tasker/run-cleanup function source
(run-cleanup tasker)
 
-Delete old expired jobs saved on disk
Community Examples

spork/tasker/run-executors function source
(run-executors tasker &opt workers-per-queue pre-task post-task)
+Delete old expired jobs saved on disk

spork/tasker/run-executors function source
(run-executors tasker &opt workers-per-queue pre-task post-task)
 
-Start a number of executors to run tasks as with `tasker/spawn-executors`, and then wait for all executors to complete.
Community Examples

spork/tasker/spawn-executors function source
(spawn-executors tasker &opt qnames workers-per-queue pre-task post-task)
+Start a number of executors to run tasks as with `tasker/spawn-executors`, and then wait for all executors to complete.

spork/tasker/spawn-executors function source
(spawn-executors tasker &opt qnames workers-per-queue pre-task post-task)
 
-Start a number of executors to run tasks. Tasks can be added to a queue by calling queue-task. A single tasker object can make multiple calls to spawn-executors.
Community Examples

spork/tasker/statuses tuple source
A tuple of all possible statuses that a task can have.
Community Examples

spork/tasker/task-file function source
(task-file tasker task-id &opt file-name)
+Start a number of executors to run tasks. Tasks can be added to a queue by calling queue-task. A single tasker object can make multiple calls to spawn-executors.

spork/tasker/statuses tuple source
A tuple of all possible statuses that a task can have.

spork/tasker/task-file function source
(task-file tasker task-id &opt file-name)
 
-Get a log file for a path. By default, will get a path to out.log.
Community Examples

spork/tasker/task-meta-name string source
Name of the task metadata file
Community Examples

spork/tasker/task-status function source
(task-status tasker task-id)
+Get a log file for a path. By default, will get a path to out.log.

spork/tasker/task-meta-name string source
Name of the task metadata file

spork/tasker/task-status function source
(task-status tasker task-id)
 
-Look up the status of a given task by id.
Community Examples

spork/temple/add-loader function source
(add-loader)
+Look up the status of a given task by id.

spork/temple/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

spork/temple/base-env table source
Base environment for rendering
Community Examples

spork/temple/compile function source
(compile str)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

spork/temple/base-env table source
Base environment for rendering

spork/temple/compile function source
(compile str)
 
 Compile a Temple template into a function which will return a
 rendered buffer.
 
 The resulting function should receive the template arguments in the
-&keys format.
Community Examples

spork/temple/create function source
(create source &opt where)
+&keys format.

spork/temple/create function source
(create source &opt where)
 
-Compile a template string into a function. Optionally provide a location where the source is from to improve debugging. Returns the template function.
Community Examples

spork/test/assert macro source
(assert x &opt e)
+Compile a template string into a function. Optionally provide a location where the source is from to improve debugging. Returns the template function.

spork/test/assert macro source
(assert x &opt e)
 
-Override's the default assert with some nice error handling.
Community Examples

spork/test/assert-docs function source
(assert-docs path)
+Override's the default assert with some nice error handling.

spork/test/assert-docs function source
(assert-docs path)
 
 Assert that all symbols, when module on the path is required,
-have proper doc string
Community Examples

spork/test/assert-error macro source
(assert-error msg & forms)
+have proper doc string

spork/test/assert-error macro source
(assert-error msg & forms)
 
-Test passes if forms error.
Community Examples

spork/test/assert-no-error macro source
(assert-no-error msg & forms)
+Test passes if forms error.

spork/test/assert-no-error macro source
(assert-no-error msg & forms)
 
-Test passes if forms do not error.
Community Examples

spork/test/assert-not macro source
(assert-not x &opt e)
+Test passes if forms do not error.

spork/test/assert-not macro source
(assert-not x &opt e)
 
-Invert assert.
Community Examples

spork/test/capture-stderr macro source
(capture-stderr & body)
+Invert assert.

spork/test/capture-stderr macro source
(capture-stderr & body)
 
 Runs the form and captures stderr. Returns tuple with result of the form
-and a string with captured stderr.
Community Examples

spork/test/capture-stdout macro source
(capture-stdout & body)
+and a string with captured stderr.

spork/test/capture-stdout macro source
(capture-stdout & body)
 
 Runs the form and captures stdout. Returns tuple with result of the form
-and a string with captured stdout.
Community Examples

spork/test/end-suite function source
(end-suite)
+and a string with captured stdout.

spork/test/end-suite function source
(end-suite)
 
-Ends test suite, prints summary and exits if any have failed.
Community Examples

spork/test/start-suite function source
(start-suite &opt name)
+Ends test suite, prints summary and exits if any have failed.

spork/test/start-suite function source
(start-suite &opt name)
 
-Starts test suite.
Community Examples

spork/test/suppress-stderr macro source
(suppress-stderr & body)
+Starts test suite.

spork/test/suppress-stderr macro source
(suppress-stderr & body)
 
-Suppreses stdout from the body
Community Examples

spork/test/suppress-stdout macro source
(suppress-stdout & body)
+Suppreses stdout from the body

spork/test/suppress-stdout macro source
(suppress-stdout & body)
 
-Suppreses stdout from the body
Community Examples

spork/test/timeit macro source
(timeit form &opt tag)
+Suppreses stdout from the body

spork/test/timeit macro source
(timeit form &opt tag)
 
 Time the execution of `form` using `os/clock` before and after,
 and print the result to stdout. returns: result of executing `form`.
-Uses `tag` (default "Elapsed time:") to tag the printout.
Community Examples

spork/utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
+Uses `tag` (default "Elapsed time:") to tag the printout.

spork/utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
 
-Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].
Community Examples

spork/utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
+Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].

spork/utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
 
-Encode a Unicode codepoint into the end of a buffer.
Community Examples

spork/utf8/prefix->width cfunction source
(utf8/prefix->width c)
+Encode a Unicode codepoint into the end of a buffer.

spork/utf8/prefix->width cfunction source
(utf8/prefix->width c)
 
-Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Community Examples

spork/zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
+Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.

spork/zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
 
-Add a byte sequence to the zip writer.
Community Examples

spork/zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
+Add a byte sequence to the zip writer.

spork/zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
 
-Add a file to the zip writer.
Community Examples

spork/zip/compress cfunction source
(zip/compress bytes &opt level into)
+Add a file to the zip writer.

spork/zip/compress cfunction source
(zip/compress bytes &opt level into)
 
-Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.
Community Examples

spork/zip/decompress cfunction source
(zip/decompress bytes &opt into)
+Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.

spork/zip/decompress cfunction source
(zip/decompress bytes &opt into)
 
-Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.
Community Examples

spork/zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
+Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.

spork/zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
 
-Extract a file from the zip archive, either to memory or to a file on disk.
Community Examples

spork/zip/file-directory? cfunction source
(zip/file-directory? reader idx)
+Extract a file from the zip archive, either to memory or to a file on disk.

spork/zip/file-directory? cfunction source
(zip/file-directory? reader idx)
 
-Check if a file index is a directory.
Community Examples

spork/zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
+Check if a file index is a directory.

spork/zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
 
-Check if a file is encrypted inside an archive.
Community Examples

spork/zip/file-supported? cfunction source
(zip/file-supported? reader idx)
+Check if a file is encrypted inside an archive.

spork/zip/file-supported? cfunction source
(zip/file-supported? reader idx)
 
-Check if a file is supported with this verstion of miniz.
Community Examples

spork/zip/get-filename cfunction source
(zip/get-filename reader idx)
+Check if a file is supported with this verstion of miniz.

spork/zip/get-filename cfunction source
(zip/get-filename reader idx)
 
-Convert a file index index in the archive to a filename.
Community Examples

spork/zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
+Convert a file index index in the archive to a filename.

spork/zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
 
-Get the index of a particular filename in the archive.
Community Examples

spork/zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
+Get the index of a particular filename in the archive.

spork/zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
 
-Read a byte sequence as a zip archive. Returns a new zip reader.
Community Examples

spork/zip/read-file cfunction source
(zip/read-file filename &opt flags)
+Read a byte sequence as a zip archive. Returns a new zip reader.

spork/zip/read-file cfunction source
(zip/read-file filename &opt flags)
 
-Read a file as a zip archive. Returns a new zip reader.
Community Examples

spork/zip/reader-close cfunction source
(zip/reader-close reader)
+Read a file as a zip archive. Returns a new zip reader.

spork/zip/reader-close cfunction source
(zip/reader-close reader)
 
-Close a reader and free related memory.
Community Examples

spork/zip/reader-count cfunction source
(zip/reader-count reader)
+Close a reader and free related memory.

spork/zip/reader-count cfunction source
(zip/reader-count reader)
 
-Get the number of files inside the zip archive. The files can be indexed 
Community Examples

spork/zip/stat cfunction source
(zip/stat reader idx)
+Get the number of files inside the zip archive. The files can be indexed 

spork/zip/stat cfunction source
(zip/stat reader idx)
 
 Get stat information of file. Returns a new struct with the following fields:
 
@@ -700,17 +700,17 @@ 

Spork

* :comment * :internal-attr * :external-attr -
Community Examples

spork/zip/version cfunction source
(zip/version)
+

spork/zip/version cfunction source
(zip/version)
 
-Get the version string of the underlying miniz library.
Community Examples

spork/zip/write-buffer cfunction source
(zip/write-buffer)
+Get the version string of the underlying miniz library.

spork/zip/write-buffer cfunction source
(zip/write-buffer)
 
-Create a new zip archive writer that write to memory.
Community Examples

spork/zip/write-file cfunction source
(zip/write-file dest-path)
+Create a new zip archive writer that write to memory.

spork/zip/write-file cfunction source
(zip/write-file dest-path)
 
-Create a new zip archive writer that will write into an archive file.
Community Examples

spork/zip/writer-close cfunction source
(zip/writer-close writer)
+Create a new zip archive writer that will write into an archive file.

spork/zip/writer-close cfunction source
(zip/writer-close writer)
 
-Close a ZipWriter.
Community Examples

spork/zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
+Close a ZipWriter.

spork/zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
 
-Finalize a writer, writing any zip files to disk. Return the writer.
Community Examples
+Finalize a writer, writing any zip files to disk. Return the writer.
Parser Module Argument Parsing diff --git a/static/1.27.0/api/spork/json.html b/static/1.27.0/api/spork/json.html index 527b9405..f3aab99e 100644 --- a/static/1.27.0/api/spork/json.html +++ b/static/1.27.0/api/spork/json.html @@ -114,9 +114,9 @@

Index

json/decode json/encode


json/decode cfunction
(json/decode json-source &opt keywords nils)
 
-Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.
Community Examples

json/encode cfunction
(json/encode x &opt tab newline buf)
+Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.

json/encode cfunction
(json/encode x &opt tab newline buf)
 
-Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
Community Examples
+Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
HTTP Framework Math extended diff --git a/static/1.27.0/api/spork/math.html b/static/1.27.0/api/spork/math.html index 16c83006..4f4000e9 100644 --- a/static/1.27.0/api/spork/math.html +++ b/static/1.27.0/api/spork/math.html @@ -115,144 +115,144 @@

Index

math/add math/add-to-mean math/approx-eq math/bernoulli-distribution math/binominal-coeficient math/binominal-distribution math/check-propability math/chi-squared-distribution-table math/cols math/cumulative-std-normal-probability math/det math/dot math/epsilon math/extent math/factorial math/geometric-mean math/get-only-el math/harmonic-mean math/ident math/interquartile-range math/linear-regression math/linear-regression-line math/median math/median-absolute-deviation math/minor math/mode math/mop math/mul math/perm math/permutation-test math/permutations math/poisson-distribution math/quantile math/quantile-rank math/quantile-rank-sorted math/quantile-sorted math/quickselect math/relative-err math/root-mean-square math/rows math/sample-correlation math/sample-covariance math/sample-skewness math/sample-standard-deviation math/sample-variance math/scalar math/shuffle-in-place math/size math/sop math/standard-deviation math/standard-normal-table math/sum-compensated math/sum-nth-power-deviations math/swap math/t-test math/t-test-2 math/trans math/variance math/z-score math/zero


math/add function source
(add m a)
 
 Add `a` to matrix `m` where it can be matrix or scalar.
-Matrix `m` is mutated.
Community Examples

math/add-to-mean function source
(add-to-mean m n v)
+Matrix `m` is mutated.

math/add-to-mean function source
(add-to-mean m n v)
 
-Adds new value `v` to mean `m` from `n` values.
Community Examples

math/approx-eq function source
(approx-eq a e &opt t)
+Adds new value `v` to mean `m` from `n` values.

math/approx-eq function source
(approx-eq a e &opt t)
 
 Approximate equality between actual number `a`
 and expected number `e`. Default tolerance `t`
-is `epsilon`.
Community Examples

math/bernoulli-distribution function source
(bernoulli-distribution p)
+is `epsilon`.

math/bernoulli-distribution function source
(bernoulli-distribution p)
 
-Creates Bernoulli distribution from popability `p` in the tuple.
Community Examples

math/binominal-coeficient function source
(binominal-coeficient n k)
+Creates Bernoulli distribution from popability `p` in the tuple.

math/binominal-coeficient function source
(binominal-coeficient n k)
 
 Computes binominal coeficient from set of size `n`
-and sample size `k`.
Community Examples

math/binominal-distribution function source
(binominal-distribution t p)
+and sample size `k`.

math/binominal-distribution function source
(binominal-distribution t p)
 
 Creates binominal distribution from trials `t`
-and propability `p` in the tuple.
Community Examples

math/check-propability function source
(check-propability p)
+and propability `p` in the tuple.

math/check-propability function source
(check-propability p)
 
-Asserts that probability in in the [0 1] range.
Community Examples

math/chi-squared-distribution-table struct source
Chi Squared distribution table.
Community Examples

math/cols function source
(cols m)
+Asserts that probability in in the [0 1] range.

math/chi-squared-distribution-table struct source
Chi Squared distribution table.

math/cols function source
(cols m)
 
-Returns numbers of columns of matrix `m`.
Community Examples

math/cumulative-std-normal-probability function source
(cumulative-std-normal-probability z)
+Returns numbers of columns of matrix `m`.

math/cumulative-std-normal-probability function source
(cumulative-std-normal-probability z)
 
-Computes standard normal probability for `y`.
Community Examples

math/det function source
(det m)
+Computes standard normal probability for `y`.

math/det function source
(det m)
 
-Computes determinant of matrix `m`.
Community Examples

math/dot function source
(dot mx my)
+Computes determinant of matrix `m`.

math/dot function source
(dot mx my)
 
-Computes dot product of matrices or vectors `x` and `y`.
Community Examples

math/epsilon number source
Epsilon constant
Community Examples

math/extent function source
(extent xs)
+Computes dot product of matrices or vectors `x` and `y`.

math/epsilon number source
Epsilon constant

math/extent function source
(extent xs)
 
-Returns the minimum & maximum number in an `xs` as tuple.
Community Examples

math/factorial function source
(factorial n)
+Returns the minimum & maximum number in an `xs` as tuple.

math/factorial function source
(factorial n)
 
-Returns factorial of `n`.
Community Examples

math/geometric-mean function source
(geometric-mean xs)
+Returns factorial of `n`.

math/geometric-mean function source
(geometric-mean xs)
 
-Gets the geometric mean from `xs`.
Community Examples

math/get-only-el macro source
(get-only-el m)
+Gets the geometric mean from `xs`.

math/get-only-el macro source
(get-only-el m)
 
 Convenience macro for geting first element
-from first row of the two dimensional array `m`.
Community Examples

math/harmonic-mean function source
(harmonic-mean xs)
+from first row of the two dimensional array `m`.

math/harmonic-mean function source
(harmonic-mean xs)
 
-Gets the harmonic mean from `xs`.
Community Examples

math/ident function source
(ident c)
+Gets the harmonic mean from `xs`.

math/ident function source
(ident c)
 
-Creates identity matrix with `c` x `c` size.
Community Examples

math/interquartile-range function source
(interquartile-range xs)
+Creates identity matrix with `c` x `c` size.

math/interquartile-range function source
(interquartile-range xs)
 
-Gets the interquartile range from `xs`.
Community Examples

math/linear-regression function source
(linear-regression coords)
+Gets the interquartile range from `xs`.

math/linear-regression function source
(linear-regression coords)
 
 Computes the slope `:m` and y-intercept `:b`
-of the function in the struct from set of coordinates.
Community Examples

math/linear-regression-line function source
(linear-regression-line {:m m :b b})
+of the function in the struct from set of coordinates.

math/linear-regression-line function source
(linear-regression-line {:m m :b b})
 
-Constructs function from struct returned by linear regression.
Community Examples

math/median function source
(median xs)
+Constructs function from struct returned by linear regression.

math/median function source
(median xs)
 
-Gets the median value from `xs`
Community Examples

math/median-absolute-deviation function source
(median-absolute-deviation xs)
+Gets the median value from `xs`

math/median-absolute-deviation function source
(median-absolute-deviation xs)
 
-Gets median absolute deviation from `xs`.
Community Examples

math/minor function source
(minor m x y)
+Gets median absolute deviation from `xs`.

math/minor function source
(minor m x y)
 
-Computes minor matrix of matrix `m` and `x`, `y`.
Community Examples

math/mode function source
(mode xs)
+Computes minor matrix of matrix `m` and `x`, `y`.

math/mode function source
(mode xs)
 
-Gets the mode value from `xs`.
Community Examples

math/mop function source
(mop m op a)
+Gets the mode value from `xs`.

math/mop function source
(mop m op a)
 
 Mutates every cell of the matrix `m` with `op`
-and corresponding cell from matrix arg `a`.
Community Examples

math/mul function source
(mul m a)
+and corresponding cell from matrix arg `a`.

math/mul function source
(mul m a)
 
 Multiply matrix `m` with `a` which can be matrix or vector.
-Matrix `m` is mutated.
Community Examples

math/perm function source
(perm m)
+Matrix `m` is mutated.

math/perm function source
(perm m)
 
-Computes permanent of the matrix `m`.
Community Examples

math/permutation-test function source
(permutation-test xs ys &opt a k)
+Computes permanent of the matrix `m`.

math/permutation-test function source
(permutation-test xs ys &opt a k)
 
 Conducts a permutation test to determine if two data sets
 `xs` and `ys` are *significantly* different from each other.
 You can use alternative hypotesis `a`, which defaults to `:two-side`,
 with `:greater` and `:lesser` being the other two options.
 The last optional argument is `k` number of values
-in permutation distribution
Community Examples

math/permutations function source
(permutations s &opt k)
+in permutation distribution

math/permutations function source
(permutations s &opt k)
 
-Returns permutations of length `k` from members of `s`
Community Examples

math/poisson-distribution function source
(poisson-distribution lambda)
+Returns permutations of length `k` from members of `s`

math/poisson-distribution function source
(poisson-distribution lambda)
 
-Creates Poisson distribution from `lambda` in tuple.
Community Examples

math/quantile function source
(quantile xs p)
+Creates Poisson distribution from `lambda` in tuple.

math/quantile function source
(quantile xs p)
 
-Gets the quantile value from `xs` at `p` from unsorted population.
Community Examples

math/quantile-rank function source
(quantile-rank xs p)
+Gets the quantile value from `xs` at `p` from unsorted population.

math/quantile-rank function source
(quantile-rank xs p)
 
-Gets the quantile rank of value `v` from unsorted `xs`.
Community Examples

math/quantile-rank-sorted function source
(quantile-rank-sorted xs v)
+Gets the quantile rank of value `v` from unsorted `xs`.

math/quantile-rank-sorted function source
(quantile-rank-sorted xs v)
 
-Gets the quantile rank of value `v` from sorted `xs`.
Community Examples

math/quantile-sorted function source
(quantile-sorted xs p)
+Gets the quantile rank of value `v` from sorted `xs`.

math/quantile-sorted function source
(quantile-sorted xs p)
 
-Gets the quantile value from `xs` at `p` from sorted population.
Community Examples

math/quickselect function source
(quickselect arr k &opt left right)
+Gets the quantile value from `xs` at `p` from sorted population.

math/quickselect function source
(quickselect arr k &opt left right)
 
 Rearrange items in `arr` so that all items in `[left, k]` range
 are the smallest.
 The `k`-th element will have the `(k - left + 1)`-th smallest value
 in `[left, right]`.
-Mutates `arr`.
Community Examples

math/relative-err function source
(relative-err a e)
+Mutates `arr`.

math/relative-err function source
(relative-err a e)
 
 Gets the relative err between actual number `a`
-and expected number `e`.
Community Examples

math/root-mean-square function source
(root-mean-square xs)
+and expected number `e`.

math/root-mean-square function source
(root-mean-square xs)
 
-Gets the root mean square from `xs`.
Community Examples

math/rows function source
(rows m)
+Gets the root mean square from `xs`.

math/rows function source
(rows m)
 
-Returns numbers of rows of matrix `m`.
Community Examples

math/sample-correlation function source
(sample-correlation xs ys)
+Returns numbers of rows of matrix `m`.

math/sample-correlation function source
(sample-correlation xs ys)
 
-Gets the sample correlation between `xs` and `ys`.
Community Examples

math/sample-covariance function source
(sample-covariance xs ys)
+Gets the sample correlation between `xs` and `ys`.

math/sample-covariance function source
(sample-covariance xs ys)
 
-Gets the sample covariance between `xs` and `ys`.
Community Examples

math/sample-skewness function source
(sample-skewness xs)
+Gets the sample covariance between `xs` and `ys`.

math/sample-skewness function source
(sample-skewness xs)
 
-Gets the sample skeweness from the `xs`.
Community Examples

math/sample-standard-deviation function source
(sample-standard-deviation xs)
+Gets the sample skeweness from the `xs`.

math/sample-standard-deviation function source
(sample-standard-deviation xs)
 
-Gets sample standard deviation from `xs`.
Community Examples

math/sample-variance function source
(sample-variance xs)
+Gets sample standard deviation from `xs`.

math/sample-variance function source
(sample-variance xs)
 
-Get the sample variance from `xs`.
Community Examples

math/scalar function source
(scalar c s)
+Get the sample variance from `xs`.

math/scalar function source
(scalar c s)
 
-Creates scalar `s` matrix with `c` x `c` size.
Community Examples

math/shuffle-in-place function source
(shuffle-in-place xs)
+Creates scalar `s` matrix with `c` x `c` size.

math/shuffle-in-place function source
(shuffle-in-place xs)
 
 Generate random permutation of the array `xs`
-which is shuffled in place.
Community Examples

math/size function source
(size m)
+which is shuffled in place.

math/size function source
(size m)
 
-Returns tuple with the matrix `m` size [rows cols].
Community Examples

math/sop function source
(sop m op & a)
+Returns tuple with the matrix `m` size [rows cols].

math/sop function source
(sop m op & a)
 
 Mutates every cell of the matrix `m` with `op`
-and variadic args `a`.
Community Examples

math/standard-deviation function source
(standard-deviation xs)
+and variadic args `a`.

math/standard-deviation function source
(standard-deviation xs)
 
-Gets the standard deviation from `ds`.
Community Examples

math/standard-normal-table tuple source
Computed standard normal table.
Community Examples

math/sum-compensated function source
(sum-compensated xs)
+Gets the standard deviation from `ds`.

math/standard-normal-table tuple source
Computed standard normal table.

math/sum-compensated function source
(sum-compensated xs)
 
-Returns sum of the members of `xs` with Kahan-Babushka algorithm.
Community Examples

math/sum-nth-power-deviations function source
(sum-nth-power-deviations xs n)
+Returns sum of the members of `xs` with Kahan-Babushka algorithm.

math/sum-nth-power-deviations function source
(sum-nth-power-deviations xs n)
 
-Get the sum of deviations to the n power.
Community Examples

math/swap function source
(swap arr i j)
+Get the sum of deviations to the n power.

math/swap function source
(swap arr i j)
 
 Swaps members with indices `i` and `j` of arr.
-Noop when `i` equals `j`.
Community Examples

math/t-test function source
(t-test xs expv)
+Noop when `i` equals `j`.

math/t-test function source
(t-test xs expv)
 
 Computes one sample t-test comparing the mean of `xs`
-to known value `expv`.
Community Examples

math/t-test-2 function source
(t-test-2 xs ys &opt d)
+to known value `expv`.

math/t-test-2 function source
(t-test-2 xs ys &opt d)
 
 Computes two sample t-test of two samples `xs` and `ys`
-with difference optional `d` which defaults to 0.
Community Examples

math/trans function source
(trans m)
+with difference optional `d` which defaults to 0.

math/trans function source
(trans m)
 
-Returns a new transposed matrix from `m`.
Community Examples

math/variance function source
(variance xs)
+Returns a new transposed matrix from `m`.

math/variance function source
(variance xs)
 
-Get the variance from the `xs`.
Community Examples

math/z-score function source
(z-score x m d)
+Get the variance from the `xs`.

math/z-score function source
(z-score x m d)
 
 Gets the standard score for number `x` from mean `m` 
-and standard deviation `d`.
Community Examples

math/zero function source
(zero c &opt r)
+and standard deviation `d`.

math/zero function source
(zero c &opt r)
 
 Creates vector of length `c`, or matrix if `r`
-is provided, and fills it with zeros.
Community Examples
+is provided, and fills it with zeros.

JSON Miscellaneous Functions diff --git a/static/1.27.0/api/spork/misc.html b/static/1.27.0/api/spork/misc.html index 96ff259e..481d1d0e 100644 --- a/static/1.27.0/api/spork/misc.html +++ b/static/1.27.0/api/spork/misc.html @@ -114,81 +114,81 @@

Index

misc/always misc/antepenultimate misc/caperr misc/capout misc/cond-> misc/cond->> misc/dedent misc/defs misc/dfs misc/do-def misc/do-var misc/format-table misc/gett misc/insert-sorted misc/insert-sorted-by misc/int->string misc/int/ misc/log misc/make misc/make-id misc/map-keys misc/map-vals misc/penultimate misc/print-table misc/randomize-array misc/second misc/select-keys misc/set* misc/string->int misc/table-filter misc/third misc/trim-prefix misc/trim-suffix misc/until misc/vars


misc/always function source
(always x)
 
-Return a function that discards any arguments and always returns `x`.
Community Examples

misc/antepenultimate function source
(antepenultimate xs)
+Return a function that discards any arguments and always returns `x`.

misc/antepenultimate function source
(antepenultimate xs)
 
-Get the third-to-last element from an indexed data structure.
Community Examples

misc/caperr macro source
(caperr & body)
+Get the third-to-last element from an indexed data structure.

misc/caperr macro source
(caperr & body)
 
 Captures the standart error output of the variadic `body` and returns it
-as a buffer.
Community Examples

misc/capout macro source
(capout & body)
+as a buffer.

misc/capout macro source
(capout & body)
 
 Captures the standart output of the variadic `body` and returns it as
-a buffer.
Community Examples

misc/cond-> macro source
(cond-> val & clauses)
+a buffer.

misc/cond-> macro source
(cond-> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs with condition and operation to which the `val`,
 is put as first argument. All conditions are tried and
 for truthy conditions the operation is executed.
-Returns the value mutated if any condition is truthy.
Community Examples

misc/cond->> macro source
(cond->> val & clauses)
+Returns the value mutated if any condition is truthy.

misc/cond->> macro source
(cond->> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs of condition and operation to which the `val`,
 is put as last argument. All conditions are tried and
 for truthy the operation is ran.
-Returns mutated value if any condition is truthy.
Community Examples

misc/dedent function source
(dedent & xs)
+Returns mutated value if any condition is truthy.

misc/dedent function source
(dedent & xs)
 
 Remove indentation after concatenating the arguments. Works by removing
 leading whitespace, and then removing that same pattern of whitepsace after
-new lines.
Community Examples

misc/defs macro source
(defs & bindings)
+new lines.

misc/defs macro source
(defs & bindings)
 
-Defines many constants as in let `bindings`, but without creating new scope.
Community Examples

misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
+Defines many constants as in let `bindings`, but without creating new scope.

misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
 
 Do a depth first, pre-order traversal over a data structure.
 Also allow for callbacks before and after visiting the children
 of a node. Also allow for a custom `get-children` function to
 change traversal as needed. Will detect cycles if an empty table
 is passed as the `seen` parameter, which is used to cached values
-that have been visited.
Community Examples

misc/do-def macro source
(do-def c d & body)
+that have been visited.

misc/do-def macro source
(do-def c d & body)
 
 Convenience macro for defining constant named `c` with value `d` before `body`
 and returning it after evaluating `body`, that presumably modifies 
-the `c` refered content. For example buffer, table or array.
Community Examples

misc/do-var macro source
(do-var v d & body)
+the `c` refered content. For example buffer, table or array.

misc/do-var macro source
(do-var v d & body)
 
 Convenience macro for defining varible named `v` with value `d` before `body`
-and returning it after evaluating `body`, that presumably modifies `v`.
Community Examples

misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
+and returning it after evaluating `body`, that presumably modifies `v`.

misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
 
-Same as print-table but pushes table into a buffer.
Community Examples

misc/gett macro source
(gett ds & keys)
+Same as print-table but pushes table into a buffer.

misc/gett macro source
(gett ds & keys)
 
-Recursive macro (get). Similar to get-in, but keys are variadic argument.
Community Examples

misc/insert-sorted function source
(insert-sorted arr <? & xs)
+Recursive macro (get). Similar to get-in, but keys are variadic argument.

misc/insert-sorted function source
(insert-sorted arr <? & xs)
 
 Insert elements in `arr` such that it remains sorted by the comparator. If
-`arr` is not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
+`arr` is not sorted beforehand, the results are undefined. Returns `arr`.

misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
 
 Insert elements in `arr` such that it remains sorted by the value returned
 when `f` is called with the element, comparing the values with <. If `arr` is
-not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

misc/int->string function source
(int->string int &opt base)
+not sorted beforehand, the results are undefined. Returns `arr`.

misc/int->string function source
(int->string int &opt base)
 
-Stringify an integer in a particular base. Defaults to decimal (base 10).
Community Examples

misc/int/ function source
(int/ & xs)
+Stringify an integer in a particular base. Defaults to decimal (base 10).

misc/int/ function source
(int/ & xs)
 
-Perform integer division.
Community Examples

misc/log macro source
(log level & args)
+Perform integer division.

misc/log macro source
(log level & args)
 
 Print to a dynamic binding stream if that stream is set, otherwise do
 nothing. Evaluate to nil. 
 For example, `(log :err "value error: %V" my-value)` will print 
-to `(dyn :err)` only if `(dyn :err)` has been set.
Community Examples

misc/make macro source
(make prototype & pairs)
+to `(dyn :err)` only if `(dyn :err)` has been set.

misc/make macro source
(make prototype & pairs)
 
 Convenience macro for creating new table from even number of kvs pairs in a variadic `table-or-pairs`
 arguments and setting its prototype to `prototype`.
-Factory function for creating new objects from prototypes.
Community Examples

misc/make-id function source
(make-id &opt prefix)
+Factory function for creating new objects from prototypes.

misc/make-id function source
(make-id &opt prefix)
 
 Create a random, printable keyword id with 10 bytes of entropy
-with an optional prefix.
Community Examples

misc/map-keys function source
(map-keys f data)
+with an optional prefix.

misc/map-keys function source
(map-keys f data)
 
 Returns new table with function `f` applied to `data`'s
-keys recursively.
Community Examples

misc/map-vals function source
(map-vals f data)
+keys recursively.

misc/map-vals function source
(map-vals f data)
 
-Returns new table with function `f` applied to `data`'s values.
Community Examples

misc/penultimate function source
(penultimate xs)
+Returns new table with function `f` applied to `data`'s values.

misc/penultimate function source
(penultimate xs)
 
-Get the second-to-last element from an indexed data structure.
Community Examples

misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
+Get the second-to-last element from an indexed data structure.

misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
 
 Iterate through the rows of a data structure and print a table in a human
 readable way, with padding and heading information. Can optionally provide
@@ -196,37 +196,37 @@ 

Index for each row. Lastly, a `header-mapping` dictionary can be provided that changes the printed header names by mapping column keys to the desired header name. If no mapping is found, then the column key will be used as -the header name. Returns nil.

Community Examples

misc/randomize-array function source
(randomize-array arr &opt rng)
+the header name. Returns nil.

misc/randomize-array function source
(randomize-array arr &opt rng)
 
 Randomizes array using the fisher-yates shuffle, takes an optional random
-number generator.
Community Examples

misc/second function source
(second xs)
+number generator.

misc/second function source
(second xs)
 
-Get the second element from an indexed data structure.
Community Examples

misc/select-keys function source
(select-keys data keyz)
+Get the second element from an indexed data structure.

misc/select-keys function source
(select-keys data keyz)
 
-Returns new table with selected `keyz` from dictionary `data`.
Community Examples

misc/set* macro source
(set* tgts exprs)
+Returns new table with selected `keyz` from dictionary `data`.

misc/set* macro source
(set* tgts exprs)
 
 Parallel `set` function. Takes a list of targets and
 expressions, evaluates all the expressions, and then
 assigns them to the targets. Each target can be a variable
-or a 2-tuple, just like in the normal `set` special form.
Community Examples

misc/string->int function source
(string->int str &opt base)
+or a 2-tuple, just like in the normal `set` special form.

misc/string->int function source
(string->int str &opt base)
 
 Parse an integer in the given base. Defaults to decimal (base 10). Differs
-from scan-number in that this does not recognize floating point notation.
Community Examples

misc/table-filter function source
(table-filter pred dict)
+from scan-number in that this does not recognize floating point notation.

misc/table-filter function source
(table-filter pred dict)
 
 Filter a key-value structure info a table. Semantics are the same as for
 built-in `filter`, except that `pred` takes two arguments (key and value.)
-Does not consider prototypes.
Community Examples

misc/third function source
(third xs)
+Does not consider prototypes.

misc/third function source
(third xs)
 
-Get the third element from an indexed data structure.
Community Examples

misc/trim-prefix function source
(trim-prefix prefix str)
+Get the third element from an indexed data structure.

misc/trim-prefix function source
(trim-prefix prefix str)
 
-Trim the specified prefix of a string if it has one
Community Examples

misc/trim-suffix function source
(trim-suffix suffix str)
+Trim the specified prefix of a string if it has one

misc/trim-suffix function source
(trim-suffix suffix str)
 
-Trim the specified suffix of a string if it has one
Community Examples

misc/until macro source
(until cnd & body)
+Trim the specified suffix of a string if it has one

misc/until macro source
(until cnd & body)
 
 Repeat `body` while the `cnd` is false.
-Equivalent to (while (not cnd) ;body).
Community Examples

misc/vars macro source
(vars & bindings)
+Equivalent to (while (not cnd) ;body).

misc/vars macro source
(vars & bindings)
 
-Defines many variables as in let `bindings`, but without creating new scope.
Community Examples
+Defines many variables as in let `bindings`, but without creating new scope.
Math extended NetREPL diff --git a/static/1.27.0/api/spork/msg.html b/static/1.27.0/api/spork/msg.html index cb31d38a..beaa5d03 100644 --- a/static/1.27.0/api/spork/msg.html +++ b/static/1.27.0/api/spork/msg.html @@ -114,11 +114,11 @@

Index

msg/make-proto msg/make-recv msg/make-send


msg/make-proto function source
(make-proto stream &opt pack unpack)
 
-Create both a send an recv function from a stream, as with `make-send` and `make-recv`.
Community Examples

msg/make-recv function source
(make-recv stream &opt unpack)
+Create both a send an recv function from a stream, as with `make-send` and `make-recv`.

msg/make-recv function source
(make-recv stream &opt unpack)
 
-Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.
Community Examples

msg/make-send function source
(make-send stream &opt pack)
+Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.

msg/make-send function source
(make-send stream &opt pack)
 
-Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Community Examples
+Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Shell Utilities Test diff --git a/static/1.27.0/api/spork/netrepl.html b/static/1.27.0/api/spork/netrepl.html index 0f7f84f1..edb4f6f0 100644 --- a/static/1.27.0/api/spork/netrepl.html +++ b/static/1.27.0/api/spork/netrepl.html @@ -114,11 +114,11 @@

Index

netrepl/client netrepl/default-host netrepl/default-port netrepl/server netrepl/server-single


netrepl/client function source
(client &opt host port name)
 
-Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".
Community Examples

netrepl/default-host string source
Default host to run server on and connect to.
Community Examples

netrepl/default-port string source
Default port to run the net repl.
Community Examples

netrepl/server function source
(server &opt host port env cleanup welcome-msg)
+Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".

netrepl/default-host string source
Default host to run server on and connect to.

netrepl/default-port string source
Default port to run the net repl.

netrepl/server function source
(server &opt host port env cleanup welcome-msg)
 
-Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.
Community Examples

netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
+Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.

netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
 
-Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Community Examples
+Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Miscellaneous Functions Path Utilities diff --git a/static/1.27.0/api/spork/path.html b/static/1.27.0/api/spork/path.html index fe3ce9b1..719c07e6 100644 --- a/static/1.27.0/api/spork/path.html +++ b/static/1.27.0/api/spork/path.html @@ -114,59 +114,59 @@

Index

path/abspath path/abspath? path/basename path/delim path/dirname path/ext path/join path/normalize path/parts path/posix/abspath path/posix/abspath? path/posix/basename path/posix/delim path/posix/dirname path/posix/ext path/posix/join path/posix/normalize path/posix/parts path/posix/relpath path/posix/sep path/relpath path/sep path/win32/abspath path/win32/abspath? path/win32/basename path/win32/delim path/win32/dirname path/win32/ext path/win32/join path/win32/normalize path/win32/parts path/win32/relpath path/win32/sep


path/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

path/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/basename function source
(posix/basename path)
+Check if a path is absolute.

path/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

path/delim string source
Platform delimiter
Community Examples

path/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

path/delim string source
Platform delimiter

path/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/ext function source
(ext path)
+Gets the directory name of a path.

path/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/join function source
(posix/join & els)
+Get the file extension for a path.

path/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

path/normalize function source
(posix/normalize path)
+Join path elements together.

path/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

path/posix/abspath function source
(posix/abspath path)
+Split a path into its parts.

path/posix/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/posix/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

path/posix/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/posix/basename function source
(posix/basename path)
+Check if a path is absolute.

path/posix/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

path/posix/delim string source
Platform delimiter
Community Examples

path/posix/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

path/posix/delim string source
Platform delimiter

path/posix/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/posix/ext function source
(ext path)
+Gets the directory name of a path.

path/posix/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/posix/join function source
(posix/join & els)
+Get the file extension for a path.

path/posix/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

path/posix/normalize function source
(posix/normalize path)
+Join path elements together.

path/posix/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/posix/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/posix/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

path/posix/relpath function source
(posix/relpath source target)
+Split a path into its parts.

path/posix/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/posix/sep string source
Platform separator
Community Examples

path/relpath function source
(posix/relpath source target)
+Get the relative path between two subpaths.

path/posix/sep string source
Platform separator

path/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/sep string source
Platform separator
Community Examples

path/win32/abspath function source
(win32/abspath path)
+Get the relative path between two subpaths.

path/sep string source
Platform separator

path/win32/abspath function source
(win32/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/win32/abspath? function source
(win32/abspath? path)
+Coerce a path to be absolute.

path/win32/abspath? function source
(win32/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/win32/basename function source
(win32/basename path)
+Check if a path is absolute.

path/win32/basename function source
(win32/basename path)
 
-Gets the base file name of a path.
Community Examples

path/win32/delim string source
Platform delimiter
Community Examples

path/win32/dirname function source
(win32/dirname path)
+Gets the base file name of a path.

path/win32/delim string source
Platform delimiter

path/win32/dirname function source
(win32/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/win32/ext function source
(ext path)
+Gets the directory name of a path.

path/win32/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/win32/join function source
(win32/join & els)
+Get the file extension for a path.

path/win32/join function source
(win32/join & els)
 
-Join path elements together.
Community Examples

path/win32/normalize function source
(win32/normalize path)
+Join path elements together.

path/win32/normalize function source
(win32/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/win32/parts function source
(win32/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/win32/parts function source
(win32/parts path)
 
-Split a path into its parts.
Community Examples

path/win32/relpath function source
(win32/relpath source target)
+Split a path into its parts.

path/win32/relpath function source
(win32/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/win32/sep string source
Platform separator
Community Examples
+Get the relative path between two subpaths.

path/win32/sep string source
Platform separator
NetREPL Raw Terminal Functionality diff --git a/static/1.27.0/api/spork/rawterm.html b/static/1.27.0/api/spork/rawterm.html index 0c063dbe..4eeedbca 100644 --- a/static/1.27.0/api/spork/rawterm.html +++ b/static/1.27.0/api/spork/rawterm.html @@ -114,25 +114,25 @@

Index

rawterm/begin rawterm/buffer-traverse rawterm/ctrl-z rawterm/end rawterm/getch rawterm/isatty rawterm/monowidth rawterm/rune-monowidth rawterm/size rawterm/slice-monowidth


rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
 
-Begin raw terminal functionality. Return a stream that can be read from to get input.
Community Examples

rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
+Begin raw terminal functionality. Return a stream that can be read from to get input.

rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
 
-Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.
Community Examples

rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
+Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.

rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
 
-A handler that a user can use to handle ctrl-z from input to suspend the current process.
Community Examples

rawterm/end cfunction source
(rawterm/end)
+A handler that a user can use to handle ctrl-z from input to suspend the current process.

rawterm/end cfunction source
(rawterm/end)
 
-End raw terminal functionality.
Community Examples

rawterm/getch cfunction source
(rawterm/getch &opt into)
+End raw terminal functionality.

rawterm/getch cfunction source
(rawterm/getch &opt into)
 
-Get a byte of input from stdin, without blocking if possible. Returns a buffer.
Community Examples

rawterm/isatty cfunction source
(rawterm/isatty)
+Get a byte of input from stdin, without blocking if possible. Returns a buffer.

rawterm/isatty cfunction source
(rawterm/isatty)
 
-Check if the current stdin is a tty.
Community Examples

rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
+Check if the current stdin is a tty.

rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
 
-Measure the monospace width of a string.
Community Examples

rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
+Measure the monospace width of a string.

rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
 
-Get the monospace width of a rune. Returns either 0, 1, or 2.
Community Examples

rawterm/size cfunction source
(rawterm/size)
+Get the monospace width of a rune. Returns either 0, 1, or 2.

rawterm/size cfunction source
(rawterm/size)
 
-Get the number of rows and columns visible in the terminal as tuple [rows cols]
Community Examples

rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
+Get the number of rows and columns visible in the terminal as tuple [rows cols]

rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
 
-Get a byte slice that will fit into a number of columns.
Community Examples
+Get a byte slice that will fit into a number of columns.
Path Utilities Regular Expression PEG Syntax diff --git a/static/1.27.0/api/spork/regex.html b/static/1.27.0/api/spork/regex.html index 138bd2c7..b67d9bc6 100644 --- a/static/1.27.0/api/spork/regex.html +++ b/static/1.27.0/api/spork/regex.html @@ -117,19 +117,19 @@

Index

regex/compile regex/find regex/find-all regex/match regex/peg regex/replace regex/replace-all regex/source


regex/compile function source
(compile pattern)
 
-Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.
Community Examples

regex/find function source
(find reg text &opt start)
+Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.

regex/find function source
(find reg text &opt start)
 
-Similar to peg/find, but for regexes.
Community Examples

regex/find-all function source
(find-all reg text &opt start)
+Similar to peg/find, but for regexes.

regex/find-all function source
(find-all reg text &opt start)
 
-Similar to peg/find-all, but for regexes.
Community Examples

regex/match function source
(match reg text &opt start)
+Similar to peg/find-all, but for regexes.

regex/match function source
(match reg text &opt start)
 
-Similar to peg/match, but for regexes.
Community Examples

regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.
Community Examples

regex/replace function source
(replace reg rep text &opt start)
+Similar to peg/match, but for regexes.

regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.

regex/replace function source
(replace reg rep text &opt start)
 
-Similar to peg/replace, but for regexes.
Community Examples

regex/replace-all function source
(replace-all reg rep text &opt start)
+Similar to peg/replace, but for regexes.

regex/replace-all function source
(replace-all reg rep text &opt start)
 
-Similar to peg/replace-all, but for regexes.
Community Examples

regex/source function source
(source pattern)
+Similar to peg/replace-all, but for regexes.

regex/source function source
(source pattern)
 
-Compile a subset of regex to PEG source code.
Community Examples
+Compile a subset of regex to PEG source code.
Raw Terminal Functionality Remote Procedure Calls diff --git a/static/1.27.0/api/spork/rpc.html b/static/1.27.0/api/spork/rpc.html index b432b723..3449fcd2 100644 --- a/static/1.27.0/api/spork/rpc.html +++ b/static/1.27.0/api/spork/rpc.html @@ -114,9 +114,9 @@

Index

rpc/client rpc/default-host rpc/default-port rpc/server


rpc/client function source
(client &opt host port name)
 
-Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.
Community Examples

rpc/default-host string source
Default host to run server on and connect to.
Community Examples

rpc/default-port string source
Default port to run the net repl.
Community Examples

rpc/server function source
(server functions &opt host port workers-per-connection)
+Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.

rpc/default-host string source
Default host to run server on and connect to.

rpc/default-port string source
Default port to run the net repl.

rpc/server function source
(server functions &opt host port workers-per-connection)
 
-Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Community Examples
+Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Regular Expression PEG Syntax Schema diff --git a/static/1.27.0/api/spork/schema.html b/static/1.27.0/api/spork/schema.html index d78ca66f..9087efa7 100644 --- a/static/1.27.0/api/spork/schema.html +++ b/static/1.27.0/api/spork/schema.html @@ -114,13 +114,13 @@

Index

schema/make-predicate schema/make-validator schema/predicate schema/validator


schema/make-predicate function source
(make-predicate schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `predicate`.
Community Examples

schema/make-validator function source
(make-validator schema)
+Generate a function that can be used to validate a data structure. This is the function form of `predicate`.

schema/make-validator function source
(make-validator schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `validator`.
Community Examples

schema/predicate macro source
(predicate pattern)
+Generate a function that can be used to validate a data structure. This is the function form of `validator`.

schema/predicate macro source
(predicate pattern)
 
-Make a validation predicate given a certain schema.
Community Examples

schema/validator macro source
(validator pattern)
+Make a validation predicate given a certain schema.

schema/validator macro source
(validator pattern)
 
-Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Community Examples
+Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Remote Procedure Calls Shell Utilities diff --git a/static/1.27.0/api/spork/sh.html b/static/1.27.0/api/spork/sh.html index 90bbe383..116d8e70 100644 --- a/static/1.27.0/api/spork/sh.html +++ b/static/1.27.0/api/spork/sh.html @@ -115,28 +115,28 @@

Index

sh/copy sh/copy-file sh/create-dirs sh/devnull sh/exec-slurp sh/exec-slurp-all sh/exists? sh/list-all-files sh/make-new-file sh/rm sh/scan-directory


sh/copy function source
(copy src dest)
 
 Copy a file or directory recursively from one location to another.
-Expects input to be unix style paths
Community Examples

sh/copy-file function source
(copy-file src-path dst-path)
+Expects input to be unix style paths

sh/copy-file function source
(copy-file src-path dst-path)
 
-Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.
Community Examples

sh/create-dirs function source
(create-dirs dir-path)
+Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.

sh/create-dirs function source
(create-dirs dir-path)
 
-Create all directories in path specified as string including itself.
Community Examples

sh/devnull function source
(devnull)
+Create all directories in path specified as string including itself.

sh/devnull function source
(devnull)
 
-get the /dev/null equivalent of the current platform as an open file
Community Examples

sh/exec-slurp function source
(exec-slurp & args)
+get the /dev/null equivalent of the current platform as an open file

sh/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

sh/exec-slurp-all function source
(exec-slurp-all & args)
+Read stdout of subprocess and return it trimmed in a string.

sh/exec-slurp-all function source
(exec-slurp-all & args)
 
 Read stdout and stderr of subprocess and return it trimmed in a struct with :err and :out containing the output as string.
-This will also return the exit code under the :status key.
Community Examples

sh/exists? function source
(exists? path)
+This will also return the exit code under the :status key.

sh/exists? function source
(exists? path)
 
-Check if the given file or directory exists. (Follows symlinks)
Community Examples

sh/list-all-files function source
(list-all-files dir &opt into)
+Check if the given file or directory exists. (Follows symlinks)

sh/list-all-files function source
(list-all-files dir &opt into)
 
-List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.
Community Examples

sh/make-new-file function source
(make-new-file file-path &opt mode)
+List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.

sh/make-new-file function source
(make-new-file file-path &opt mode)
 
-Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).
Community Examples

sh/rm function source
(rm path)
+Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).

sh/rm function source
(rm path)
 
-Remove a directory and all sub directories recursively.
Community Examples

sh/scan-directory function source
(scan-directory dir func)
+Remove a directory and all sub directories recursively.

sh/scan-directory function source
(scan-directory dir func)
 
-Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.
Community Examples
+Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.

Schema Simple Messaging Protocol diff --git a/static/1.27.0/api/spork/tarray.html b/static/1.27.0/api/spork/tarray.html index 66faf099..4092174b 100644 --- a/static/1.27.0/api/spork/tarray.html +++ b/static/1.27.0/api/spork/tarray.html @@ -114,19 +114,19 @@

Index

tarray/buffer tarray/copy-bytes tarray/length tarray/new tarray/properties tarray/slice tarray/swap-bytes


tarray/buffer cfunction
(tarray/buffer array|size)
 
-Return typed array buffer or create a new buffer.
Community Examples

tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
+Return typed array buffer or create a new buffer.

tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
 
-Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.
Community Examples

tarray/length cfunction
(tarray/length array|buffer)
+Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.

tarray/length cfunction
(tarray/length array|buffer)
 
-Return typed array or buffer size.
Community Examples

tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
+Return typed array or buffer size.

tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
 
-Create new typed array.
Community Examples

tarray/properties cfunction
(tarray/properties array)
+Create new typed array.

tarray/properties cfunction
(tarray/properties array)
 
-Return typed array properties as a struct.
Community Examples

tarray/slice cfunction
(tarray/slice tarr &opt start end)
+Return typed array properties as a struct.

tarray/slice cfunction
(tarray/slice tarr &opt start end)
 
-Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.
Community Examples

tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
+Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.

tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
 
-Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Community Examples
+Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Test Zip Files diff --git a/static/1.27.0/api/spork/test.html b/static/1.27.0/api/spork/test.html index d3ccbf6b..d5ba6867 100644 --- a/static/1.27.0/api/spork/test.html +++ b/static/1.27.0/api/spork/test.html @@ -114,34 +114,34 @@

Index

test/assert test/assert-docs test/assert-error test/assert-no-error test/assert-not test/capture-stderr test/capture-stdout test/end-suite test/start-suite test/suppress-stderr test/suppress-stdout test/timeit


test/assert macro source
(assert x &opt e)
 
-Override's the default assert with some nice error handling.
Community Examples

test/assert-docs function source
(assert-docs path)
+Override's the default assert with some nice error handling.

test/assert-docs function source
(assert-docs path)
 
 Assert that all symbols, when module on the path is required,
-have proper doc string
Community Examples

test/assert-error macro source
(assert-error msg & forms)
+have proper doc string

test/assert-error macro source
(assert-error msg & forms)
 
-Test passes if forms error.
Community Examples

test/assert-no-error macro source
(assert-no-error msg & forms)
+Test passes if forms error.

test/assert-no-error macro source
(assert-no-error msg & forms)
 
-Test passes if forms do not error.
Community Examples

test/assert-not macro source
(assert-not x &opt e)
+Test passes if forms do not error.

test/assert-not macro source
(assert-not x &opt e)
 
-Invert assert.
Community Examples

test/capture-stderr macro source
(capture-stderr & body)
+Invert assert.

test/capture-stderr macro source
(capture-stderr & body)
 
 Runs the form and captures stderr. Returns tuple with result of the form
-and a string with captured stderr.
Community Examples

test/capture-stdout macro source
(capture-stdout & body)
+and a string with captured stderr.

test/capture-stdout macro source
(capture-stdout & body)
 
 Runs the form and captures stdout. Returns tuple with result of the form
-and a string with captured stdout.
Community Examples

test/end-suite function source
(end-suite)
+and a string with captured stdout.

test/end-suite function source
(end-suite)
 
-Ends test suite, prints summary and exits if any have failed.
Community Examples

test/start-suite function source
(start-suite &opt name)
+Ends test suite, prints summary and exits if any have failed.

test/start-suite function source
(start-suite &opt name)
 
-Starts test suite.
Community Examples

test/suppress-stderr macro source
(suppress-stderr & body)
+Starts test suite.

test/suppress-stderr macro source
(suppress-stderr & body)
 
-Suppreses stdout from the body
Community Examples

test/suppress-stdout macro source
(suppress-stdout & body)
+Suppreses stdout from the body

test/suppress-stdout macro source
(suppress-stdout & body)
 
-Suppreses stdout from the body
Community Examples

test/timeit macro source
(timeit form &opt tag)
+Suppreses stdout from the body

test/timeit macro source
(timeit form &opt tag)
 
 Time the execution of `form` using `os/clock` before and after,
 and print the result to stdout. returns: result of executing `form`.
-Uses `tag` (default "Elapsed time:") to tag the printout.
Community Examples
+Uses `tag` (default "Elapsed time:") to tag the printout.
Simple Messaging Protocol Typed Arrays diff --git a/static/1.27.0/api/spork/zip.html b/static/1.27.0/api/spork/zip.html index 840c9c57..22ca1d42 100644 --- a/static/1.27.0/api/spork/zip.html +++ b/static/1.27.0/api/spork/zip.html @@ -114,33 +114,33 @@

Index

zip/add-bytes zip/add-file zip/compress zip/decompress zip/extract zip/file-directory? zip/file-encrypted? zip/file-supported? zip/get-filename zip/locate-file zip/read-bytes zip/read-file zip/reader-close zip/reader-count zip/stat zip/version zip/write-buffer zip/write-file zip/writer-close zip/writer-finalize


zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
 
-Add a byte sequence to the zip writer.
Community Examples

zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
+Add a byte sequence to the zip writer.

zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
 
-Add a file to the zip writer.
Community Examples

zip/compress cfunction source
(zip/compress bytes &opt level into)
+Add a file to the zip writer.

zip/compress cfunction source
(zip/compress bytes &opt level into)
 
-Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.
Community Examples

zip/decompress cfunction source
(zip/decompress bytes &opt into)
+Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.

zip/decompress cfunction source
(zip/decompress bytes &opt into)
 
-Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.
Community Examples

zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
+Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.

zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
 
-Extract a file from the zip archive, either to memory or to a file on disk.
Community Examples

zip/file-directory? cfunction source
(zip/file-directory? reader idx)
+Extract a file from the zip archive, either to memory or to a file on disk.

zip/file-directory? cfunction source
(zip/file-directory? reader idx)
 
-Check if a file index is a directory.
Community Examples

zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
+Check if a file index is a directory.

zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
 
-Check if a file is encrypted inside an archive.
Community Examples

zip/file-supported? cfunction source
(zip/file-supported? reader idx)
+Check if a file is encrypted inside an archive.

zip/file-supported? cfunction source
(zip/file-supported? reader idx)
 
-Check if a file is supported with this verstion of miniz.
Community Examples

zip/get-filename cfunction source
(zip/get-filename reader idx)
+Check if a file is supported with this verstion of miniz.

zip/get-filename cfunction source
(zip/get-filename reader idx)
 
-Convert a file index index in the archive to a filename.
Community Examples

zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
+Convert a file index index in the archive to a filename.

zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
 
-Get the index of a particular filename in the archive.
Community Examples

zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
+Get the index of a particular filename in the archive.

zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
 
-Read a byte sequence as a zip archive. Returns a new zip reader.
Community Examples

zip/read-file cfunction source
(zip/read-file filename &opt flags)
+Read a byte sequence as a zip archive. Returns a new zip reader.

zip/read-file cfunction source
(zip/read-file filename &opt flags)
 
-Read a file as a zip archive. Returns a new zip reader.
Community Examples

zip/reader-close cfunction source
(zip/reader-close reader)
+Read a file as a zip archive. Returns a new zip reader.

zip/reader-close cfunction source
(zip/reader-close reader)
 
-Close a reader and free related memory.
Community Examples

zip/reader-count cfunction source
(zip/reader-count reader)
+Close a reader and free related memory.

zip/reader-count cfunction source
(zip/reader-count reader)
 
-Get the number of files inside the zip archive. The files can be indexed 
Community Examples

zip/stat cfunction source
(zip/stat reader idx)
+Get the number of files inside the zip archive. The files can be indexed 

zip/stat cfunction source
(zip/stat reader idx)
 
 Get stat information of file. Returns a new struct with the following fields:
 
@@ -157,17 +157,17 @@ 

Index * :comment * :internal-attr * :external-attr -

Community Examples

zip/version cfunction source
(zip/version)
+

zip/version cfunction source
(zip/version)
 
-Get the version string of the underlying miniz library.
Community Examples

zip/write-buffer cfunction source
(zip/write-buffer)
+Get the version string of the underlying miniz library.

zip/write-buffer cfunction source
(zip/write-buffer)
 
-Create a new zip archive writer that write to memory.
Community Examples

zip/write-file cfunction source
(zip/write-file dest-path)
+Create a new zip archive writer that write to memory.

zip/write-file cfunction source
(zip/write-file dest-path)
 
-Create a new zip archive writer that will write into an archive file.
Community Examples

zip/writer-close cfunction source
(zip/writer-close writer)
+Create a new zip archive writer that will write into an archive file.

zip/writer-close cfunction source
(zip/writer-close writer)
 
-Close a ZipWriter.
Community Examples

zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
+Close a ZipWriter.

zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
 
-Finalize a writer, writing any zip files to disk. Return the writer.
Community Examples
+Finalize a writer, writing any zip files to disk. Return the writer.
Typed Arrays String Module diff --git a/static/1.28.0/api/jpm/cc.html b/static/1.28.0/api/jpm/cc.html index 8dcc88a7..a957e849 100644 --- a/static/1.28.0/api/jpm/cc.html +++ b/static/1.28.0/api/jpm/cc.html @@ -116,35 +116,35 @@

Index

cc/archive-c cc/compile-c cc/create-buffer-c cc/create-buffer-c-impl cc/create-executable cc/embed-name cc/entry-name cc/entry-replace cc/link-c cc/make-bin-source cc/make-define cc/make-defines cc/modpath-to-meta cc/modpath-to-static cc/out-path


cc/archive-c function source
(archive-c opts target & objects)
 
-Link object files together to make a static library.
Community Examples

cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
+Link object files together to make a static library.

cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
 
-Compile a C file into an object file.
Community Examples

cc/create-buffer-c function source
(create-buffer-c source dest name)
+Compile a C file into an object file.

cc/create-buffer-c function source
(create-buffer-c source dest name)
 
-Inline raw byte file as a c file.
Community Examples

cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
+Inline raw byte file as a c file.

cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
 
-
Community Examples

cc/create-executable function source
(create-executable opts source dest no-core)
+

cc/create-executable function source
(create-executable opts source dest no-core)
 
-Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.
Community Examples

cc/embed-name function source
(embed-name path)
+Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.

cc/embed-name function source
(embed-name path)
 
-Rename a janet symbol for embedding.
Community Examples

cc/entry-name function source
(entry-name name)
+Rename a janet symbol for embedding.

cc/entry-name function source
(entry-name name)
 
-Name of symbol that enters static compilation of a module.
Community Examples

cc/entry-replace function source
(entry-replace name)
+Name of symbol that enters static compilation of a module.

cc/entry-replace function source
(entry-replace name)
 
-Escape special characters in the entry-name
Community Examples

cc/link-c function source
(link-c has-cpp opts target & objects)
+Escape special characters in the entry-name

cc/link-c function source
(link-c has-cpp opts target & objects)
 
-Link C or C++ object files together to make a native module.
Community Examples

cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
+Link C or C++ object files together to make a native module.

cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
 
-
Community Examples

cc/make-define function source
(make-define define value)
+

cc/make-define function source
(make-define define value)
 
-Generate strings for adding custom defines to the compiler.
Community Examples

cc/make-defines function source
(make-defines defines)
+Generate strings for adding custom defines to the compiler.

cc/make-defines function source
(make-defines defines)
 
-Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.
Community Examples

cc/modpath-to-meta function source
(modpath-to-meta path)
+Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.

cc/modpath-to-meta function source
(modpath-to-meta path)
 
-Get the meta file path (.meta.janet) corresponding to a native module path (.so).
Community Examples

cc/modpath-to-static function source
(modpath-to-static path)
+Get the meta file path (.meta.janet) corresponding to a native module path (.so).

cc/modpath-to-static function source
(modpath-to-static path)
 
-Get the static library (.a) path corresponding to a native module path (.so).
Community Examples

cc/out-path function source
(out-path path from-ext to-ext)
+Get the static library (.a) path corresponding to a native module path (.so).

cc/out-path function source
(out-path path from-ext to-ext)
 
-Take a source file path and convert it to an output path.
Community Examples
+Take a source file path and convert it to an output path.
Build Rules C Source Generation diff --git a/static/1.28.0/api/jpm/cgen.html b/static/1.28.0/api/jpm/cgen.html index 9b1c8298..62e7ba82 100644 --- a/static/1.28.0/api/jpm/cgen.html +++ b/static/1.28.0/api/jpm/cgen.html @@ -116,13 +116,13 @@

Index

cgen/add-loader cgen/ir cgen/mangle cgen/print-ir


cgen/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

cgen/ir macro source
(ir & body)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

cgen/ir macro source
(ir & body)
 
-Macro that automatically quotes the body provided and calls (print-ir ...) on the body.
Community Examples

cgen/mangle function source
(mangle token)
+Macro that automatically quotes the body provided and calls (print-ir ...) on the body.

cgen/mangle function source
(mangle token)
 
-Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.
Community Examples

cgen/print-ir function source
(print-ir ir)
+Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.

cgen/print-ir function source
(print-ir ir)
 
-Compile the CGEN IR to C and print it to (dyn :out).
Community Examples
+Compile the CGEN IR to C and print it to (dyn :out).
C Compiler Command Line Interface diff --git a/static/1.28.0/api/jpm/cli.html b/static/1.28.0/api/jpm/cli.html index 8bc3a59e..f83f8e50 100644 --- a/static/1.28.0/api/jpm/cli.html +++ b/static/1.28.0/api/jpm/cli.html @@ -116,11 +116,11 @@

Index

cli/jpm cli/main cli/run cli/setup


cli/jpm macro source
(jpm & argv)
 
-A Macro User Interface for jpm to be used from a repl in a way similar to the command line.
Community Examples

cli/main function source
(main & argv)
+A Macro User Interface for jpm to be used from a repl in a way similar to the command line.

cli/main function source
(main & argv)
 
-Script entry.
Community Examples

cli/run function source
(run & args)
+Script entry.

cli/run function source
(run & args)
 
-Run CLI commands.
Community Examples

cli/setup function source
(setup args)
+Run CLI commands.

cli/setup function source
(setup args)
 
 Load configuration from the command line, environment variables, and
 configuration files. Returns array of non-configuration arguments as well.
@@ -128,7 +128,7 @@ 

Index 1. Commmand line settings 2. The value of `(dyn :jpm-config)` 3. Environment variables - 4. Config file settings (default-config if non specified)

Community Examples
+ 4. Config file settings (default-config if non specified)
C Source Generation Commands diff --git a/static/1.28.0/api/jpm/commands.html b/static/1.28.0/api/jpm/commands.html index ad30d33a..f847f59d 100644 --- a/static/1.28.0/api/jpm/commands.html +++ b/static/1.28.0/api/jpm/commands.html @@ -116,47 +116,47 @@

Index

commands/build commands/clean commands/configure commands/deps commands/enable-local-mode commands/help commands/install commands/jpm-debug-repl commands/list-installed commands/list-pkgs commands/list-rules commands/list-tasks commands/new-c-project commands/new-exe-project commands/new-project commands/quickbin commands/set-tree commands/show-paths commands/show-rule-tree commands/test commands/update-pkgs


commands/build function source
(build)
 
-
Community Examples

commands/clean function source
(clean)
+

commands/clean function source
(clean)
 
-
Community Examples

commands/configure function source
(configure &opt path)
+

commands/configure function source
(configure &opt path)
 
-Setup an out-of-tree build with certain configuration options.
Community Examples

commands/deps function source
(deps)
+Setup an out-of-tree build with certain configuration options.

commands/deps function source
(deps)
 
-
Community Examples

commands/enable-local-mode function source
(enable-local-mode)
+

commands/enable-local-mode function source
(enable-local-mode)
 
-Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/
Community Examples

commands/help function source
(help)
+Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/

commands/help function source
(help)
 
-
Community Examples

commands/install function source
(install & repo)
+

commands/install function source
(install & repo)
 
-
Community Examples

commands/jpm-debug-repl function source
(jpm-debug-repl)
+

commands/jpm-debug-repl function source
(jpm-debug-repl)
 
-
Community Examples

commands/list-installed function source
(list-installed)
+

commands/list-installed function source
(list-installed)
 
-
Community Examples

commands/list-pkgs function source
(list-pkgs &opt search)
+

commands/list-pkgs function source
(list-pkgs &opt search)
 
-
Community Examples

commands/list-rules function source
(list-rules &opt ctx)
+

commands/list-rules function source
(list-rules &opt ctx)
 
-
Community Examples

commands/list-tasks function source
(list-tasks &opt ctx)
+

commands/list-tasks function source
(list-tasks &opt ctx)
 
-
Community Examples

commands/new-c-project function source
(new-c-project name)
+

commands/new-c-project function source
(new-c-project name)
 
-Create a new C project
Community Examples

commands/new-exe-project function source
(new-exe-project name)
+Create a new C project

commands/new-exe-project function source
(new-exe-project name)
 
-Create a new executable project
Community Examples

commands/new-project function source
(new-project name)
+Create a new executable project

commands/new-project function source
(new-project name)
 
-Create a new project
Community Examples

commands/quickbin function source
(quickbin input output)
+Create a new project

commands/quickbin function source
(quickbin input output)
 
-
Community Examples

commands/set-tree function source
(set-tree tree)
+

commands/set-tree function source
(set-tree tree)
 
-Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.
Community Examples

commands/show-paths function source
(show-paths)
+Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.

commands/show-paths function source
(show-paths)
 
-
Community Examples

commands/show-rule-tree function source
(show-rule-tree &opt root depth)
+

commands/show-rule-tree function source
(show-rule-tree &opt root depth)
 
-
Community Examples

commands/test function source
(test)
+

commands/test function source
(test)
 
-
Community Examples

commands/update-pkgs function source
(update-pkgs)
+

commands/update-pkgs function source
(update-pkgs)
 
-
Community Examples
+
Command Line Interface Config diff --git a/static/1.28.0/api/jpm/config.html b/static/1.28.0/api/jpm/config.html index dfcaed16..c65d8405 100644 --- a/static/1.28.0/api/jpm/config.html +++ b/static/1.28.0/api/jpm/config.html @@ -114,111 +114,111 @@

Config

Index

-

config/builtin-configs config/config-checkers config/config-docs config/config-options config/config-parsers config/config-set config/defconf config/dyn:ar config/dyn:auto-shebang config/dyn:binpath config/dyn:build-type config/dyn:buildpath config/dyn:c++ config/dyn:c++-link config/dyn:cc config/dyn:cc-link config/dyn:cflags config/dyn:cflags-verbose config/dyn:config-file config/dyn:cppflags config/dyn:curlpath config/dyn:dest-dir config/dyn:dynamic-cflags config/dyn:dynamic-lflags config/dyn:gitpath config/dyn:headerpath config/dyn:is-msvc config/dyn:janet config/dyn:janet-cflags config/dyn:janet-importlib config/dyn:janet-lflags config/dyn:ldflags config/dyn:lflags config/dyn:libpath config/dyn:local config/dyn:manpath config/dyn:modext config/dyn:modpath config/dyn:nocolor config/dyn:offline config/dyn:optimize config/dyn:pkglist config/dyn:silent config/dyn:statext config/dyn:tarpath config/dyn:test config/dyn:tree config/dyn:update-pkgs config/dyn:use-batch-shell config/dyn:verbose config/dyn:workers config/load-config config/load-config-file config/load-default config/load-options config/opt config/read-env-variables config/save-config config/shorthand-mapping


config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.
Community Examples

config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).
Community Examples

config/config-docs table source
Table of all of the help text for each config option.
Community Examples

config/config-options table source
A table of possible options for enum option types.
Community Examples

config/config-parsers table source
A table of all of the dynamic config bindings to parsers.
Community Examples

config/config-set table source
Listing of all config dyns.
Community Examples

config/defconf macro source
(defconf kw &opt parser docs options)
+

config/builtin-configs config/config-checkers config/config-docs config/config-options config/config-parsers config/config-set config/defconf config/dyn:ar config/dyn:auto-shebang config/dyn:binpath config/dyn:build-type config/dyn:buildpath config/dyn:c++ config/dyn:c++-link config/dyn:cc config/dyn:cc-link config/dyn:cflags config/dyn:cflags-verbose config/dyn:config-file config/dyn:cppflags config/dyn:curlpath config/dyn:dest-dir config/dyn:dynamic-cflags config/dyn:dynamic-lflags config/dyn:gitpath config/dyn:headerpath config/dyn:is-msvc config/dyn:janet config/dyn:janet-cflags config/dyn:janet-importlib config/dyn:janet-lflags config/dyn:ldflags config/dyn:lflags config/dyn:libpath config/dyn:local config/dyn:manpath config/dyn:modext config/dyn:modpath config/dyn:nocolor config/dyn:offline config/dyn:optimize config/dyn:pkglist config/dyn:silent config/dyn:statext config/dyn:tarpath config/dyn:test config/dyn:tree config/dyn:update-pkgs config/dyn:use-batch-shell config/dyn:verbose config/dyn:workers config/load-config config/load-config-file config/load-default config/load-options config/opt config/read-env-variables config/save-config config/shorthand-mapping


config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.

config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).

config/config-docs table source
Table of all of the help text for each config option.

config/config-options table source
A table of possible options for enum option types.

config/config-parsers table source
A table of all of the dynamic config bindings to parsers.

config/config-set table source
Listing of all config dyns.

config/defconf macro source
(defconf kw &opt parser docs options)
 
-Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.
Community Examples

config/dyn:ar function source
(dyn:ar &opt dflt)
+Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.

config/dyn:ar function source
(dyn:ar &opt dflt)
 
-
Community Examples

config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
+

config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
 
-
Community Examples

config/dyn:binpath function source
(dyn:binpath &opt dflt)
+

config/dyn:binpath function source
(dyn:binpath &opt dflt)
 
-
Community Examples

config/dyn:build-type function source
(dyn:build-type &opt dflt)
+

config/dyn:build-type function source
(dyn:build-type &opt dflt)
 
-
Community Examples

config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
+

config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
 
-
Community Examples

config/dyn:c++ function source
(dyn:c++ &opt dflt)
+

config/dyn:c++ function source
(dyn:c++ &opt dflt)
 
-
Community Examples

config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
+

config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
 
-
Community Examples

config/dyn:cc function source
(dyn:cc &opt dflt)
+

config/dyn:cc function source
(dyn:cc &opt dflt)
 
-
Community Examples

config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
+

config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
 
-
Community Examples

config/dyn:cflags function source
(dyn:cflags &opt dflt)
+

config/dyn:cflags function source
(dyn:cflags &opt dflt)
 
-
Community Examples

config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
+

config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
 
-
Community Examples

config/dyn:config-file function source
(dyn:config-file &opt dflt)
+

config/dyn:config-file function source
(dyn:config-file &opt dflt)
 
-
Community Examples

config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
+

config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
 
-
Community Examples

config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
+

config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
 
-
Community Examples

config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
+

config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
 
-
Community Examples

config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
+

config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
 
-
Community Examples

config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
+

config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
 
-
Community Examples

config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
+

config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
 
-
Community Examples

config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
+

config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
 
-
Community Examples

config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
+

config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
 
-
Community Examples

config/dyn:janet function source
(dyn:janet &opt dflt)
+

config/dyn:janet function source
(dyn:janet &opt dflt)
 
-
Community Examples

config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
+

config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
 
-
Community Examples

config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
+

config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
 
-
Community Examples

config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
+

config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
 
-
Community Examples

config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
+

config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
 
-
Community Examples

config/dyn:lflags function source
(dyn:lflags &opt dflt)
+

config/dyn:lflags function source
(dyn:lflags &opt dflt)
 
-
Community Examples

config/dyn:libpath function source
(dyn:libpath &opt dflt)
+

config/dyn:libpath function source
(dyn:libpath &opt dflt)
 
-
Community Examples

config/dyn:local function source
(dyn:local &opt dflt)
+

config/dyn:local function source
(dyn:local &opt dflt)
 
-
Community Examples

config/dyn:manpath function source
(dyn:manpath &opt dflt)
+

config/dyn:manpath function source
(dyn:manpath &opt dflt)
 
-
Community Examples

config/dyn:modext function source
(dyn:modext &opt dflt)
+

config/dyn:modext function source
(dyn:modext &opt dflt)
 
-
Community Examples

config/dyn:modpath function source
(dyn:modpath &opt dflt)
+

config/dyn:modpath function source
(dyn:modpath &opt dflt)
 
-
Community Examples

config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
+

config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
 
-
Community Examples

config/dyn:offline function source
(dyn:offline &opt dflt)
+

config/dyn:offline function source
(dyn:offline &opt dflt)
 
-
Community Examples

config/dyn:optimize function source
(dyn:optimize &opt dflt)
+

config/dyn:optimize function source
(dyn:optimize &opt dflt)
 
-
Community Examples

config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
+

config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
 
-
Community Examples

config/dyn:silent function source
(dyn:silent &opt dflt)
+

config/dyn:silent function source
(dyn:silent &opt dflt)
 
-
Community Examples

config/dyn:statext function source
(dyn:statext &opt dflt)
+

config/dyn:statext function source
(dyn:statext &opt dflt)
 
-
Community Examples

config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
+

config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
 
-
Community Examples

config/dyn:test function source
(dyn:test &opt dflt)
+

config/dyn:test function source
(dyn:test &opt dflt)
 
-
Community Examples

config/dyn:tree function source
(dyn:tree &opt dflt)
+

config/dyn:tree function source
(dyn:tree &opt dflt)
 
-
Community Examples

config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
+

config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
 
-
Community Examples

config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
+

config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
 
-
Community Examples

config/dyn:verbose function source
(dyn:verbose &opt dflt)
+

config/dyn:verbose function source
(dyn:verbose &opt dflt)
 
-
Community Examples

config/dyn:workers function source
(dyn:workers &opt dflt)
+

config/dyn:workers function source
(dyn:workers &opt dflt)
 
-
Community Examples

config/load-config function source
(load-config settings &opt override)
+

config/load-config function source
(load-config settings &opt override)
 
-Load a configuration from a table or struct.
Community Examples

config/load-config-file function source
(load-config-file path &opt override)
+Load a configuration from a table or struct.

config/load-config-file function source
(load-config-file path &opt override)
 
-Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.
Community Examples

config/load-default function source
(load-default &opt override)
+Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.

config/load-default function source
(load-default &opt override)
 
-Load the default configuration.
Community Examples

config/load-options function source
(load-options &opt path)
+Load the default configuration.

config/load-options function source
(load-options &opt path)
 
-Load a file that contains config options that can be set. If no such file exists, then do nothing.
Community Examples

config/opt function source
(opt opts key &opt dflt)
+Load a file that contains config options that can be set. If no such file exists, then do nothing.

config/opt function source
(opt opts key &opt dflt)
 
-Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.
Community Examples

config/read-env-variables function source
(read-env-variables)
+Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.

config/read-env-variables function source
(read-env-variables)
 
-Read environment variables that correspond to config variables into dyns.
Community Examples

config/save-config function source
(save-config path)
+Read environment variables that correspond to config variables into dyns.

config/save-config function source
(save-config path)
 
-Write the current configuration information to a file.
Community Examples

config/shorthand-mapping struct source
Map some single characters to long options.
Community Examples
+Write the current configuration information to a file.

config/shorthand-mapping struct source
Map some single characters to long options.
Commands Configuration Generation diff --git a/static/1.28.0/api/jpm/dagbuild.html b/static/1.28.0/api/jpm/dagbuild.html index 6bc21f22..f7691f60 100644 --- a/static/1.28.0/api/jpm/dagbuild.html +++ b/static/1.28.0/api/jpm/dagbuild.html @@ -116,9 +116,9 @@

Index

dagbuild/pdag dagbuild/pmap


dagbuild/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.
Community Examples

dagbuild/pmap function source
(pmap f data)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.

dagbuild/pmap function source
(pmap f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Community Examples
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Configuration Generation Project Management diff --git a/static/1.28.0/api/jpm/index.html b/static/1.28.0/api/jpm/index.html index abeb0599..e2e289f3 100644 --- a/static/1.28.0/api/jpm/index.html +++ b/static/1.28.0/api/jpm/index.html @@ -116,319 +116,319 @@

Index

jpm/cc/archive-c jpm/cc/compile-c jpm/cc/create-buffer-c jpm/cc/create-buffer-c-impl jpm/cc/create-executable jpm/cc/embed-name jpm/cc/entry-name jpm/cc/entry-replace jpm/cc/link-c jpm/cc/make-bin-source jpm/cc/make-define jpm/cc/make-defines jpm/cc/modpath-to-meta jpm/cc/modpath-to-static jpm/cc/out-path jpm/cgen/add-loader jpm/cgen/ir jpm/cgen/mangle jpm/cgen/print-ir jpm/commands/build jpm/commands/clean jpm/commands/configure jpm/commands/deps jpm/commands/enable-local-mode jpm/commands/help jpm/commands/install jpm/commands/jpm-debug-repl jpm/commands/list-installed jpm/commands/list-pkgs jpm/commands/list-rules jpm/commands/list-tasks jpm/commands/new-c-project jpm/commands/new-exe-project jpm/commands/new-project jpm/commands/quickbin jpm/commands/set-tree jpm/commands/show-paths jpm/commands/show-rule-tree jpm/commands/test jpm/commands/update-pkgs jpm/config/builtin-configs jpm/config/config-checkers jpm/config/config-docs jpm/config/config-options jpm/config/config-parsers jpm/config/config-set jpm/config/defconf jpm/config/dyn:ar jpm/config/dyn:auto-shebang jpm/config/dyn:binpath jpm/config/dyn:build-type jpm/config/dyn:buildpath jpm/config/dyn:c++ jpm/config/dyn:c++-link jpm/config/dyn:cc jpm/config/dyn:cc-link jpm/config/dyn:cflags jpm/config/dyn:cflags-verbose jpm/config/dyn:config-file jpm/config/dyn:cppflags jpm/config/dyn:curlpath jpm/config/dyn:dest-dir jpm/config/dyn:dynamic-cflags jpm/config/dyn:dynamic-lflags jpm/config/dyn:gitpath jpm/config/dyn:headerpath jpm/config/dyn:is-msvc jpm/config/dyn:janet jpm/config/dyn:janet-cflags jpm/config/dyn:janet-importlib jpm/config/dyn:janet-lflags jpm/config/dyn:ldflags jpm/config/dyn:lflags jpm/config/dyn:libpath jpm/config/dyn:local jpm/config/dyn:manpath jpm/config/dyn:modext jpm/config/dyn:modpath jpm/config/dyn:nocolor jpm/config/dyn:offline jpm/config/dyn:optimize jpm/config/dyn:pkglist jpm/config/dyn:silent jpm/config/dyn:statext jpm/config/dyn:tarpath jpm/config/dyn:test jpm/config/dyn:tree jpm/config/dyn:update-pkgs jpm/config/dyn:use-batch-shell jpm/config/dyn:verbose jpm/config/dyn:workers jpm/config/load-config jpm/config/load-config-file jpm/config/load-default jpm/config/load-options jpm/config/opt jpm/config/read-env-variables jpm/config/save-config jpm/config/shorthand-mapping jpm/dagbuild/pdag jpm/dagbuild/pmap jpm/make-config/auto jpm/make-config/generate-config jpm/pm/bundle-install jpm/pm/curl jpm/pm/do-rule jpm/pm/download-bundle jpm/pm/download-git-bundle jpm/pm/download-tar-bundle jpm/pm/git jpm/pm/import-rules jpm/pm/load-lockfile jpm/pm/load-project-meta jpm/pm/make-jpm-env jpm/pm/make-lockfile jpm/pm/out-of-tree-config jpm/pm/post-deps jpm/pm/require-jpm jpm/pm/resolve-bundle jpm/pm/tar jpm/pm/update-git-bundle jpm/pm/update-installed jpm/rules/add-body jpm/rules/add-dep jpm/rules/add-input jpm/rules/add-output jpm/rules/add-thunk jpm/rules/build-rules jpm/rules/getrules jpm/rules/phony jpm/rules/rule jpm/rules/sh-phony jpm/rules/sh-rule jpm/rules/sh-task jpm/rules/task jpm/scaffold/scaffold-project jpm/shutil/abspath jpm/shutil/basename jpm/shutil/clear-cache jpm/shutil/clear-manifest jpm/shutil/clexe-shell jpm/shutil/copy jpm/shutil/copyfile jpm/shutil/create-dirs jpm/shutil/devnull jpm/shutil/dirname jpm/shutil/do-monkeypatch jpm/shutil/drop1-shell jpm/shutil/exec-slurp jpm/shutil/filepath-replace jpm/shutil/find-build-dir jpm/shutil/find-cache jpm/shutil/find-manifest jpm/shutil/find-manifest-dir jpm/shutil/is-mingw jpm/shutil/is-win jpm/shutil/is-win-or-mingw jpm/shutil/path-splitter jpm/shutil/rimraf jpm/shutil/rm jpm/shutil/run-patched jpm/shutil/run-repl jpm/shutil/run-script jpm/shutil/shell jpm/shutil/undo-monkeypatch


jpm/cc/archive-c function source
(archive-c opts target & objects)
 
-Link object files together to make a static library.
Community Examples

jpm/cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
+Link object files together to make a static library.

jpm/cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
 
-Compile a C file into an object file.
Community Examples

jpm/cc/create-buffer-c function source
(create-buffer-c source dest name)
+Compile a C file into an object file.

jpm/cc/create-buffer-c function source
(create-buffer-c source dest name)
 
-Inline raw byte file as a c file.
Community Examples

jpm/cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
+Inline raw byte file as a c file.

jpm/cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
 
-
Community Examples

jpm/cc/create-executable function source
(create-executable opts source dest no-core)
+

jpm/cc/create-executable function source
(create-executable opts source dest no-core)
 
-Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.
Community Examples

jpm/cc/embed-name function source
(embed-name path)
+Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.

jpm/cc/embed-name function source
(embed-name path)
 
-Rename a janet symbol for embedding.
Community Examples

jpm/cc/entry-name function source
(entry-name name)
+Rename a janet symbol for embedding.

jpm/cc/entry-name function source
(entry-name name)
 
-Name of symbol that enters static compilation of a module.
Community Examples

jpm/cc/entry-replace function source
(entry-replace name)
+Name of symbol that enters static compilation of a module.

jpm/cc/entry-replace function source
(entry-replace name)
 
-Escape special characters in the entry-name
Community Examples

jpm/cc/link-c function source
(link-c has-cpp opts target & objects)
+Escape special characters in the entry-name

jpm/cc/link-c function source
(link-c has-cpp opts target & objects)
 
-Link C or C++ object files together to make a native module.
Community Examples

jpm/cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
+Link C or C++ object files together to make a native module.

jpm/cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
 
-
Community Examples

jpm/cc/make-define function source
(make-define define value)
+

jpm/cc/make-define function source
(make-define define value)
 
-Generate strings for adding custom defines to the compiler.
Community Examples

jpm/cc/make-defines function source
(make-defines defines)
+Generate strings for adding custom defines to the compiler.

jpm/cc/make-defines function source
(make-defines defines)
 
-Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.
Community Examples

jpm/cc/modpath-to-meta function source
(modpath-to-meta path)
+Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.

jpm/cc/modpath-to-meta function source
(modpath-to-meta path)
 
-Get the meta file path (.meta.janet) corresponding to a native module path (.so).
Community Examples

jpm/cc/modpath-to-static function source
(modpath-to-static path)
+Get the meta file path (.meta.janet) corresponding to a native module path (.so).

jpm/cc/modpath-to-static function source
(modpath-to-static path)
 
-Get the static library (.a) path corresponding to a native module path (.so).
Community Examples

jpm/cc/out-path function source
(out-path path from-ext to-ext)
+Get the static library (.a) path corresponding to a native module path (.so).

jpm/cc/out-path function source
(out-path path from-ext to-ext)
 
-Take a source file path and convert it to an output path.
Community Examples

jpm/cgen/add-loader function source
(add-loader)
+Take a source file path and convert it to an output path.

jpm/cgen/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

jpm/cgen/ir macro source
(ir & body)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

jpm/cgen/ir macro source
(ir & body)
 
-Macro that automatically quotes the body provided and calls (print-ir ...) on the body.
Community Examples

jpm/cgen/mangle function source
(mangle token)
+Macro that automatically quotes the body provided and calls (print-ir ...) on the body.

jpm/cgen/mangle function source
(mangle token)
 
-Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.
Community Examples

jpm/cgen/print-ir function source
(print-ir ir)
+Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.

jpm/cgen/print-ir function source
(print-ir ir)
 
-Compile the CGEN IR to C and print it to (dyn :out).
Community Examples

jpm/commands/build function source
(build)
+Compile the CGEN IR to C and print it to (dyn :out).

jpm/commands/build function source
(build)
 
-
Community Examples

jpm/commands/clean function source
(clean)
+

jpm/commands/clean function source
(clean)
 
-
Community Examples

jpm/commands/configure function source
(configure &opt path)
+

jpm/commands/configure function source
(configure &opt path)
 
-Setup an out-of-tree build with certain configuration options.
Community Examples

jpm/commands/deps function source
(deps)
+Setup an out-of-tree build with certain configuration options.

jpm/commands/deps function source
(deps)
 
-
Community Examples

jpm/commands/enable-local-mode function source
(enable-local-mode)
+

jpm/commands/enable-local-mode function source
(enable-local-mode)
 
-Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/
Community Examples

jpm/commands/help function source
(help)
+Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/

jpm/commands/help function source
(help)
 
-
Community Examples

jpm/commands/install function source
(install & repo)
+

jpm/commands/install function source
(install & repo)
 
-
Community Examples

jpm/commands/jpm-debug-repl function source
(jpm-debug-repl)
+

jpm/commands/jpm-debug-repl function source
(jpm-debug-repl)
 
-
Community Examples

jpm/commands/list-installed function source
(list-installed)
+

jpm/commands/list-installed function source
(list-installed)
 
-
Community Examples

jpm/commands/list-pkgs function source
(list-pkgs &opt search)
+

jpm/commands/list-pkgs function source
(list-pkgs &opt search)
 
-
Community Examples

jpm/commands/list-rules function source
(list-rules &opt ctx)
+

jpm/commands/list-rules function source
(list-rules &opt ctx)
 
-
Community Examples

jpm/commands/list-tasks function source
(list-tasks &opt ctx)
+

jpm/commands/list-tasks function source
(list-tasks &opt ctx)
 
-
Community Examples

jpm/commands/new-c-project function source
(new-c-project name)
+

jpm/commands/new-c-project function source
(new-c-project name)
 
-Create a new C project
Community Examples

jpm/commands/new-exe-project function source
(new-exe-project name)
+Create a new C project

jpm/commands/new-exe-project function source
(new-exe-project name)
 
-Create a new executable project
Community Examples

jpm/commands/new-project function source
(new-project name)
+Create a new executable project

jpm/commands/new-project function source
(new-project name)
 
-Create a new project
Community Examples

jpm/commands/quickbin function source
(quickbin input output)
+Create a new project

jpm/commands/quickbin function source
(quickbin input output)
 
-
Community Examples

jpm/commands/set-tree function source
(set-tree tree)
+

jpm/commands/set-tree function source
(set-tree tree)
 
-Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.
Community Examples

jpm/commands/show-paths function source
(show-paths)
+Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.

jpm/commands/show-paths function source
(show-paths)
 
-
Community Examples

jpm/commands/show-rule-tree function source
(show-rule-tree &opt root depth)
+

jpm/commands/show-rule-tree function source
(show-rule-tree &opt root depth)
 
-
Community Examples

jpm/commands/test function source
(test)
+

jpm/commands/test function source
(test)
 
-
Community Examples

jpm/commands/update-pkgs function source
(update-pkgs)
+

jpm/commands/update-pkgs function source
(update-pkgs)
 
-
Community Examples

jpm/config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.
Community Examples

jpm/config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).
Community Examples

jpm/config/config-docs table source
Table of all of the help text for each config option.
Community Examples

jpm/config/config-options table source
A table of possible options for enum option types.
Community Examples

jpm/config/config-parsers table source
A table of all of the dynamic config bindings to parsers.
Community Examples

jpm/config/config-set table source
Listing of all config dyns.
Community Examples

jpm/config/defconf macro source
(defconf kw &opt parser docs options)
+

jpm/config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.

jpm/config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).

jpm/config/config-docs table source
Table of all of the help text for each config option.

jpm/config/config-options table source
A table of possible options for enum option types.

jpm/config/config-parsers table source
A table of all of the dynamic config bindings to parsers.

jpm/config/config-set table source
Listing of all config dyns.

jpm/config/defconf macro source
(defconf kw &opt parser docs options)
 
-Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.
Community Examples

jpm/config/dyn:ar function source
(dyn:ar &opt dflt)
+Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.

jpm/config/dyn:ar function source
(dyn:ar &opt dflt)
 
-
Community Examples

jpm/config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
+

jpm/config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
 
-
Community Examples

jpm/config/dyn:binpath function source
(dyn:binpath &opt dflt)
+

jpm/config/dyn:binpath function source
(dyn:binpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:build-type function source
(dyn:build-type &opt dflt)
+

jpm/config/dyn:build-type function source
(dyn:build-type &opt dflt)
 
-
Community Examples

jpm/config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
+

jpm/config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:c++ function source
(dyn:c++ &opt dflt)
+

jpm/config/dyn:c++ function source
(dyn:c++ &opt dflt)
 
-
Community Examples

jpm/config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
+

jpm/config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
 
-
Community Examples

jpm/config/dyn:cc function source
(dyn:cc &opt dflt)
+

jpm/config/dyn:cc function source
(dyn:cc &opt dflt)
 
-
Community Examples

jpm/config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
+

jpm/config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
 
-
Community Examples

jpm/config/dyn:cflags function source
(dyn:cflags &opt dflt)
+

jpm/config/dyn:cflags function source
(dyn:cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
+

jpm/config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
 
-
Community Examples

jpm/config/dyn:config-file function source
(dyn:config-file &opt dflt)
+

jpm/config/dyn:config-file function source
(dyn:config-file &opt dflt)
 
-
Community Examples

jpm/config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
+

jpm/config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
+

jpm/config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
+

jpm/config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
 
-
Community Examples

jpm/config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
+

jpm/config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
+

jpm/config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
+

jpm/config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
+

jpm/config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
+

jpm/config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet function source
(dyn:janet &opt dflt)
+

jpm/config/dyn:janet function source
(dyn:janet &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
+

jpm/config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
+

jpm/config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
+

jpm/config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
+

jpm/config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:lflags function source
(dyn:lflags &opt dflt)
+

jpm/config/dyn:lflags function source
(dyn:lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:libpath function source
(dyn:libpath &opt dflt)
+

jpm/config/dyn:libpath function source
(dyn:libpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:local function source
(dyn:local &opt dflt)
+

jpm/config/dyn:local function source
(dyn:local &opt dflt)
 
-
Community Examples

jpm/config/dyn:manpath function source
(dyn:manpath &opt dflt)
+

jpm/config/dyn:manpath function source
(dyn:manpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:modext function source
(dyn:modext &opt dflt)
+

jpm/config/dyn:modext function source
(dyn:modext &opt dflt)
 
-
Community Examples

jpm/config/dyn:modpath function source
(dyn:modpath &opt dflt)
+

jpm/config/dyn:modpath function source
(dyn:modpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
+

jpm/config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
 
-
Community Examples

jpm/config/dyn:offline function source
(dyn:offline &opt dflt)
+

jpm/config/dyn:offline function source
(dyn:offline &opt dflt)
 
-
Community Examples

jpm/config/dyn:optimize function source
(dyn:optimize &opt dflt)
+

jpm/config/dyn:optimize function source
(dyn:optimize &opt dflt)
 
-
Community Examples

jpm/config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
+

jpm/config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
 
-
Community Examples

jpm/config/dyn:silent function source
(dyn:silent &opt dflt)
+

jpm/config/dyn:silent function source
(dyn:silent &opt dflt)
 
-
Community Examples

jpm/config/dyn:statext function source
(dyn:statext &opt dflt)
+

jpm/config/dyn:statext function source
(dyn:statext &opt dflt)
 
-
Community Examples

jpm/config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
+

jpm/config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:test function source
(dyn:test &opt dflt)
+

jpm/config/dyn:test function source
(dyn:test &opt dflt)
 
-
Community Examples

jpm/config/dyn:tree function source
(dyn:tree &opt dflt)
+

jpm/config/dyn:tree function source
(dyn:tree &opt dflt)
 
-
Community Examples

jpm/config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
+

jpm/config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
 
-
Community Examples

jpm/config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
+

jpm/config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
 
-
Community Examples

jpm/config/dyn:verbose function source
(dyn:verbose &opt dflt)
+

jpm/config/dyn:verbose function source
(dyn:verbose &opt dflt)
 
-
Community Examples

jpm/config/dyn:workers function source
(dyn:workers &opt dflt)
+

jpm/config/dyn:workers function source
(dyn:workers &opt dflt)
 
-
Community Examples

jpm/config/load-config function source
(load-config settings &opt override)
+

jpm/config/load-config function source
(load-config settings &opt override)
 
-Load a configuration from a table or struct.
Community Examples

jpm/config/load-config-file function source
(load-config-file path &opt override)
+Load a configuration from a table or struct.

jpm/config/load-config-file function source
(load-config-file path &opt override)
 
-Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.
Community Examples

jpm/config/load-default function source
(load-default &opt override)
+Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.

jpm/config/load-default function source
(load-default &opt override)
 
-Load the default configuration.
Community Examples

jpm/config/load-options function source
(load-options &opt path)
+Load the default configuration.

jpm/config/load-options function source
(load-options &opt path)
 
-Load a file that contains config options that can be set. If no such file exists, then do nothing.
Community Examples

jpm/config/opt function source
(opt opts key &opt dflt)
+Load a file that contains config options that can be set. If no such file exists, then do nothing.

jpm/config/opt function source
(opt opts key &opt dflt)
 
-Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.
Community Examples

jpm/config/read-env-variables function source
(read-env-variables)
+Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.

jpm/config/read-env-variables function source
(read-env-variables)
 
-Read environment variables that correspond to config variables into dyns.
Community Examples

jpm/config/save-config function source
(save-config path)
+Read environment variables that correspond to config variables into dyns.

jpm/config/save-config function source
(save-config path)
 
-Write the current configuration information to a file.
Community Examples

jpm/config/shorthand-mapping struct source
Map some single characters to long options.
Community Examples

jpm/dagbuild/pdag function source
(pdag f dag &opt n-workers)
+Write the current configuration information to a file.

jpm/config/shorthand-mapping struct source
Map some single characters to long options.

jpm/dagbuild/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.
Community Examples

jpm/dagbuild/pmap function source
(pmap f data)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.

jpm/dagbuild/pmap function source
(pmap f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Community Examples

jpm/make-config/auto function source
(auto)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.

jpm/make-config/auto function source
(auto)
 
-Get an autodetected config.
Community Examples

jpm/make-config/generate-config function source
(generate-config &opt destdir silent as-data)
+Get an autodetected config.

jpm/make-config/generate-config function source
(generate-config &opt destdir silent as-data)
 
-Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Community Examples

jpm/pm/bundle-install function source
(bundle-install bundle &opt no-deps)
+Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.

jpm/pm/bundle-install function source
(bundle-install bundle &opt no-deps)
 
-Install a bundle from a git repository.
Community Examples

jpm/pm/curl function source
(curl & args)
+Install a bundle from a git repository.

jpm/pm/curl function source
(curl & args)
 
-Make a call to curl
Community Examples

jpm/pm/do-rule function source
(do-rule target)
+Make a call to curl

jpm/pm/do-rule function source
(do-rule target)
 
-Evaluate a given rule in a one-off manner.
Community Examples

jpm/pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
+Evaluate a given rule in a one-off manner.

jpm/pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
 
-Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.
Community Examples

jpm/pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
+Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.

jpm/pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
 
-Download a git bundle from a remote respository
Community Examples

jpm/pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
+Download a git bundle from a remote respository

jpm/pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
 
-Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.
Community Examples

jpm/pm/git function source
(git & args)
+Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.

jpm/pm/git function source
(git & args)
 
-Make a call to git.
Community Examples

jpm/pm/import-rules function source
(import-rules path &opt base-env)
+Make a call to git.

jpm/pm/import-rules function source
(import-rules path &opt base-env)
 
-Import another file that defines more rules. This ruleset is merged into the current ruleset.
Community Examples

jpm/pm/load-lockfile function source
(load-lockfile &opt filename)
+Import another file that defines more rules. This ruleset is merged into the current ruleset.

jpm/pm/load-lockfile function source
(load-lockfile &opt filename)
 
-Load packages from a lockfile.
Community Examples

jpm/pm/load-project-meta function source
(load-project-meta &opt path)
+Load packages from a lockfile.

jpm/pm/load-project-meta function source
(load-project-meta &opt path)
 
-Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.
Community Examples

jpm/pm/make-jpm-env function source
(make-jpm-env &opt base-env)
+Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.

jpm/pm/make-jpm-env function source
(make-jpm-env &opt base-env)
 
-Create an environment that is preloaded with jpm symbols.
Community Examples

jpm/pm/make-lockfile function source
(make-lockfile &opt filename)
+Create an environment that is preloaded with jpm symbols.

jpm/pm/make-lockfile function source
(make-lockfile &opt filename)
 
-
Community Examples

jpm/pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
+

jpm/pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
 
-Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.
Community Examples

jpm/pm/post-deps macro source
(post-deps & body)
+Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.

jpm/pm/post-deps macro source
(post-deps & body)
 
-Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.
Community Examples

jpm/pm/require-jpm function source
(require-jpm path &opt base-env)
+Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.

jpm/pm/require-jpm function source
(require-jpm path &opt base-env)
 
-Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.
Community Examples

jpm/pm/resolve-bundle function source
(resolve-bundle bundle)
+Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.

jpm/pm/resolve-bundle function source
(resolve-bundle bundle)
 
-Convert any bundle string/table to the normalized table form.
Community Examples

jpm/pm/tar function source
(tar & args)
+Convert any bundle string/table to the normalized table form.

jpm/pm/tar function source
(tar & args)
 
-Make a call to tar.
Community Examples

jpm/pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
+Make a call to tar.

jpm/pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
 
-Fetch latest tag version from remote repository
Community Examples

jpm/pm/update-installed function source
(update-installed)
+Fetch latest tag version from remote repository

jpm/pm/update-installed function source
(update-installed)
 
-Update all previously installed packages to their latest versions.
Community Examples

jpm/rules/add-body macro source
(add-body target & body)
+Update all previously installed packages to their latest versions.

jpm/rules/add-body macro source
(add-body target & body)
 
-Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.
Community Examples

jpm/rules/add-dep function source
(add-dep target dep)
+Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.

jpm/rules/add-dep function source
(add-dep target dep)
 
-Alias for `add-input`
Community Examples

jpm/rules/add-input function source
(add-input target input)
+Alias for `add-input`

jpm/rules/add-input function source
(add-input target input)
 
-Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.
Community Examples

jpm/rules/add-output function source
(add-output target output)
+Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.

jpm/rules/add-output function source
(add-output target output)
 
-Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.
Community Examples

jpm/rules/add-thunk function source
(add-thunk target thunk)
+Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.

jpm/rules/add-thunk function source
(add-thunk target thunk)
 
-Append a thunk to a target's recipe.
Community Examples

jpm/rules/build-rules function source
(build-rules rules targets &opt n-workers)
+Append a thunk to a target's recipe.

jpm/rules/build-rules function source
(build-rules rules targets &opt n-workers)
 
-Given a graph of all rules, extract a work graph that will build out-of-date files.
Community Examples

jpm/rules/getrules function source
(getrules)
+Given a graph of all rules, extract a work graph that will build out-of-date files.

jpm/rules/getrules function source
(getrules)
 
-
Community Examples

jpm/rules/phony macro source
(phony target deps & body)
+

jpm/rules/phony macro source
(phony target deps & body)
 
-Alias for `task`.
Community Examples

jpm/rules/rule macro source
(rule target deps & body)
+Alias for `task`.

jpm/rules/rule macro source
(rule target deps & body)
 
-Add a rule to the rule graph.
Community Examples

jpm/rules/sh-phony macro source
(sh-phony target deps & body)
+Add a rule to the rule graph.

jpm/rules/sh-phony macro source
(sh-phony target deps & body)
 
-Alias for `sh-task`.
Community Examples

jpm/rules/sh-rule macro source
(sh-rule target deps & body)
+Alias for `sh-task`.

jpm/rules/sh-rule macro source
(sh-rule target deps & body)
 
-Add a rule that invokes a shell command, and fails if the command returns non-zero.
Community Examples

jpm/rules/sh-task macro source
(sh-task target deps & body)
+Add a rule that invokes a shell command, and fails if the command returns non-zero.

jpm/rules/sh-task macro source
(sh-task target deps & body)
 
-Add a task that invokes a shell command, and fails if the command returns non-zero.
Community Examples

jpm/rules/task macro source
(task target deps & body)
+Add a task that invokes a shell command, and fails if the command returns non-zero.

jpm/rules/task macro source
(task target deps & body)
 
-Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
Community Examples

jpm/scaffold/scaffold-project function source
(scaffold-project name &opt options)
+Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).

jpm/scaffold/scaffold-project function source
(scaffold-project name &opt options)
 
-Generate a standardized project scaffold.
Community Examples

jpm/shutil/abspath function source
(abspath path)
+Generate a standardized project scaffold.

jpm/shutil/abspath function source
(abspath path)
 
-Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).
Community Examples

jpm/shutil/basename function source
(basename path)
+Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).

jpm/shutil/basename function source
(basename path)
 
-Get the filename of a path without any leading directory components.
Community Examples

jpm/shutil/clear-cache function source
(clear-cache)
+Get the filename of a path without any leading directory components.

jpm/shutil/clear-cache function source
(clear-cache)
 
-Clear the global git cache.
Community Examples

jpm/shutil/clear-manifest function source
(clear-manifest)
+Clear the global git cache.

jpm/shutil/clear-manifest function source
(clear-manifest)
 
-Clear the global installation manifest.
Community Examples

jpm/shutil/clexe-shell function source
(clexe-shell & args)
+Clear the global installation manifest.

jpm/shutil/clexe-shell function source
(clexe-shell & args)
 
-
Community Examples

jpm/shutil/copy function source
(copy src dest)
+

jpm/shutil/copy function source
(copy src dest)
 
-Copy a file or directory recursively from one location to another.
Community Examples

jpm/shutil/copyfile function source
(copyfile src dest)
+Copy a file or directory recursively from one location to another.

jpm/shutil/copyfile function source
(copyfile src dest)
 
-Copy a file one location to another.
Community Examples

jpm/shutil/create-dirs function source
(create-dirs dest)
+Copy a file one location to another.

jpm/shutil/create-dirs function source
(create-dirs dest)
 
-Create all directories needed for a file (mkdir -p).
Community Examples

jpm/shutil/devnull function source
(devnull)
+Create all directories needed for a file (mkdir -p).

jpm/shutil/devnull function source
(devnull)
 
-
Community Examples

jpm/shutil/dirname function source
(dirname path)
+

jpm/shutil/dirname function source
(dirname path)
 
-Get the directory of a file without the filename.
Community Examples

jpm/shutil/do-monkeypatch function source
(do-monkeypatch build-dir)
+Get the directory of a file without the filename.

jpm/shutil/do-monkeypatch function source
(do-monkeypatch build-dir)
 
-Modify the existing environment to have the same paths as the test environment.
Community Examples

jpm/shutil/drop1-shell function source
(drop1-shell std args)
+Modify the existing environment to have the same paths as the test environment.

jpm/shutil/drop1-shell function source
(drop1-shell std args)
 
-Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.
Community Examples

jpm/shutil/exec-slurp function source
(exec-slurp & args)
+Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.

jpm/shutil/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

jpm/shutil/filepath-replace function source
(filepath-replace repo)
+Read stdout of subprocess and return it trimmed in a string.

jpm/shutil/filepath-replace function source
(filepath-replace repo)
 
-Remove special characters from a string or path to make it into a path segment.
Community Examples

jpm/shutil/find-build-dir function source
(find-build-dir)
+Remove special characters from a string or path to make it into a path segment.

jpm/shutil/find-build-dir function source
(find-build-dir)
 
-Gets the build directory to output files to.
Community Examples

jpm/shutil/find-cache function source
(find-cache)
+Gets the build directory to output files to.

jpm/shutil/find-cache function source
(find-cache)
 
-Return the path to the global cache.
Community Examples

jpm/shutil/find-manifest function source
(find-manifest name)
+Return the path to the global cache.

jpm/shutil/find-manifest function source
(find-manifest name)
 
-Get the full path of a manifest file given a package name.
Community Examples

jpm/shutil/find-manifest-dir function source
(find-manifest-dir)
+Get the full path of a manifest file given a package name.

jpm/shutil/find-manifest-dir function source
(find-manifest-dir)
 
-Get the path to the directory containing manifests for installed packages.
Community Examples

jpm/shutil/is-mingw function source
(is-mingw)
+Get the path to the directory containing manifests for installed packages.

jpm/shutil/is-mingw function source
(is-mingw)
 
-Check if built with mingw
Community Examples

jpm/shutil/is-win function source
(is-win)
+Check if built with mingw

jpm/shutil/is-win function source
(is-win)
 
-Check if we should assume a DOS-like shell or default to posix shell.
Community Examples

jpm/shutil/is-win-or-mingw function source
(is-win-or-mingw)
+Check if we should assume a DOS-like shell or default to posix shell.

jpm/shutil/is-win-or-mingw function source
(is-win-or-mingw)
 
-Check if built with mingw
Community Examples

jpm/shutil/path-splitter core/peg source
split paths on / and \.
Community Examples

jpm/shutil/rimraf function source
(rimraf path)
+Check if built with mingw

jpm/shutil/path-splitter core/peg source
split paths on / and \.

jpm/shutil/rimraf function source
(rimraf path)
 
-Hard delete directory tree
Community Examples

jpm/shutil/rm function source
(rm path)
+Hard delete directory tree

jpm/shutil/rm function source
(rm path)
 
-Remove a directory and all sub directories.
Community Examples

jpm/shutil/run-patched function source
(run-patched & extra-args)
+Remove a directory and all sub directories.

jpm/shutil/run-patched function source
(run-patched & extra-args)
 
-Run a subprocess Janet repl that has the same environment as the test environment.
Community Examples

jpm/shutil/run-repl function source
(run-repl)
+Run a subprocess Janet repl that has the same environment as the test environment.

jpm/shutil/run-repl function source
(run-repl)
 
-Run a repl in the monkey patched test environment
Community Examples

jpm/shutil/run-script function source
(run-script path)
+Run a repl in the monkey patched test environment

jpm/shutil/run-script function source
(run-script path)
 
-Run a local script in the monkey patched environment.
Community Examples

jpm/shutil/shell function source
(shell & args)
+Run a local script in the monkey patched environment.

jpm/shutil/shell function source
(shell & args)
 
-Do a shell command
Community Examples

jpm/shutil/undo-monkeypatch function source
(undo-monkeypatch old-builddir)
+Do a shell command

jpm/shutil/undo-monkeypatch function source
(undo-monkeypatch old-builddir)
 
-
Community Examples
+
Integer Types Module Build Rules diff --git a/static/1.28.0/api/jpm/make-config.html b/static/1.28.0/api/jpm/make-config.html index 0f247b37..b2fbf494 100644 --- a/static/1.28.0/api/jpm/make-config.html +++ b/static/1.28.0/api/jpm/make-config.html @@ -116,9 +116,9 @@

Index

make-config/auto make-config/generate-config


make-config/auto function source
(auto)
 
-Get an autodetected config.
Community Examples

make-config/generate-config function source
(generate-config &opt destdir silent as-data)
+Get an autodetected config.

make-config/generate-config function source
(generate-config &opt destdir silent as-data)
 
-Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Community Examples
+Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Config DAG Build diff --git a/static/1.28.0/api/jpm/pm.html b/static/1.28.0/api/jpm/pm.html index 3b664e25..73078687 100644 --- a/static/1.28.0/api/jpm/pm.html +++ b/static/1.28.0/api/jpm/pm.html @@ -116,43 +116,43 @@

Index

pm/bundle-install pm/curl pm/do-rule pm/download-bundle pm/download-git-bundle pm/download-tar-bundle pm/git pm/import-rules pm/load-lockfile pm/load-project-meta pm/make-jpm-env pm/make-lockfile pm/out-of-tree-config pm/post-deps pm/require-jpm pm/resolve-bundle pm/tar pm/update-git-bundle pm/update-installed


pm/bundle-install function source
(bundle-install bundle &opt no-deps)
 
-Install a bundle from a git repository.
Community Examples

pm/curl function source
(curl & args)
+Install a bundle from a git repository.

pm/curl function source
(curl & args)
 
-Make a call to curl
Community Examples

pm/do-rule function source
(do-rule target)
+Make a call to curl

pm/do-rule function source
(do-rule target)
 
-Evaluate a given rule in a one-off manner.
Community Examples

pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
+Evaluate a given rule in a one-off manner.

pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
 
-Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.
Community Examples

pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
+Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.

pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
 
-Download a git bundle from a remote respository
Community Examples

pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
+Download a git bundle from a remote respository

pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
 
-Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.
Community Examples

pm/git function source
(git & args)
+Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.

pm/git function source
(git & args)
 
-Make a call to git.
Community Examples

pm/import-rules function source
(import-rules path &opt base-env)
+Make a call to git.

pm/import-rules function source
(import-rules path &opt base-env)
 
-Import another file that defines more rules. This ruleset is merged into the current ruleset.
Community Examples

pm/load-lockfile function source
(load-lockfile &opt filename)
+Import another file that defines more rules. This ruleset is merged into the current ruleset.

pm/load-lockfile function source
(load-lockfile &opt filename)
 
-Load packages from a lockfile.
Community Examples

pm/load-project-meta function source
(load-project-meta &opt path)
+Load packages from a lockfile.

pm/load-project-meta function source
(load-project-meta &opt path)
 
-Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.
Community Examples

pm/make-jpm-env function source
(make-jpm-env &opt base-env)
+Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.

pm/make-jpm-env function source
(make-jpm-env &opt base-env)
 
-Create an environment that is preloaded with jpm symbols.
Community Examples

pm/make-lockfile function source
(make-lockfile &opt filename)
+Create an environment that is preloaded with jpm symbols.

pm/make-lockfile function source
(make-lockfile &opt filename)
 
-
Community Examples

pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
+

pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
 
-Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.
Community Examples

pm/post-deps macro source
(post-deps & body)
+Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.

pm/post-deps macro source
(post-deps & body)
 
-Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.
Community Examples

pm/require-jpm function source
(require-jpm path &opt base-env)
+Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.

pm/require-jpm function source
(require-jpm path &opt base-env)
 
-Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.
Community Examples

pm/resolve-bundle function source
(resolve-bundle bundle)
+Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.

pm/resolve-bundle function source
(resolve-bundle bundle)
 
-Convert any bundle string/table to the normalized table form.
Community Examples

pm/tar function source
(tar & args)
+Convert any bundle string/table to the normalized table form.

pm/tar function source
(tar & args)
 
-Make a call to tar.
Community Examples

pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
+Make a call to tar.

pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
 
-Fetch latest tag version from remote repository
Community Examples

pm/update-installed function source
(update-installed)
+Fetch latest tag version from remote repository

pm/update-installed function source
(update-installed)
 
-Update all previously installed packages to their latest versions.
Community Examples
+Update all previously installed packages to their latest versions.
DAG Build Project Scaffolding diff --git a/static/1.28.0/api/jpm/rules.html b/static/1.28.0/api/jpm/rules.html index 97d71f00..19aa0a46 100644 --- a/static/1.28.0/api/jpm/rules.html +++ b/static/1.28.0/api/jpm/rules.html @@ -116,31 +116,31 @@

Index

rules/add-body rules/add-dep rules/add-input rules/add-output rules/add-thunk rules/build-rules rules/getrules rules/phony rules/rule rules/sh-phony rules/sh-rule rules/sh-task rules/task


rules/add-body macro source
(add-body target & body)
 
-Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.
Community Examples

rules/add-dep function source
(add-dep target dep)
+Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.

rules/add-dep function source
(add-dep target dep)
 
-Alias for `add-input`
Community Examples

rules/add-input function source
(add-input target input)
+Alias for `add-input`

rules/add-input function source
(add-input target input)
 
-Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.
Community Examples

rules/add-output function source
(add-output target output)
+Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.

rules/add-output function source
(add-output target output)
 
-Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.
Community Examples

rules/add-thunk function source
(add-thunk target thunk)
+Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.

rules/add-thunk function source
(add-thunk target thunk)
 
-Append a thunk to a target's recipe.
Community Examples

rules/build-rules function source
(build-rules rules targets &opt n-workers)
+Append a thunk to a target's recipe.

rules/build-rules function source
(build-rules rules targets &opt n-workers)
 
-Given a graph of all rules, extract a work graph that will build out-of-date files.
Community Examples

rules/getrules function source
(getrules)
+Given a graph of all rules, extract a work graph that will build out-of-date files.

rules/getrules function source
(getrules)
 
-
Community Examples

rules/phony macro source
(phony target deps & body)
+

rules/phony macro source
(phony target deps & body)
 
-Alias for `task`.
Community Examples

rules/rule macro source
(rule target deps & body)
+Alias for `task`.

rules/rule macro source
(rule target deps & body)
 
-Add a rule to the rule graph.
Community Examples

rules/sh-phony macro source
(sh-phony target deps & body)
+Add a rule to the rule graph.

rules/sh-phony macro source
(sh-phony target deps & body)
 
-Alias for `sh-task`.
Community Examples

rules/sh-rule macro source
(sh-rule target deps & body)
+Alias for `sh-task`.

rules/sh-rule macro source
(sh-rule target deps & body)
 
-Add a rule that invokes a shell command, and fails if the command returns non-zero.
Community Examples

rules/sh-task macro source
(sh-task target deps & body)
+Add a rule that invokes a shell command, and fails if the command returns non-zero.

rules/sh-task macro source
(sh-task target deps & body)
 
-Add a task that invokes a shell command, and fails if the command returns non-zero.
Community Examples

rules/task macro source
(task target deps & body)
+Add a task that invokes a shell command, and fails if the command returns non-zero.

rules/task macro source
(task target deps & body)
 
-Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
Community Examples
+Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
JPM C Compiler diff --git a/static/1.28.0/api/jpm/scaffold.html b/static/1.28.0/api/jpm/scaffold.html index 02b15a0e..e0ce3d84 100644 --- a/static/1.28.0/api/jpm/scaffold.html +++ b/static/1.28.0/api/jpm/scaffold.html @@ -116,7 +116,7 @@

Index

scaffold/scaffold-project


scaffold/scaffold-project function source
(scaffold-project name &opt options)
 
-Generate a standardized project scaffold.
Community Examples
+Generate a standardized project scaffold.
Project Management Shell Utilities diff --git a/static/1.28.0/api/jpm/shutil.html b/static/1.28.0/api/jpm/shutil.html index dac003ac..23f9b1bc 100644 --- a/static/1.28.0/api/jpm/shutil.html +++ b/static/1.28.0/api/jpm/shutil.html @@ -116,61 +116,61 @@

Index

shutil/abspath shutil/basename shutil/clear-cache shutil/clear-manifest shutil/clexe-shell shutil/copy shutil/copyfile shutil/create-dirs shutil/devnull shutil/dirname shutil/do-monkeypatch shutil/drop1-shell shutil/exec-slurp shutil/filepath-replace shutil/find-build-dir shutil/find-cache shutil/find-manifest shutil/find-manifest-dir shutil/is-mingw shutil/is-win shutil/is-win-or-mingw shutil/path-splitter shutil/rimraf shutil/rm shutil/run-patched shutil/run-repl shutil/run-script shutil/shell shutil/undo-monkeypatch


shutil/abspath function source
(abspath path)
 
-Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).
Community Examples

shutil/basename function source
(basename path)
+Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).

shutil/basename function source
(basename path)
 
-Get the filename of a path without any leading directory components.
Community Examples

shutil/clear-cache function source
(clear-cache)
+Get the filename of a path without any leading directory components.

shutil/clear-cache function source
(clear-cache)
 
-Clear the global git cache.
Community Examples

shutil/clear-manifest function source
(clear-manifest)
+Clear the global git cache.

shutil/clear-manifest function source
(clear-manifest)
 
-Clear the global installation manifest.
Community Examples

shutil/clexe-shell function source
(clexe-shell & args)
+Clear the global installation manifest.

shutil/clexe-shell function source
(clexe-shell & args)
 
-
Community Examples

shutil/copy function source
(copy src dest)
+

shutil/copy function source
(copy src dest)
 
-Copy a file or directory recursively from one location to another.
Community Examples

shutil/copyfile function source
(copyfile src dest)
+Copy a file or directory recursively from one location to another.

shutil/copyfile function source
(copyfile src dest)
 
-Copy a file one location to another.
Community Examples

shutil/create-dirs function source
(create-dirs dest)
+Copy a file one location to another.

shutil/create-dirs function source
(create-dirs dest)
 
-Create all directories needed for a file (mkdir -p).
Community Examples

shutil/devnull function source
(devnull)
+Create all directories needed for a file (mkdir -p).

shutil/devnull function source
(devnull)
 
-
Community Examples

shutil/dirname function source
(dirname path)
+

shutil/dirname function source
(dirname path)
 
-Get the directory of a file without the filename.
Community Examples

shutil/do-monkeypatch function source
(do-monkeypatch build-dir)
+Get the directory of a file without the filename.

shutil/do-monkeypatch function source
(do-monkeypatch build-dir)
 
-Modify the existing environment to have the same paths as the test environment.
Community Examples

shutil/drop1-shell function source
(drop1-shell std args)
+Modify the existing environment to have the same paths as the test environment.

shutil/drop1-shell function source
(drop1-shell std args)
 
-Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.
Community Examples

shutil/exec-slurp function source
(exec-slurp & args)
+Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.

shutil/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

shutil/filepath-replace function source
(filepath-replace repo)
+Read stdout of subprocess and return it trimmed in a string.

shutil/filepath-replace function source
(filepath-replace repo)
 
-Remove special characters from a string or path to make it into a path segment.
Community Examples

shutil/find-build-dir function source
(find-build-dir)
+Remove special characters from a string or path to make it into a path segment.

shutil/find-build-dir function source
(find-build-dir)
 
-Gets the build directory to output files to.
Community Examples

shutil/find-cache function source
(find-cache)
+Gets the build directory to output files to.

shutil/find-cache function source
(find-cache)
 
-Return the path to the global cache.
Community Examples

shutil/find-manifest function source
(find-manifest name)
+Return the path to the global cache.

shutil/find-manifest function source
(find-manifest name)
 
-Get the full path of a manifest file given a package name.
Community Examples

shutil/find-manifest-dir function source
(find-manifest-dir)
+Get the full path of a manifest file given a package name.

shutil/find-manifest-dir function source
(find-manifest-dir)
 
-Get the path to the directory containing manifests for installed packages.
Community Examples

shutil/is-mingw function source
(is-mingw)
+Get the path to the directory containing manifests for installed packages.

shutil/is-mingw function source
(is-mingw)
 
-Check if built with mingw
Community Examples

shutil/is-win function source
(is-win)
+Check if built with mingw

shutil/is-win function source
(is-win)
 
-Check if we should assume a DOS-like shell or default to posix shell.
Community Examples

shutil/is-win-or-mingw function source
(is-win-or-mingw)
+Check if we should assume a DOS-like shell or default to posix shell.

shutil/is-win-or-mingw function source
(is-win-or-mingw)
 
-Check if built with mingw
Community Examples

shutil/path-splitter core/peg source
split paths on / and \.
Community Examples

shutil/rimraf function source
(rimraf path)
+Check if built with mingw

shutil/path-splitter core/peg source
split paths on / and \.

shutil/rimraf function source
(rimraf path)
 
-Hard delete directory tree
Community Examples

shutil/rm function source
(rm path)
+Hard delete directory tree

shutil/rm function source
(rm path)
 
-Remove a directory and all sub directories.
Community Examples

shutil/run-patched function source
(run-patched & extra-args)
+Remove a directory and all sub directories.

shutil/run-patched function source
(run-patched & extra-args)
 
-Run a subprocess Janet repl that has the same environment as the test environment.
Community Examples

shutil/run-repl function source
(run-repl)
+Run a subprocess Janet repl that has the same environment as the test environment.

shutil/run-repl function source
(run-repl)
 
-Run a repl in the monkey patched test environment
Community Examples

shutil/run-script function source
(run-script path)
+Run a repl in the monkey patched test environment

shutil/run-script function source
(run-script path)
 
-Run a local script in the monkey patched environment.
Community Examples

shutil/shell function source
(shell & args)
+Run a local script in the monkey patched environment.

shutil/shell function source
(shell & args)
 
-Do a shell command
Community Examples

shutil/undo-monkeypatch function source
(undo-monkeypatch old-builddir)
+Do a shell command

shutil/undo-monkeypatch function source
(undo-monkeypatch old-builddir)
 
-
Community Examples
+
Project Scaffolding Math Module diff --git a/static/1.28.0/api/spork/argparse.html b/static/1.28.0/api/spork/argparse.html index 8ce2ff5d..54abbc12 100644 --- a/static/1.28.0/api/spork/argparse.html +++ b/static/1.28.0/api/spork/argparse.html @@ -146,7 +146,7 @@

Index Once parsed, values are accessible in the returned table by the name of the option. For example `(result "verbose")` will check if the verbose -flag is enabled.Community Examples

+flag is enabled.
Spork Base64 diff --git a/static/1.28.0/api/spork/base64.html b/static/1.28.0/api/spork/base64.html index 77978183..246b1a39 100644 --- a/static/1.28.0/api/spork/base64.html +++ b/static/1.28.0/api/spork/base64.html @@ -117,9 +117,9 @@

Index

base64/decode base64/encode


base64/decode function source
(decode s)
 
 Converts a base64 encoded string to its binary representation of any format
-(UTF-8, binary, ..).
Community Examples

base64/encode function source
(encode s)
+(UTF-8, binary, ..).

base64/encode function source
(encode s)
 
-Converts a string of any format (UTF-8, binary, ..) to base64 encoding.
Community Examples
+Converts a string of any format (UTF-8, binary, ..) to base64 encoding.

Argument Parsing CRC diff --git a/static/1.28.0/api/spork/crc.html b/static/1.28.0/api/spork/crc.html index d1afd20e..8d7618a7 100644 --- a/static/1.28.0/api/spork/crc.html +++ b/static/1.28.0/api/spork/crc.html @@ -116,9 +116,9 @@

Index

crc/make-variant crc/named-variant


crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
 
-Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.
Community Examples

crc/named-variant cfunction source
(crc/named-variant name)
+Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.

crc/named-variant cfunction source
(crc/named-variant name)
 
-Get a named CRC variant.
Community Examples
+Get a named CRC variant.
Base64 Cron diff --git a/static/1.28.0/api/spork/cron.html b/static/1.28.0/api/spork/cron.html index 87bbd116..ecc71308 100644 --- a/static/1.28.0/api/spork/cron.html +++ b/static/1.28.0/api/spork/cron.html @@ -116,11 +116,11 @@

Index

cron/check cron/next-timestamp cron/parse-cron


cron/check function source
(check cron &opt time local)
 
-Check if a given time matches a cron specifier.
Community Examples

cron/next-timestamp function source
(next-timestamp cron &opt time local)
+Check if a given time matches a cron specifier.

cron/next-timestamp function source
(next-timestamp cron &opt time local)
 
-Given a cron schedule, get the next instance on the cron tab after time
Community Examples

cron/parse-cron function source
(parse-cron str)
+Given a cron schedule, get the next instance on the cron tab after time

cron/parse-cron function source
(parse-cron str)
 
-Parse a cron string into a valid cron schedule object
Community Examples
+Parse a cron string into a valid cron schedule object
CRC EV Utilities diff --git a/static/1.28.0/api/spork/ev-utils.html b/static/1.28.0/api/spork/ev-utils.html index 290e4528..9a2a90b5 100644 --- a/static/1.28.0/api/spork/ev-utils.html +++ b/static/1.28.0/api/spork/ev-utils.html @@ -116,27 +116,27 @@

Index

ev-utils/go-nursery ev-utils/join-nursery ev-utils/multithread-service ev-utils/nursery ev-utils/pcall ev-utils/pdag ev-utils/pmap ev-utils/pmap-full ev-utils/pmap-limited ev-utils/spawn-nursery ev-utils/wait-cancel


ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
 
-Spawn a fiber into a nursery, similar to ev/go.
Community Examples

ev-utils/join-nursery function source
(join-nursery nurse)
+Spawn a fiber into a nursery, similar to ev/go.

ev-utils/join-nursery function source
(join-nursery nurse)
 
-Suspend the current fiber until the nursery is emptied.
Community Examples

ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
+Suspend the current fiber until the nursery is emptied.

ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
 
-Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.
Community Examples

ev-utils/nursery function source
(nursery)
+Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.

ev-utils/nursery function source
(nursery)
 
-Group a number of fibers into a single object for structured concurrency
Community Examples

ev-utils/pcall function source
(pcall f n)
+Group a number of fibers into a single object for structured concurrency

ev-utils/pcall function source
(pcall f n)
 
-Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.
Community Examples

ev-utils/pdag function source
(pdag f dag &opt n-workers)
+Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.

ev-utils/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.
Community Examples

ev-utils/pmap function source
(pmap f data &opt n-workers)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.

ev-utils/pmap function source
(pmap f data &opt n-workers)
 
-Map `f` over data in parallel, optionally limiting parallelism to `n` workers.
Community Examples

ev-utils/pmap-full function source
(pmap-full f data)
+Map `f` over data in parallel, optionally limiting parallelism to `n` workers.

ev-utils/pmap-full function source
(pmap-full f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.
Community Examples

ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.

ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
 
-Similar to pmap-full, but only runs work n-ways parallel.
Community Examples

ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
+Similar to pmap-full, but only runs work n-ways parallel.

ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
 
-Similar to ev/spawn but associate spawned fibers with a nursery
Community Examples

ev-utils/wait-cancel macro source
(wait-cancel & body)
+Similar to ev/spawn but associate spawned fibers with a nursery

ev-utils/wait-cancel macro source
(wait-cancel & body)
 
-Wait forever until the current fiber is canceled, and then run some cleanup code.
Community Examples
+Wait forever until the current fiber is canceled, and then run some cleanup code.
Cron Format diff --git a/static/1.28.0/api/spork/fmt.html b/static/1.28.0/api/spork/fmt.html index 8a3a7f05..f855f673 100644 --- a/static/1.28.0/api/spork/fmt.html +++ b/static/1.28.0/api/spork/fmt.html @@ -116,11 +116,11 @@

Index

fmt/format fmt/format-file fmt/format-print


fmt/format function source
(format source)
 
-Format a string of source code to a buffer.
Community Examples

fmt/format-file function source
(format-file file)
+Format a string of source code to a buffer.

fmt/format-file function source
(format-file file)
 
-Format a file
Community Examples

fmt/format-print function source
(format-print source)
+Format a file

fmt/format-print function source
(format-print source)
 
-Format a string of source code and print the result.
Community Examples
+Format a string of source code and print the result.
EV Utilities Generators diff --git a/static/1.28.0/api/spork/generators.html b/static/1.28.0/api/spork/generators.html index a6e456f3..9fce4bd8 100644 --- a/static/1.28.0/api/spork/generators.html +++ b/static/1.28.0/api/spork/generators.html @@ -116,35 +116,35 @@

Index

generators/concat generators/cycle generators/drop generators/drop-until generators/drop-while generators/filter generators/from-iterable generators/map generators/mapcat generators/range generators/run generators/take generators/take-until generators/take-while generators/to-array


generators/concat function source
(concat & xs)
 
-Concatenate one or more generators or iterables into a single generator.
Community Examples

generators/cycle function source
(cycle ds)
+Concatenate one or more generators or iterables into a single generator.

generators/cycle function source
(cycle ds)
 
-Repeatedly yield the elements of `ds`, looping back to the beginning when finished.
Community Examples

generators/drop function source
(drop n ds)
+Repeatedly yield the elements of `ds`, looping back to the beginning when finished.

generators/drop function source
(drop n ds)
 
-Drop `n` elements from `ds`.
Community Examples

generators/drop-until function source
(drop-until p ds)
+Drop `n` elements from `ds`.

generators/drop-until function source
(drop-until p ds)
 
-Drop elements from `ds` until `p` is true.
Community Examples

generators/drop-while function source
(drop-while p ds)
+Drop elements from `ds` until `p` is true.

generators/drop-while function source
(drop-while p ds)
 
-Drop elements from `ds` while `p` is true.
Community Examples

generators/filter function source
(filter p ds)
+Drop elements from `ds` while `p` is true.

generators/filter function source
(filter p ds)
 
-Create a generator that filters `ds` with `p`.
Community Examples

generators/from-iterable function source
(from-iterable ds)
+Create a generator that filters `ds` with `p`.

generators/from-iterable function source
(from-iterable ds)
 
-Create a new generator around any iterable data structure.
Community Examples

generators/map function source
(map f ds)
+Create a new generator around any iterable data structure.

generators/map function source
(map f ds)
 
-Create a generator that maps `f` over `ds`.
Community Examples

generators/mapcat function source
(mapcat f ds)
+Create a generator that maps `f` over `ds`.

generators/mapcat function source
(mapcat f ds)
 
-Map `f` over `ds`, concatenating the results into a new generator.
Community Examples

generators/range function source
(range from to)
+Map `f` over `ds`, concatenating the results into a new generator.

generators/range function source
(range from to)
 
-Create a lazy range.
Community Examples

generators/run function source
(run s)
+Create a lazy range.

generators/run function source
(run s)
 
-Evaluate `s` for side effects.
Community Examples

generators/take function source
(take n ds)
+Evaluate `s` for side effects.

generators/take function source
(take n ds)
 
-Take `n` elements from iterable `ds`.
Community Examples

generators/take-until function source
(take-until p ds)
+Take `n` elements from iterable `ds`.

generators/take-until function source
(take-until p ds)
 
-Return elements from `ds` until `p` is true.
Community Examples

generators/take-while function source
(take-while p ds)
+Return elements from `ds` until `p` is true.

generators/take-while function source
(take-while p ds)
 
-Return elements from `ds` while `p` is true.
Community Examples

generators/to-array function source
(to-array s)
+Return elements from `ds` while `p` is true.

generators/to-array function source
(to-array s)
 
-Consume `s` into a new array.
Community Examples
+Consume `s` into a new array.
Format Getline diff --git a/static/1.28.0/api/spork/getline.html b/static/1.28.0/api/spork/getline.html index 0b2f48b8..6b5895a0 100644 --- a/static/1.28.0/api/spork/getline.html +++ b/static/1.28.0/api/spork/getline.html @@ -116,13 +116,13 @@

Index

getline/default-autocomplete-context getline/default-autocomplete-options getline/default-doc-fetch getline/make-getline getline/max-history


getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
 
-Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.
Community Examples

getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
+Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.

getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
 
-Default handler to get available autocomplete options for a given substring.
Community Examples

getline/default-doc-fetch function source
(default-doc-fetch sym w &)
+Default handler to get available autocomplete options for a given substring.

getline/default-doc-fetch function source
(default-doc-fetch sym w &)
 
-Default handler for Ctrl-G to lookup docstrings in the current environment.
Community Examples

getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
+Default handler for Ctrl-G to lookup docstrings in the current environment.

getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
 
-Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.
Community Examples

getline/max-history number source
Maximal amount of items in the history
Community Examples
+Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.

getline/max-history number source
Maximal amount of items in the history
Generators HTML Generation diff --git a/static/1.28.0/api/spork/htmlgen.html b/static/1.28.0/api/spork/htmlgen.html index 3d0d1ec0..4194c52c 100644 --- a/static/1.28.0/api/spork/htmlgen.html +++ b/static/1.28.0/api/spork/htmlgen.html @@ -114,13 +114,13 @@

HTML Generation

Index

-

htmlgen/doctype-html htmlgen/escape htmlgen/html htmlgen/raw


htmlgen/doctype-html function source
The html5 doctype header
Community Examples

htmlgen/escape function source
(escape x)
+

htmlgen/doctype-html htmlgen/escape htmlgen/html htmlgen/raw


htmlgen/doctype-html function source
The html5 doctype header

htmlgen/escape function source
(escape x)
 
-Escape characters in a string for HTML
Community Examples

htmlgen/html function source
(html data &opt buf)
+Escape characters in a string for HTML

htmlgen/html function source
(html data &opt buf)
 
-Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.
Community Examples

htmlgen/raw function source
(raw text)
+Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.

htmlgen/raw function source
(raw text)
 
-Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Community Examples
+Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Getline HTTP diff --git a/static/1.28.0/api/spork/http.html b/static/1.28.0/api/spork/http.html index 272774d4..9823d917 100644 --- a/static/1.28.0/api/spork/http.html +++ b/static/1.28.0/api/spork/http.html @@ -114,29 +114,29 @@

HTTP

Index

-

http/cookie-grammar http/cookies http/logger http/middleware http/query-string-grammar http/read-body http/read-request http/read-response http/request http/request-peg http/response-peg http/router http/send-response http/server http/server-handler http/status-messages http/url-grammar


http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.
Community Examples

http/cookies function source
(cookies nextmw)
+

http/cookie-grammar http/cookies http/logger http/middleware http/query-string-grammar http/read-body http/read-request http/read-response http/request http/request-peg http/response-peg http/router http/send-response http/server http/server-handler http/status-messages http/url-grammar


http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.

http/cookies function source
(cookies nextmw)
 
-Parses cookies into the table under :cookies key
Community Examples

http/logger function source
(logger nextmw)
+Parses cookies into the table under :cookies key

http/logger function source
(logger nextmw)
 
-Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.
Community Examples

http/middleware function source
(middleware x)
+Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.

http/middleware function source
(middleware x)
 
-Coerce any type to http middleware
Community Examples

http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.
Community Examples

http/read-body function source
(read-body req)
+Coerce any type to http middleware

http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.

http/read-body function source
(read-body req)
 
-Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.
Community Examples

http/read-request function source
(read-request conn buf &opt no-query)
+Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.

http/read-request function source
(read-request conn buf &opt no-query)
 
-Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`
Community Examples

http/read-response function source
(read-response conn buf)
+Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`

http/read-response function source
(read-response conn buf)
 
-Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`
Community Examples

http/request function source
(request method url &keys {:headers headers :body body})
+Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`

http/request function source
(request method url &keys {:headers headers :body body})
 
-Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.
Community Examples

http/request-peg core/peg source
PEG for parsing HTTP requests
Community Examples

http/response-peg core/peg source
PEG for parsing HTTP responses
Community Examples

http/router function source
(router routes)
+Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.

http/request-peg core/peg source
PEG for parsing HTTP requests

http/response-peg core/peg source
PEG for parsing HTTP responses

http/router function source
(router routes)
 
-Creates a router middleware. A router will dispatch to different routes based on the URL path.
Community Examples

http/send-response function source
(send-response conn response &opt buf)
+Creates a router middleware. A router will dispatch to different routes based on the URL path.

http/send-response function source
(send-response conn response &opt buf)
 
-Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.
Community Examples

http/server function source
(server handler &opt host port)
+Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.

http/server function source
(server handler &opt host port)
 
-Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.
Community Examples

http/server-handler function source
(server-handler conn handler)
+Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.

http/server-handler function source
(server-handler conn handler)
 
-A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.
Community Examples

http/status-messages struct source
Mapping of HTTP status codes to their status message.
Community Examples

http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
Community Examples
+A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.

http/status-messages struct source
Mapping of HTTP status codes to their status message.

http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
HTML Generation HTTP Framework diff --git a/static/1.28.0/api/spork/httpf.html b/static/1.28.0/api/spork/httpf.html index 5ea0da5a..3d41222c 100644 --- a/static/1.28.0/api/spork/httpf.html +++ b/static/1.28.0/api/spork/httpf.html @@ -116,15 +116,15 @@

Index

httpf/add-bindings-as-routes httpf/add-route httpf/default-payload-wrapper httpf/listen httpf/server


httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
 
-Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.
Community Examples

httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
+Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.

httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
 
-Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.
Community Examples

httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
+Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.

httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
 
-Add some metadata to all responses
Community Examples

httpf/listen function source
(listen server &opt host port n-workers)
+Add some metadata to all responses

httpf/listen function source
(listen server &opt host port n-workers)
 
-Start server
Community Examples

httpf/server function source
(server &opt parent)
+Start server

httpf/server function source
(server &opt parent)
 
-Create a new server.
Community Examples
+Create a new server.
HTTP JSON diff --git a/static/1.28.0/api/spork/index.html b/static/1.28.0/api/spork/index.html index 70959cef..1a66d201 100644 --- a/static/1.28.0/api/spork/index.html +++ b/static/1.28.0/api/spork/index.html @@ -151,238 +151,238 @@

Spork

Once parsed, values are accessible in the returned table by the name of the option. For example `(result "verbose")` will check if the verbose -flag is enabled.Community Examples

spork/base64/decode function source
(decode s)
+flag is enabled.

spork/base64/decode function source
(decode s)
 
 Converts a base64 encoded string to its binary representation of any format
-(UTF-8, binary, ..).
Community Examples

spork/base64/encode function source
(encode s)
+(UTF-8, binary, ..).

spork/base64/encode function source
(encode s)
 
-Converts a string of any format (UTF-8, binary, ..) to base64 encoding.
Community Examples

spork/crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
+Converts a string of any format (UTF-8, binary, ..) to base64 encoding.

spork/crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
 
-Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.
Community Examples

spork/crc/named-variant cfunction source
(crc/named-variant name)
+Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.

spork/crc/named-variant cfunction source
(crc/named-variant name)
 
-Get a named CRC variant.
Community Examples

spork/cron/check function source
(check cron &opt time local)
+Get a named CRC variant.

spork/cron/check function source
(check cron &opt time local)
 
-Check if a given time matches a cron specifier.
Community Examples

spork/cron/next-timestamp function source
(next-timestamp cron &opt time local)
+Check if a given time matches a cron specifier.

spork/cron/next-timestamp function source
(next-timestamp cron &opt time local)
 
-Given a cron schedule, get the next instance on the cron tab after time
Community Examples

spork/cron/parse-cron function source
(parse-cron str)
+Given a cron schedule, get the next instance on the cron tab after time

spork/cron/parse-cron function source
(parse-cron str)
 
-Parse a cron string into a valid cron schedule object
Community Examples

spork/ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
+Parse a cron string into a valid cron schedule object

spork/ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
 
-Spawn a fiber into a nursery, similar to ev/go.
Community Examples

spork/ev-utils/join-nursery function source
(join-nursery nurse)
+Spawn a fiber into a nursery, similar to ev/go.

spork/ev-utils/join-nursery function source
(join-nursery nurse)
 
-Suspend the current fiber until the nursery is emptied.
Community Examples

spork/ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
+Suspend the current fiber until the nursery is emptied.

spork/ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
 
-Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.
Community Examples

spork/ev-utils/nursery function source
(nursery)
+Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.

spork/ev-utils/nursery function source
(nursery)
 
-Group a number of fibers into a single object for structured concurrency
Community Examples

spork/ev-utils/pcall function source
(pcall f n)
+Group a number of fibers into a single object for structured concurrency

spork/ev-utils/pcall function source
(pcall f n)
 
-Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.
Community Examples

spork/ev-utils/pdag function source
(pdag f dag &opt n-workers)
+Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.

spork/ev-utils/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.
Community Examples

spork/ev-utils/pmap function source
(pmap f data &opt n-workers)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.

spork/ev-utils/pmap function source
(pmap f data &opt n-workers)
 
-Map `f` over data in parallel, optionally limiting parallelism to `n` workers.
Community Examples

spork/ev-utils/pmap-full function source
(pmap-full f data)
+Map `f` over data in parallel, optionally limiting parallelism to `n` workers.

spork/ev-utils/pmap-full function source
(pmap-full f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.
Community Examples

spork/ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.

spork/ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
 
-Similar to pmap-full, but only runs work n-ways parallel.
Community Examples

spork/ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
+Similar to pmap-full, but only runs work n-ways parallel.

spork/ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
 
-Similar to ev/spawn but associate spawned fibers with a nursery
Community Examples

spork/ev-utils/wait-cancel macro source
(wait-cancel & body)
+Similar to ev/spawn but associate spawned fibers with a nursery

spork/ev-utils/wait-cancel macro source
(wait-cancel & body)
 
-Wait forever until the current fiber is canceled, and then run some cleanup code.
Community Examples

spork/fmt/format function source
(format source)
+Wait forever until the current fiber is canceled, and then run some cleanup code.

spork/fmt/format function source
(format source)
 
-Format a string of source code to a buffer.
Community Examples

spork/fmt/format-file function source
(format-file file)
+Format a string of source code to a buffer.

spork/fmt/format-file function source
(format-file file)
 
-Format a file
Community Examples

spork/fmt/format-print function source
(format-print source)
+Format a file

spork/fmt/format-print function source
(format-print source)
 
-Format a string of source code and print the result.
Community Examples

spork/generators/concat function source
(concat & xs)
+Format a string of source code and print the result.

spork/generators/concat function source
(concat & xs)
 
-Concatenate one or more generators or iterables into a single generator.
Community Examples

spork/generators/cycle function source
(cycle ds)
+Concatenate one or more generators or iterables into a single generator.

spork/generators/cycle function source
(cycle ds)
 
-Repeatedly yield the elements of `ds`, looping back to the beginning when finished.
Community Examples

spork/generators/drop function source
(drop n ds)
+Repeatedly yield the elements of `ds`, looping back to the beginning when finished.

spork/generators/drop function source
(drop n ds)
 
-Drop `n` elements from `ds`.
Community Examples

spork/generators/drop-until function source
(drop-until p ds)
+Drop `n` elements from `ds`.

spork/generators/drop-until function source
(drop-until p ds)
 
-Drop elements from `ds` until `p` is true.
Community Examples

spork/generators/drop-while function source
(drop-while p ds)
+Drop elements from `ds` until `p` is true.

spork/generators/drop-while function source
(drop-while p ds)
 
-Drop elements from `ds` while `p` is true.
Community Examples

spork/generators/filter function source
(filter p ds)
+Drop elements from `ds` while `p` is true.

spork/generators/filter function source
(filter p ds)
 
-Create a generator that filters `ds` with `p`.
Community Examples

spork/generators/from-iterable function source
(from-iterable ds)
+Create a generator that filters `ds` with `p`.

spork/generators/from-iterable function source
(from-iterable ds)
 
-Create a new generator around any iterable data structure.
Community Examples

spork/generators/map function source
(map f ds)
+Create a new generator around any iterable data structure.

spork/generators/map function source
(map f ds)
 
-Create a generator that maps `f` over `ds`.
Community Examples

spork/generators/mapcat function source
(mapcat f ds)
+Create a generator that maps `f` over `ds`.

spork/generators/mapcat function source
(mapcat f ds)
 
-Map `f` over `ds`, concatenating the results into a new generator.
Community Examples

spork/generators/range function source
(range from to)
+Map `f` over `ds`, concatenating the results into a new generator.

spork/generators/range function source
(range from to)
 
-Create a lazy range.
Community Examples

spork/generators/run function source
(run s)
+Create a lazy range.

spork/generators/run function source
(run s)
 
-Evaluate `s` for side effects.
Community Examples

spork/generators/take function source
(take n ds)
+Evaluate `s` for side effects.

spork/generators/take function source
(take n ds)
 
-Take `n` elements from iterable `ds`.
Community Examples

spork/generators/take-until function source
(take-until p ds)
+Take `n` elements from iterable `ds`.

spork/generators/take-until function source
(take-until p ds)
 
-Return elements from `ds` until `p` is true.
Community Examples

spork/generators/take-while function source
(take-while p ds)
+Return elements from `ds` until `p` is true.

spork/generators/take-while function source
(take-while p ds)
 
-Return elements from `ds` while `p` is true.
Community Examples

spork/generators/to-array function source
(to-array s)
+Return elements from `ds` while `p` is true.

spork/generators/to-array function source
(to-array s)
 
-Consume `s` into a new array.
Community Examples

spork/getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
+Consume `s` into a new array.

spork/getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
 
-Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.
Community Examples

spork/getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
+Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.

spork/getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
 
-Default handler to get available autocomplete options for a given substring.
Community Examples

spork/getline/default-doc-fetch function source
(default-doc-fetch sym w &)
+Default handler to get available autocomplete options for a given substring.

spork/getline/default-doc-fetch function source
(default-doc-fetch sym w &)
 
-Default handler for Ctrl-G to lookup docstrings in the current environment.
Community Examples

spork/getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
+Default handler for Ctrl-G to lookup docstrings in the current environment.

spork/getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
 
-Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.
Community Examples

spork/getline/max-history number source
Maximal amount of items in the history
Community Examples

spork/htmlgen/doctype-html function source
The html5 doctype header
Community Examples

spork/htmlgen/escape function source
(escape x)
+Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.

spork/getline/max-history number source
Maximal amount of items in the history

spork/htmlgen/doctype-html function source
The html5 doctype header

spork/htmlgen/escape function source
(escape x)
 
-Escape characters in a string for HTML
Community Examples

spork/htmlgen/html function source
(html data &opt buf)
+Escape characters in a string for HTML

spork/htmlgen/html function source
(html data &opt buf)
 
-Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.
Community Examples

spork/htmlgen/raw function source
(raw text)
+Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.

spork/htmlgen/raw function source
(raw text)
 
-Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Community Examples

spork/http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.
Community Examples

spork/http/cookies function source
(cookies nextmw)
+Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.

spork/http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.

spork/http/cookies function source
(cookies nextmw)
 
-Parses cookies into the table under :cookies key
Community Examples

spork/http/logger function source
(logger nextmw)
+Parses cookies into the table under :cookies key

spork/http/logger function source
(logger nextmw)
 
-Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.
Community Examples

spork/http/middleware function source
(middleware x)
+Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.

spork/http/middleware function source
(middleware x)
 
-Coerce any type to http middleware
Community Examples

spork/http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.
Community Examples

spork/http/read-body function source
(read-body req)
+Coerce any type to http middleware

spork/http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.

spork/http/read-body function source
(read-body req)
 
-Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.
Community Examples

spork/http/read-request function source
(read-request conn buf &opt no-query)
+Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.

spork/http/read-request function source
(read-request conn buf &opt no-query)
 
-Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`
Community Examples

spork/http/read-response function source
(read-response conn buf)
+Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`

spork/http/read-response function source
(read-response conn buf)
 
-Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`
Community Examples

spork/http/request function source
(request method url &keys {:headers headers :body body})
+Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`

spork/http/request function source
(request method url &keys {:headers headers :body body})
 
-Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.
Community Examples

spork/http/request-peg core/peg source
PEG for parsing HTTP requests
Community Examples

spork/http/response-peg core/peg source
PEG for parsing HTTP responses
Community Examples

spork/http/router function source
(router routes)
+Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.

spork/http/request-peg core/peg source
PEG for parsing HTTP requests

spork/http/response-peg core/peg source
PEG for parsing HTTP responses

spork/http/router function source
(router routes)
 
-Creates a router middleware. A router will dispatch to different routes based on the URL path.
Community Examples

spork/http/send-response function source
(send-response conn response &opt buf)
+Creates a router middleware. A router will dispatch to different routes based on the URL path.

spork/http/send-response function source
(send-response conn response &opt buf)
 
-Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.
Community Examples

spork/http/server function source
(server handler &opt host port)
+Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.

spork/http/server function source
(server handler &opt host port)
 
-Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.
Community Examples

spork/http/server-handler function source
(server-handler conn handler)
+Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.

spork/http/server-handler function source
(server-handler conn handler)
 
-A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.
Community Examples

spork/http/status-messages struct source
Mapping of HTTP status codes to their status message.
Community Examples

spork/http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
Community Examples

spork/httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
+A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.

spork/http/status-messages struct source
Mapping of HTTP status codes to their status message.

spork/http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.

spork/httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
 
-Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.
Community Examples

spork/httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
+Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.

spork/httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
 
-Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.
Community Examples

spork/httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
+Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.

spork/httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
 
-Add some metadata to all responses
Community Examples

spork/httpf/listen function source
(listen server &opt host port n-workers)
+Add some metadata to all responses

spork/httpf/listen function source
(listen server &opt host port n-workers)
 
-Start server
Community Examples

spork/httpf/server function source
(server &opt parent)
+Start server

spork/httpf/server function source
(server &opt parent)
 
-Create a new server.
Community Examples

spork/json/decode cfunction
(json/decode json-source &opt keywords nils)
+Create a new server.

spork/json/decode cfunction
(json/decode json-source &opt keywords nils)
 
-Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.
Community Examples

spork/json/encode cfunction
(json/encode x &opt tab newline buf)
+Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.

spork/json/encode cfunction
(json/encode x &opt tab newline buf)
 
-Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
Community Examples

spork/mdz/*front-matter* keyword source
Dynamic binding to front matter after parsing, compilation, and evaluation, of markup completes.
Community Examples

spork/mdz/*markup-dom* keyword source
The htmlgen source that can be used to generate a document with htmlgen/html.
Community Examples

spork/mdz/add-loader function source
(add-loader)
+Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.

spork/mdz/*front-matter* keyword source
Dynamic binding to front matter after parsing, compilation, and evaluation, of markup completes.

spork/mdz/*markup-dom* keyword source
The htmlgen source that can be used to generate a document with htmlgen/html.

spork/mdz/add-loader function source
(add-loader)
 
-Allow importing and requiring markup as a module
Community Examples

spork/mdz/anchor function source
(anchor name & content)
+Allow importing and requiring markup as a module

spork/mdz/anchor function source
(anchor name & content)
 
-Create an in-page anchor for a local link.
Community Examples

spork/mdz/bigger function source
(bigger content)
+Create an in-page anchor for a local link.

spork/mdz/bigger function source
(bigger content)
 
-Make span element with bigger font
Community Examples

spork/mdz/blockquote function source
(blockquote content)
+Make span element with bigger font

spork/mdz/blockquote function source
(blockquote content)
 
-Make a block quote element
Community Examples

spork/mdz/center function source
(center content)
+Make a block quote element

spork/mdz/center function source
(center content)
 
-Center some content
Community Examples

spork/mdz/code function source
(code content)
+Center some content

spork/mdz/code function source
(code content)
 
-Make code element with class mendoza-code
Community Examples

spork/mdz/codeblock function source
(codeblock lang &opt source)
+Make code element with class mendoza-code

spork/mdz/codeblock function source
(codeblock lang &opt source)
 
-Inline code or codeblock
Community Examples

spork/mdz/div function
Make a div element
Community Examples

spork/mdz/em function
Make a em element
Community Examples

spork/mdz/hr function source
(hr)
+Inline code or codeblock

spork/mdz/div function
Make a div element

spork/mdz/em function
Make a em element

spork/mdz/hr function source
(hr)
 
-Add a horizontal rule
Community Examples

spork/mdz/html function source
(html source)
+Add a horizontal rule

spork/mdz/html function source
(html source)
 
-Embed some raw html
Community Examples

spork/mdz/image function source
(image src alt)
+Embed some raw html

spork/mdz/image function source
(image src alt)
 
-Make an image element
Community Examples

spork/mdz/li function
Make a li element
Community Examples

spork/mdz/link function source
(link url &opt content)
+Make an image element

spork/mdz/li function
Make a li element

spork/mdz/link function source
(link url &opt content)
 
-Create an anchor link
Community Examples

spork/mdz/markup function source
(markup source &opt env where)
+Create an anchor link

spork/mdz/markup function source
(markup source &opt env where)
 
-Parse mendoza markup and evaluate it returning an htmlgen document tree.
Community Examples

spork/mdz/mdz-loader function source
(mdz-loader path &)
+Parse mendoza markup and evaluate it returning an htmlgen document tree.

spork/mdz/mdz-loader function source
(mdz-loader path &)
 
-Loader for the mdz format
Community Examples

spork/mdz/ol function
Make a ol element
Community Examples

spork/mdz/p function
Make a p element
Community Examples

spork/mdz/pre function
Make a pre element
Community Examples

spork/mdz/section function source
(section name content)
+Loader for the mdz format

spork/mdz/ol function
Make a ol element

spork/mdz/p function
Make a p element

spork/mdz/pre function
Make a pre element

spork/mdz/section function source
(section name content)
 
-Create a section. Usually used to embed different parts of the content document into different parts of the main page.
Community Examples

spork/mdz/smaller function source
(smaller content)
+Create a section. Usually used to embed different parts of the content document into different parts of the main page.

spork/mdz/smaller function source
(smaller content)
 
-Make span element with smaller font
Community Examples

spork/mdz/strong function
Make a strong element
Community Examples

spork/mdz/sub function
Make a sub element
Community Examples

spork/mdz/sup function
Make a sup element
Community Examples

spork/mdz/tag function source
(tag name content)
+Make span element with smaller font

spork/mdz/strong function
Make a strong element

spork/mdz/sub function
Make a sub element

spork/mdz/sup function
Make a sup element

spork/mdz/tag function source
(tag name content)
 
-Wrap some content in an html tag. If you need attributes or other properties, you may want to use raw HTML via the html function.
Community Examples

spork/mdz/td function
Make a td element
Community Examples

spork/mdz/th function
Make a th element
Community Examples

spork/mdz/tr function
Make a tr element
Community Examples

spork/mdz/u function
Make a u element
Community Examples

spork/mdz/ul function
Make a ul element
Community Examples

spork/misc/always function source
(always x)
+Wrap some content in an html tag. If you need attributes or other properties, you may want to use raw HTML via the html function.

spork/mdz/td function
Make a td element

spork/mdz/th function
Make a th element

spork/mdz/tr function
Make a tr element

spork/mdz/u function
Make a u element

spork/mdz/ul function
Make a ul element

spork/misc/always function source
(always x)
 
-Return a function that discards any arguments and always returns `x`.
Community Examples

spork/misc/antepenultimate function source
(antepenultimate xs)
+Return a function that discards any arguments and always returns `x`.

spork/misc/antepenultimate function source
(antepenultimate xs)
 
-Get the third-to-last element from an indexed data structure.
Community Examples

spork/misc/caperr macro source
(caperr & body)
+Get the third-to-last element from an indexed data structure.

spork/misc/caperr macro source
(caperr & body)
 
 Captures the standart error output of the variadic `body` and returns it
-as a buffer.
Community Examples

spork/misc/capout macro source
(capout & body)
+as a buffer.

spork/misc/capout macro source
(capout & body)
 
 Captures the standart output of the variadic `body` and returns it as
-a buffer.
Community Examples

spork/misc/cond-> macro source
(cond-> val & clauses)
+a buffer.

spork/misc/cond-> macro source
(cond-> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs with condition and operation to which the `val`,
 is put as first argument. All conditions are tried and
 for truthy conditions the operation is executed.
-Returns the value mutated if any condition is truthy.
Community Examples

spork/misc/cond->> macro source
(cond->> val & clauses)
+Returns the value mutated if any condition is truthy.

spork/misc/cond->> macro source
(cond->> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs of condition and operation to which the `val`,
 is put as last argument. All conditions are tried and
 for truthy the operation is ran.
-Returns mutated value if any condition is truthy.
Community Examples

spork/misc/dedent function source
(dedent & xs)
+Returns mutated value if any condition is truthy.

spork/misc/dedent function source
(dedent & xs)
 
 Remove indentation after concatenating the arguments. Works by removing
 leading whitespace, and then removing that same pattern of whitepsace after
-new lines.
Community Examples

spork/misc/defs macro source
(defs & bindings)
+new lines.

spork/misc/defs macro source
(defs & bindings)
 
-Defines many constants as in let `bindings`, but without creating new scope.
Community Examples

spork/misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
+Defines many constants as in let `bindings`, but without creating new scope.

spork/misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
 
 Do a depth first, pre-order traversal over a data structure.
 Also allow for callbacks before and after visiting the children
 of a node. Also allow for a custom `get-children` function to
 change traversal as needed. Will detect cycles if an empty table
 is passed as the `seen` parameter, which is used to cached values
-that have been visited.
Community Examples

spork/misc/do-def macro source
(do-def c d & body)
+that have been visited.

spork/misc/do-def macro source
(do-def c d & body)
 
 Convenience macro for defining constant named `c` with value `d` before `body`
 and returning it after evaluating `body`, that presumably modifies 
-the `c` refered content. For example buffer, table or array.
Community Examples

spork/misc/do-var macro source
(do-var v d & body)
+the `c` refered content. For example buffer, table or array.

spork/misc/do-var macro source
(do-var v d & body)
 
 Convenience macro for defining varible named `v` with value `d` before `body`
-and returning it after evaluating `body`, that presumably modifies `v`.
Community Examples

spork/misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
+and returning it after evaluating `body`, that presumably modifies `v`.

spork/misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
 
-Same as print-table but pushes table into a buffer.
Community Examples

spork/misc/gett macro source
(gett ds & keys)
+Same as print-table but pushes table into a buffer.

spork/misc/gett macro source
(gett ds & keys)
 
-Recursive macro (get). Similar to get-in, but keys are variadic argument.
Community Examples

spork/misc/insert-sorted function source
(insert-sorted arr <? & xs)
+Recursive macro (get). Similar to get-in, but keys are variadic argument.

spork/misc/insert-sorted function source
(insert-sorted arr <? & xs)
 
 Insert elements in `arr` such that it remains sorted by the comparator. If
-`arr` is not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

spork/misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
+`arr` is not sorted beforehand, the results are undefined. Returns `arr`.

spork/misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
 
 Insert elements in `arr` such that it remains sorted by the value returned
 when `f` is called with the element, comparing the values with <. If `arr` is
-not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

spork/misc/int->string function source
(int->string int &opt base)
+not sorted beforehand, the results are undefined. Returns `arr`.

spork/misc/int->string function source
(int->string int &opt base)
 
-Stringify an integer in a particular base. Defaults to decimal (base 10).
Community Examples

spork/misc/int/ function source
(int/ & xs)
+Stringify an integer in a particular base. Defaults to decimal (base 10).

spork/misc/int/ function source
(int/ & xs)
 
-Perform integer division.
Community Examples

spork/misc/log macro source
(log level & args)
+Perform integer division.

spork/misc/log macro source
(log level & args)
 
 Print to a dynamic binding stream if that stream is set, otherwise do
 nothing. Evaluate to nil. 
 For example, `(log :err "value error: %V" my-value)` will print 
-to `(dyn :err)` only if `(dyn :err)` has been set.
Community Examples

spork/misc/make macro source
(make prototype & pairs)
+to `(dyn :err)` only if `(dyn :err)` has been set.

spork/misc/make macro source
(make prototype & pairs)
 
 Convenience macro for creating new table from even number of kvs pairs in a variadic `table-or-pairs`
 arguments and setting its prototype to `prototype`.
-Factory function for creating new objects from prototypes.
Community Examples

spork/misc/make-id function source
(make-id &opt prefix)
+Factory function for creating new objects from prototypes.

spork/misc/make-id function source
(make-id &opt prefix)
 
 Create a random, printable keyword id with 10 bytes of entropy
-with an optional prefix.
Community Examples

spork/misc/map-keys function source
(map-keys f data)
+with an optional prefix.

spork/misc/map-keys function source
(map-keys f data)
 
 Returns new table with function `f` applied to `data`'s
-keys recursively.
Community Examples

spork/misc/map-vals function source
(map-vals f data)
+keys recursively.

spork/misc/map-vals function source
(map-vals f data)
 
-Returns new table with function `f` applied to `data`'s values.
Community Examples

spork/misc/penultimate function source
(penultimate xs)
+Returns new table with function `f` applied to `data`'s values.

spork/misc/penultimate function source
(penultimate xs)
 
-Get the second-to-last element from an indexed data structure.
Community Examples

spork/misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
+Get the second-to-last element from an indexed data structure.

spork/misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
 
 Iterate through the rows of a data structure and print a table in a human
 readable way, with padding and heading information. Can optionally provide
@@ -390,310 +390,310 @@ 

Spork

for each row. Lastly, a `header-mapping` dictionary can be provided that changes the printed header names by mapping column keys to the desired header name. If no mapping is found, then the column key will be used as -the header name. Returns nil.
Community Examples

spork/misc/randomize-array function source
(randomize-array arr &opt rng)
+the header name. Returns nil.

spork/misc/randomize-array function source
(randomize-array arr &opt rng)
 
 Randomizes array using the fisher-yates shuffle, takes an optional random
-number generator.
Community Examples

spork/misc/second function source
(second xs)
+number generator.

spork/misc/second function source
(second xs)
 
-Get the second element from an indexed data structure.
Community Examples

spork/misc/select-keys function source
(select-keys data keyz)
+Get the second element from an indexed data structure.

spork/misc/select-keys function source
(select-keys data keyz)
 
-Returns new table with selected `keyz` from dictionary `data`.
Community Examples

spork/misc/set* macro source
(set* tgts exprs)
+Returns new table with selected `keyz` from dictionary `data`.

spork/misc/set* macro source
(set* tgts exprs)
 
 Parallel `set` function. Takes a list of targets and
 expressions, evaluates all the expressions, and then
 assigns them to the targets. Each target can be a variable
-or a 2-tuple, just like in the normal `set` special form.
Community Examples

spork/misc/string->int function source
(string->int str &opt base)
+or a 2-tuple, just like in the normal `set` special form.

spork/misc/string->int function source
(string->int str &opt base)
 
 Parse an integer in the given base. Defaults to decimal (base 10). Differs
-from scan-number in that this does not recognize floating point notation.
Community Examples

spork/misc/table-filter function source
(table-filter pred dict)
+from scan-number in that this does not recognize floating point notation.

spork/misc/table-filter function source
(table-filter pred dict)
 
 Filter a key-value structure info a table. Semantics are the same as for
 built-in `filter`, except that `pred` takes two arguments (key and value.)
-Does not consider prototypes.
Community Examples

spork/misc/third function source
(third xs)
+Does not consider prototypes.

spork/misc/third function source
(third xs)
 
-Get the third element from an indexed data structure.
Community Examples

spork/misc/trim-prefix function source
(trim-prefix prefix str)
+Get the third element from an indexed data structure.

spork/misc/trim-prefix function source
(trim-prefix prefix str)
 
-Trim the specified prefix of a string if it has one
Community Examples

spork/misc/trim-suffix function source
(trim-suffix suffix str)
+Trim the specified prefix of a string if it has one

spork/misc/trim-suffix function source
(trim-suffix suffix str)
 
-Trim the specified suffix of a string if it has one
Community Examples

spork/misc/until macro source
(until cnd & body)
+Trim the specified suffix of a string if it has one

spork/misc/until macro source
(until cnd & body)
 
 Repeat `body` while the `cnd` is false.
-Equivalent to (while (not cnd) ;body).
Community Examples

spork/misc/vars macro source
(vars & bindings)
+Equivalent to (while (not cnd) ;body).

spork/misc/vars macro source
(vars & bindings)
 
-Defines many variables as in let `bindings`, but without creating new scope.
Community Examples

spork/msg/make-proto function source
(make-proto stream &opt pack unpack)
+Defines many variables as in let `bindings`, but without creating new scope.

spork/msg/make-proto function source
(make-proto stream &opt pack unpack)
 
-Create both a send an recv function from a stream, as with `make-send` and `make-recv`.
Community Examples

spork/msg/make-recv function source
(make-recv stream &opt unpack)
+Create both a send an recv function from a stream, as with `make-send` and `make-recv`.

spork/msg/make-recv function source
(make-recv stream &opt unpack)
 
-Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.
Community Examples

spork/msg/make-send function source
(make-send stream &opt pack)
+Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.

spork/msg/make-send function source
(make-send stream &opt pack)
 
-Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Community Examples

spork/netrepl/client function source
(client &opt host port name)
+Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.

spork/netrepl/client function source
(client &opt host port name)
 
-Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".
Community Examples

spork/netrepl/default-host string source
Default host to run server on and connect to.
Community Examples

spork/netrepl/default-port string source
Default port to run the net repl.
Community Examples

spork/netrepl/server function source
(server &opt host port env cleanup welcome-msg)
+Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".

spork/netrepl/default-host string source
Default host to run server on and connect to.

spork/netrepl/default-port string source
Default port to run the net repl.

spork/netrepl/server function source
(server &opt host port env cleanup welcome-msg)
 
-Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.
Community Examples

spork/netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
+Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.

spork/netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
 
-Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Community Examples

spork/path/abspath function source
(posix/abspath path)
+Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.

spork/path/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

spork/path/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/basename function source
(posix/basename path)
+Check if a path is absolute.

spork/path/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/delim string source
Platform delimiter
Community Examples

spork/path/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

spork/path/delim string source
Platform delimiter

spork/path/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/join function source
(posix/join & els)
+Get the file extension for a path.

spork/path/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

spork/path/normalize function source
(posix/normalize path)
+Join path elements together.

spork/path/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/posix/abspath function source
(posix/abspath path)
+Split a path into its parts.

spork/path/posix/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/posix/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

spork/path/posix/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/posix/basename function source
(posix/basename path)
+Check if a path is absolute.

spork/path/posix/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/posix/delim string source
Platform delimiter
Community Examples

spork/path/posix/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

spork/path/posix/delim string source
Platform delimiter

spork/path/posix/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/posix/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/posix/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/posix/join function source
(posix/join & els)
+Get the file extension for a path.

spork/path/posix/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

spork/path/posix/normalize function source
(posix/normalize path)
+Join path elements together.

spork/path/posix/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/posix/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/posix/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/posix/relpath function source
(posix/relpath source target)
+Split a path into its parts.

spork/path/posix/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/posix/sep string source
Platform separator
Community Examples

spork/path/relpath function source
(posix/relpath source target)
+Get the relative path between two subpaths.

spork/path/posix/sep string source
Platform separator

spork/path/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/sep string source
Platform separator
Community Examples

spork/path/win32/abspath function source
(win32/abspath path)
+Get the relative path between two subpaths.

spork/path/sep string source
Platform separator

spork/path/win32/abspath function source
(win32/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/win32/abspath? function source
(win32/abspath? path)
+Coerce a path to be absolute.

spork/path/win32/abspath? function source
(win32/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/win32/basename function source
(win32/basename path)
+Check if a path is absolute.

spork/path/win32/basename function source
(win32/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/win32/delim string source
Platform delimiter
Community Examples

spork/path/win32/dirname function source
(win32/dirname path)
+Gets the base file name of a path.

spork/path/win32/delim string source
Platform delimiter

spork/path/win32/dirname function source
(win32/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/win32/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/win32/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/win32/join function source
(win32/join & els)
+Get the file extension for a path.

spork/path/win32/join function source
(win32/join & els)
 
-Join path elements together.
Community Examples

spork/path/win32/normalize function source
(win32/normalize path)
+Join path elements together.

spork/path/win32/normalize function source
(win32/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/win32/parts function source
(win32/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/win32/parts function source
(win32/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/win32/relpath function source
(win32/relpath source target)
+Split a path into its parts.

spork/path/win32/relpath function source
(win32/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/win32/sep string source
Platform separator
Community Examples

spork/rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
+Get the relative path between two subpaths.

spork/path/win32/sep string source
Platform separator

spork/rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
 
-Begin raw terminal functionality. Return a stream that can be read from to get input.
Community Examples

spork/rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
+Begin raw terminal functionality. Return a stream that can be read from to get input.

spork/rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
 
-Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.
Community Examples

spork/rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
+Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.

spork/rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
 
-A handler that a user can use to handle ctrl-z from input to suspend the current process.
Community Examples

spork/rawterm/end cfunction source
(rawterm/end)
+A handler that a user can use to handle ctrl-z from input to suspend the current process.

spork/rawterm/end cfunction source
(rawterm/end)
 
-End raw terminal functionality.
Community Examples

spork/rawterm/getch cfunction source
(rawterm/getch &opt into)
+End raw terminal functionality.

spork/rawterm/getch cfunction source
(rawterm/getch &opt into)
 
-Get a byte of input from stdin, without blocking if possible. Returns a buffer.
Community Examples

spork/rawterm/isatty cfunction source
(rawterm/isatty)
+Get a byte of input from stdin, without blocking if possible. Returns a buffer.

spork/rawterm/isatty cfunction source
(rawterm/isatty)
 
-Check if the current stdin is a tty.
Community Examples

spork/rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
+Check if the current stdin is a tty.

spork/rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
 
-Measure the monospace width of a string.
Community Examples

spork/rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
+Measure the monospace width of a string.

spork/rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
 
-Get the monospace width of a rune. Returns either 0, 1, or 2.
Community Examples

spork/rawterm/size cfunction source
(rawterm/size)
+Get the monospace width of a rune. Returns either 0, 1, or 2.

spork/rawterm/size cfunction source
(rawterm/size)
 
-Get the number of rows and columns visible in the terminal as tuple [rows cols]
Community Examples

spork/rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
+Get the number of rows and columns visible in the terminal as tuple [rows cols]

spork/rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
 
-Get a byte slice that will fit into a number of columns.
Community Examples

spork/regex/compile function source
(compile pattern)
+Get a byte slice that will fit into a number of columns.

spork/regex/compile function source
(compile pattern)
 
-Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.
Community Examples

spork/regex/find function source
(find reg text &opt start)
+Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.

spork/regex/find function source
(find reg text &opt start)
 
-Similar to peg/find, but for regexes.
Community Examples

spork/regex/find-all function source
(find-all reg text &opt start)
+Similar to peg/find, but for regexes.

spork/regex/find-all function source
(find-all reg text &opt start)
 
-Similar to peg/find-all, but for regexes.
Community Examples

spork/regex/match function source
(match reg text &opt start)
+Similar to peg/find-all, but for regexes.

spork/regex/match function source
(match reg text &opt start)
 
-Similar to peg/match, but for regexes.
Community Examples

spork/regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.
Community Examples

spork/regex/replace function source
(replace reg rep text &opt start)
+Similar to peg/match, but for regexes.

spork/regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.

spork/regex/replace function source
(replace reg rep text &opt start)
 
-Similar to peg/replace, but for regexes.
Community Examples

spork/regex/replace-all function source
(replace-all reg rep text &opt start)
+Similar to peg/replace, but for regexes.

spork/regex/replace-all function source
(replace-all reg rep text &opt start)
 
-Similar to peg/replace-all, but for regexes.
Community Examples

spork/regex/source function source
(source pattern)
+Similar to peg/replace-all, but for regexes.

spork/regex/source function source
(source pattern)
 
-Compile a subset of regex to PEG source code.
Community Examples

spork/rpc/client function source
(client &opt host port name)
+Compile a subset of regex to PEG source code.

spork/rpc/client function source
(client &opt host port name)
 
-Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.
Community Examples

spork/rpc/default-host string source
Default host to run server on and connect to.
Community Examples

spork/rpc/default-port string source
Default port to run the net repl.
Community Examples

spork/rpc/server function source
(server functions &opt host port workers-per-connection)
+Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.

spork/rpc/default-host string source
Default host to run server on and connect to.

spork/rpc/default-port string source
Default port to run the net repl.

spork/rpc/server function source
(server functions &opt host port workers-per-connection)
 
-Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Community Examples

spork/schema/make-predicate function source
(make-predicate schema)
+Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.

spork/schema/make-predicate function source
(make-predicate schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `predicate`.
Community Examples

spork/schema/make-validator function source
(make-validator schema)
+Generate a function that can be used to validate a data structure. This is the function form of `predicate`.

spork/schema/make-validator function source
(make-validator schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `validator`.
Community Examples

spork/schema/predicate macro source
(predicate pattern)
+Generate a function that can be used to validate a data structure. This is the function form of `validator`.

spork/schema/predicate macro source
(predicate pattern)
 
-Make a validation predicate given a certain schema.
Community Examples

spork/schema/validator macro source
(validator pattern)
+Make a validation predicate given a certain schema.

spork/schema/validator macro source
(validator pattern)
 
-Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Community Examples

spork/services/*current-manager* keyword source
The currently running service manager, if there is one
Community Examples

spork/services/*current-service* keyword source
The currently running service, if there is one
Community Examples

spork/services/add-service function source
(add-service service-name main-function & args)
+Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.

spork/services/*current-manager* keyword source
The currently running service manager, if there is one

spork/services/*current-service* keyword source
The currently running service, if there is one

spork/services/add-service function source
(add-service service-name main-function & args)
 
-Spawn a service
Community Examples

spork/services/all-services function source
(all-services)
+Spawn a service

spork/services/all-services function source
(all-services)
 
-Get a list of running services
Community Examples

spork/services/get-manager function source
(get-manager)
+Get a list of running services

spork/services/get-manager function source
(get-manager)
 
-Get the current manager. If no manager exists, create one.
Community Examples

spork/services/get-service function source
(get-service)
+Get the current manager. If no manager exists, create one.

spork/services/get-service function source
(get-service)
 
-Get the current service. If not in a service, raise an error
Community Examples

spork/services/make-manager function source
(make-manager &opt log-dir)
+Get the current service. If not in a service, raise an error

spork/services/make-manager function source
(make-manager &opt log-dir)
 
-Group a number of fibers into a single object for structured concurrency. Also includes utilities for running services like servers in the background.
Community Examples

spork/services/print-all function source
(print-all &opt filter-fn)
+Group a number of fibers into a single object for structured concurrency. Also includes utilities for running services like servers in the background.

spork/services/print-all function source
(print-all &opt filter-fn)
 
-Print a table of all running services.
Community Examples

spork/services/remove-service function source
(remove-service service-name)
+Print a table of all running services.

spork/services/remove-service function source
(remove-service service-name)
 
-Remove a service
Community Examples

spork/services/set-title function source
(set-title title)
+Remove a service

spork/services/set-title function source
(set-title title)
 
-Set a textual description of the service to describe what it is doing currently
Community Examples

spork/services/start-service function source
(start-service service-name)
+Set a textual description of the service to describe what it is doing currently

spork/services/start-service function source
(start-service service-name)
 
-Start or restart a service
Community Examples

spork/services/stop-service function source
(stop-service service-name &opt reason)
+Start or restart a service

spork/services/stop-service function source
(stop-service service-name &opt reason)
 
-Stop a running service
Community Examples

spork/services/wait function source
(wait)
+Stop a running service

spork/services/wait function source
(wait)
 
-Once a number of services have been spawned, call `wait` to block the fiber until the manager is canceled. This lets a manager fiber behave as a service itself.
Community Examples

spork/sh/copy function source
(copy src dest)
+Once a number of services have been spawned, call `wait` to block the fiber until the manager is canceled. This lets a manager fiber behave as a service itself.

spork/sh/copy function source
(copy src dest)
 
 Copy a file or directory recursively from one location to another.
-Expects input to be unix style paths
Community Examples

spork/sh/copy-file function source
(copy-file src-path dst-path)
+Expects input to be unix style paths

spork/sh/copy-file function source
(copy-file src-path dst-path)
 
-Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.
Community Examples

spork/sh/create-dirs function source
(create-dirs dir-path)
+Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.

spork/sh/create-dirs function source
(create-dirs dir-path)
 
-Create all directories in path specified as string including itself.
Community Examples

spork/sh/devnull function source
(devnull)
+Create all directories in path specified as string including itself.

spork/sh/devnull function source
(devnull)
 
-get the /dev/null equivalent of the current platform as an open file
Community Examples

spork/sh/escape function source
(escape & args)
+get the /dev/null equivalent of the current platform as an open file

spork/sh/escape function source
(escape & args)
 
-Output a string with all arguments correctly quoted
Community Examples

spork/sh/exec function source
(exec & args)
+Output a string with all arguments correctly quoted

spork/sh/exec function source
(exec & args)
 
-Execute command specified by args returning it's exit code
Community Examples

spork/sh/exec-fail function source
(exec-fail & args)
+Execute command specified by args returning it's exit code

spork/sh/exec-fail function source
(exec-fail & args)
 
-Execute command specified by args, fails when command exits with non-zero exit code
Community Examples

spork/sh/exec-slurp function source
(exec-slurp & args)
+Execute command specified by args, fails when command exits with non-zero exit code

spork/sh/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of command specified by args and return it trimmed in a string.
Community Examples

spork/sh/exec-slurp-all function source
(exec-slurp-all & args)
+Read stdout of command specified by args and return it trimmed in a string.

spork/sh/exec-slurp-all function source
(exec-slurp-all & args)
 
 Read stdout and stderr of subprocess and return it trimmed in a struct with :err and :out containing the output as string.
-This will also return the exit code under the :status key.
Community Examples

spork/sh/exists? function source
(exists? path)
+This will also return the exit code under the :status key.

spork/sh/exists? function source
(exists? path)
 
-Check if the given file or directory exists. (Follows symlinks)
Community Examples

spork/sh/list-all-files function source
(list-all-files dir &opt into)
+Check if the given file or directory exists. (Follows symlinks)

spork/sh/list-all-files function source
(list-all-files dir &opt into)
 
-List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.
Community Examples

spork/sh/make-new-file function source
(make-new-file file-path &opt mode)
+List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.

spork/sh/make-new-file function source
(make-new-file file-path &opt mode)
 
-Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).
Community Examples

spork/sh/rm function source
(rm path)
+Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).

spork/sh/rm function source
(rm path)
 
-Remove a directory and all sub directories recursively.
Community Examples

spork/sh/scan-directory function source
(scan-directory dir func)
+Remove a directory and all sub directories recursively.

spork/sh/scan-directory function source
(scan-directory dir func)
 
-Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.
Community Examples

spork/sh/split function source
(split s)
+Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.

spork/sh/split function source
(split s)
 
-Split a string into 'sh like' tokens, returns nil if unable to parse the string.
Community Examples

spork/tarray/buffer cfunction
(tarray/buffer array|size)
+Split a string into 'sh like' tokens, returns nil if unable to parse the string.

spork/tarray/buffer cfunction
(tarray/buffer array|size)
 
-Return typed array buffer or create a new buffer.
Community Examples

spork/tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
+Return typed array buffer or create a new buffer.

spork/tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
 
-Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.
Community Examples

spork/tarray/length cfunction
(tarray/length array|buffer)
+Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.

spork/tarray/length cfunction
(tarray/length array|buffer)
 
-Return typed array or buffer size.
Community Examples

spork/tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
+Return typed array or buffer size.

spork/tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
 
-Create new typed array.
Community Examples

spork/tarray/properties cfunction
(tarray/properties array)
+Create new typed array.

spork/tarray/properties cfunction
(tarray/properties array)
 
-Return typed array properties as a struct.
Community Examples

spork/tarray/slice cfunction
(tarray/slice tarr &opt start end)
+Return typed array properties as a struct.

spork/tarray/slice cfunction
(tarray/slice tarr &opt start end)
 
-Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.
Community Examples

spork/tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
+Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.

spork/tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
 
-Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Community Examples

spork/tasker/all-tasks function source
(all-tasks tasker &opt detailed)
+Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.

spork/tasker/all-tasks function source
(all-tasks tasker &opt detailed)
 
-Get an array of all task ids for which there is still data on disk. If `detailed` is truthy, return full task metadata instead of ids.
Community Examples

spork/tasker/cancel-task function source
(cancel-task tasker task-id)
+Get an array of all task ids for which there is still data on disk. If `detailed` is truthy, return full task metadata instead of ids.

spork/tasker/cancel-task function source
(cancel-task tasker task-id)
 
-Cancel a queued or running task.
Community Examples

spork/tasker/close-queues function source
(close-queues tasker)
+Cancel a queued or running task.

spork/tasker/close-queues function source
(close-queues tasker)
 
-Prevent any tasks from being added to queues. When an executor finishes it's current job, if there are any, it will terminate. When all executors complete, the call to `run-executors` will complete.
Community Examples

spork/tasker/default-expiration number source
Default expiration time (1 day)
Community Examples

spork/tasker/default-priority number source
Default task priority
Community Examples

spork/tasker/default-task-directory string source
Default location of task records
Community Examples

spork/tasker/err-file-name string source
Name of the file for logging errors
Community Examples

spork/tasker/max-priority number source
Maximum allowed priority (lower priority tasks will execute first)
Community Examples

spork/tasker/min-priority number source
Minimum allowed priority (lower priority tasks will execute first)
Community Examples

spork/tasker/new-tasker function source
(new-tasker &opt task-directory queues queue-size)
+Prevent any tasks from being added to queues. When an executor finishes it's current job, if there are any, it will terminate. When all executors complete, the call to `run-executors` will complete.

spork/tasker/default-expiration number source
Default expiration time (1 day)

spork/tasker/default-priority number source
Default task priority

spork/tasker/default-task-directory string source
Default location of task records

spork/tasker/err-file-name string source
Name of the file for logging errors

spork/tasker/max-priority number source
Maximum allowed priority (lower priority tasks will execute first)

spork/tasker/min-priority number source
Minimum allowed priority (lower priority tasks will execute first)

spork/tasker/new-tasker function source
(new-tasker &opt task-directory queues queue-size)
 
-Create queues and various settings to run tasks. Create a new tasker table.
Community Examples

spork/tasker/out-file-name string source
Name of the file for general logging
Community Examples

spork/tasker/queue-task function source
(queue-task tasker argv &opt note priority qname timeout expiration input)
+Create queues and various settings to run tasks. Create a new tasker table.

spork/tasker/out-file-name string source
Name of the file for general logging

spork/tasker/queue-task function source
(queue-task tasker argv &opt note priority qname timeout expiration input)
 
-Add a task specification to a queue. Supply an argv string array that will be used to invoke s a subprocess. The optional `note` parameter is just a textual note for task trackingv. The `priority` parameter should be an integer between 0 and 9 inclusive, default is 4. Lower priority jobs in the same queue will be executed by higher priority. Use input to pass in generic, unstructured input to a task.
Community Examples

spork/tasker/run-cleanup function source
(run-cleanup tasker)
+Add a task specification to a queue. Supply an argv string array that will be used to invoke s a subprocess. The optional `note` parameter is just a textual note for task trackingv. The `priority` parameter should be an integer between 0 and 9 inclusive, default is 4. Lower priority jobs in the same queue will be executed by higher priority. Use input to pass in generic, unstructured input to a task.

spork/tasker/run-cleanup function source
(run-cleanup tasker)
 
-Delete old expired jobs saved on disk
Community Examples

spork/tasker/run-executors function source
(run-executors tasker &opt workers-per-queue pre-task post-task)
+Delete old expired jobs saved on disk

spork/tasker/run-executors function source
(run-executors tasker &opt workers-per-queue pre-task post-task)
 
-Start a number of executors to run tasks as with `tasker/spawn-executors`, and then wait for all executors to complete.
Community Examples

spork/tasker/spawn-executors function source
(spawn-executors tasker &opt qnames workers-per-queue pre-task post-task)
+Start a number of executors to run tasks as with `tasker/spawn-executors`, and then wait for all executors to complete.

spork/tasker/spawn-executors function source
(spawn-executors tasker &opt qnames workers-per-queue pre-task post-task)
 
-Start a number of executors to run tasks. Tasks can be added to a queue by calling queue-task. A single tasker object can make multiple calls to spawn-executors.
Community Examples

spork/tasker/statuses tuple source
A tuple of all possible statuses that a task can have.
Community Examples

spork/tasker/task-file function source
(task-file tasker task-id &opt file-name)
+Start a number of executors to run tasks. Tasks can be added to a queue by calling queue-task. A single tasker object can make multiple calls to spawn-executors.

spork/tasker/statuses tuple source
A tuple of all possible statuses that a task can have.

spork/tasker/task-file function source
(task-file tasker task-id &opt file-name)
 
-Get a log file for a path. By default, will get a path to out.log.
Community Examples

spork/tasker/task-meta-name string source
Name of the task metadata file
Community Examples

spork/tasker/task-status function source
(task-status tasker task-id)
+Get a log file for a path. By default, will get a path to out.log.

spork/tasker/task-meta-name string source
Name of the task metadata file

spork/tasker/task-status function source
(task-status tasker task-id)
 
-Look up the status of a given task by id.
Community Examples

spork/temple/add-loader function source
(add-loader)
+Look up the status of a given task by id.

spork/temple/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

spork/temple/base-env table source
Base environment for rendering
Community Examples

spork/temple/compile function source
(compile str)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

spork/temple/base-env table source
Base environment for rendering

spork/temple/compile function source
(compile str)
 
 Compile a Temple template into a function which will return a
 rendered buffer.
 
 The resulting function should receive the template arguments in the
-&keys format.
Community Examples

spork/temple/create function source
(create source &opt where)
+&keys format.

spork/temple/create function source
(create source &opt where)
 
-Compile a template string into a function. Optionally provide a location where the source is from to improve debugging. Returns the template function.
Community Examples

spork/test/assert macro source
(assert x &opt e)
+Compile a template string into a function. Optionally provide a location where the source is from to improve debugging. Returns the template function.

spork/test/assert macro source
(assert x &opt e)
 
-Override's the default assert with some nice error handling.
Community Examples

spork/test/assert-docs function source
(assert-docs path)
+Override's the default assert with some nice error handling.

spork/test/assert-docs function source
(assert-docs path)
 
 Assert that all symbols, when module on the path is required,
-have proper doc string
Community Examples

spork/test/assert-error macro source
(assert-error msg & forms)
+have proper doc string

spork/test/assert-error macro source
(assert-error msg & forms)
 
-Test passes if forms error.
Community Examples

spork/test/assert-no-error macro source
(assert-no-error msg & forms)
+Test passes if forms error.

spork/test/assert-no-error macro source
(assert-no-error msg & forms)
 
-Test passes if forms do not error.
Community Examples

spork/test/assert-not macro source
(assert-not x &opt e)
+Test passes if forms do not error.

spork/test/assert-not macro source
(assert-not x &opt e)
 
-Invert assert.
Community Examples

spork/test/capture-stderr macro source
(capture-stderr & body)
+Invert assert.

spork/test/capture-stderr macro source
(capture-stderr & body)
 
 Runs the form and captures stderr. Returns tuple with result of the form
-and a string with captured stderr.
Community Examples

spork/test/capture-stdout macro source
(capture-stdout & body)
+and a string with captured stderr.

spork/test/capture-stdout macro source
(capture-stdout & body)
 
 Runs the form and captures stdout. Returns tuple with result of the form
-and a string with captured stdout.
Community Examples

spork/test/end-suite function source
(end-suite)
+and a string with captured stdout.

spork/test/end-suite function source
(end-suite)
 
-Ends test suite, prints summary and exits if any have failed.
Community Examples

spork/test/start-suite function source
(start-suite &opt name)
+Ends test suite, prints summary and exits if any have failed.

spork/test/start-suite function source
(start-suite &opt name)
 
-Starts test suite.
Community Examples

spork/test/suppress-stderr macro source
(suppress-stderr & body)
+Starts test suite.

spork/test/suppress-stderr macro source
(suppress-stderr & body)
 
-Suppreses stdout from the body
Community Examples

spork/test/suppress-stdout macro source
(suppress-stdout & body)
+Suppreses stdout from the body

spork/test/suppress-stdout macro source
(suppress-stdout & body)
 
-Suppreses stdout from the body
Community Examples

spork/test/timeit macro source
(timeit form &opt tag)
+Suppreses stdout from the body

spork/test/timeit macro source
(timeit form &opt tag)
 
 Time the execution of `form` using `os/clock` before and after,
 and print the result to stdout. returns: result of executing `form`.
-Uses `tag` (default "Elapsed time:") to tag the printout.
Community Examples

spork/utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
+Uses `tag` (default "Elapsed time:") to tag the printout.

spork/utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
 
-Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].
Community Examples

spork/utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
+Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].

spork/utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
 
-Encode a Unicode codepoint into the end of a buffer.
Community Examples

spork/utf8/prefix->width cfunction source
(utf8/prefix->width c)
+Encode a Unicode codepoint into the end of a buffer.

spork/utf8/prefix->width cfunction source
(utf8/prefix->width c)
 
-Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Community Examples

spork/zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
+Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.

spork/zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
 
-Add a byte sequence to the zip writer.
Community Examples

spork/zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
+Add a byte sequence to the zip writer.

spork/zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
 
-Add a file to the zip writer.
Community Examples

spork/zip/compress cfunction source
(zip/compress bytes &opt level into)
+Add a file to the zip writer.

spork/zip/compress cfunction source
(zip/compress bytes &opt level into)
 
-Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.
Community Examples

spork/zip/decompress cfunction source
(zip/decompress bytes &opt into)
+Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.

spork/zip/decompress cfunction source
(zip/decompress bytes &opt into)
 
-Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.
Community Examples

spork/zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
+Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.

spork/zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
 
-Extract a file from the zip archive, either to memory or to a file on disk.
Community Examples

spork/zip/file-directory? cfunction source
(zip/file-directory? reader idx)
+Extract a file from the zip archive, either to memory or to a file on disk.

spork/zip/file-directory? cfunction source
(zip/file-directory? reader idx)
 
-Check if a file index is a directory.
Community Examples

spork/zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
+Check if a file index is a directory.

spork/zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
 
-Check if a file is encrypted inside an archive.
Community Examples

spork/zip/file-supported? cfunction source
(zip/file-supported? reader idx)
+Check if a file is encrypted inside an archive.

spork/zip/file-supported? cfunction source
(zip/file-supported? reader idx)
 
-Check if a file is supported with this verstion of miniz.
Community Examples

spork/zip/get-filename cfunction source
(zip/get-filename reader idx)
+Check if a file is supported with this verstion of miniz.

spork/zip/get-filename cfunction source
(zip/get-filename reader idx)
 
-Convert a file index index in the archive to a filename.
Community Examples

spork/zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
+Convert a file index index in the archive to a filename.

spork/zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
 
-Get the index of a particular filename in the archive.
Community Examples

spork/zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
+Get the index of a particular filename in the archive.

spork/zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
 
-Read a byte sequence as a zip archive. Returns a new zip reader.
Community Examples

spork/zip/read-file cfunction source
(zip/read-file filename &opt flags)
+Read a byte sequence as a zip archive. Returns a new zip reader.

spork/zip/read-file cfunction source
(zip/read-file filename &opt flags)
 
-Read a file as a zip archive. Returns a new zip reader.
Community Examples

spork/zip/reader-close cfunction source
(zip/reader-close reader)
+Read a file as a zip archive. Returns a new zip reader.

spork/zip/reader-close cfunction source
(zip/reader-close reader)
 
-Close a reader and free related memory.
Community Examples

spork/zip/reader-count cfunction source
(zip/reader-count reader)
+Close a reader and free related memory.

spork/zip/reader-count cfunction source
(zip/reader-count reader)
 
-Get the number of files inside the zip archive. The files can be indexed 
Community Examples

spork/zip/stat cfunction source
(zip/stat reader idx)
+Get the number of files inside the zip archive. The files can be indexed 

spork/zip/stat cfunction source
(zip/stat reader idx)
 
 Get stat information of file. Returns a new struct with the following fields:
 
@@ -710,17 +710,17 @@ 

Spork

* :comment * :internal-attr * :external-attr -
Community Examples

spork/zip/version cfunction source
(zip/version)
+

spork/zip/version cfunction source
(zip/version)
 
-Get the version string of the underlying miniz library.
Community Examples

spork/zip/write-buffer cfunction source
(zip/write-buffer)
+Get the version string of the underlying miniz library.

spork/zip/write-buffer cfunction source
(zip/write-buffer)
 
-Create a new zip archive writer that write to memory.
Community Examples

spork/zip/write-file cfunction source
(zip/write-file dest-path)
+Create a new zip archive writer that write to memory.

spork/zip/write-file cfunction source
(zip/write-file dest-path)
 
-Create a new zip archive writer that will write into an archive file.
Community Examples

spork/zip/writer-close cfunction source
(zip/writer-close writer)
+Create a new zip archive writer that will write into an archive file.

spork/zip/writer-close cfunction source
(zip/writer-close writer)
 
-Close a ZipWriter.
Community Examples

spork/zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
+Close a ZipWriter.

spork/zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
 
-Finalize a writer, writing any zip files to disk. Return the writer.
Community Examples
+Finalize a writer, writing any zip files to disk. Return the writer.
Parser Module Argument Parsing diff --git a/static/1.28.0/api/spork/json.html b/static/1.28.0/api/spork/json.html index 6542cc38..ab9759f6 100644 --- a/static/1.28.0/api/spork/json.html +++ b/static/1.28.0/api/spork/json.html @@ -116,9 +116,9 @@

Index

json/decode json/encode


json/decode cfunction
(json/decode json-source &opt keywords nils)
 
-Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.
Community Examples

json/encode cfunction
(json/encode x &opt tab newline buf)
+Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.

json/encode cfunction
(json/encode x &opt tab newline buf)
 
-Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
Community Examples
+Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
HTTP Framework Math extended diff --git a/static/1.28.0/api/spork/math.html b/static/1.28.0/api/spork/math.html index fefdb0a3..19fc5888 100644 --- a/static/1.28.0/api/spork/math.html +++ b/static/1.28.0/api/spork/math.html @@ -117,144 +117,144 @@

Index

math/add math/add-to-mean math/approx-eq math/bernoulli-distribution math/binominal-coeficient math/binominal-distribution math/check-probability math/chi-squared-distribution-table math/cols math/cumulative-std-normal-probability math/det math/dot math/epsilon math/extent math/factorial math/geometric-mean math/get-only-el math/harmonic-mean math/ident math/interquartile-range math/linear-regression math/linear-regression-line math/median math/median-absolute-deviation math/minor math/mode math/mop math/mul math/perm math/permutation-test math/permutations math/poisson-distribution math/quantile math/quantile-rank math/quantile-rank-sorted math/quantile-sorted math/quickselect math/relative-err math/root-mean-square math/rows math/sample-correlation math/sample-covariance math/sample-skewness math/sample-standard-deviation math/sample-variance math/scalar math/shuffle-in-place math/size math/sop math/standard-deviation math/standard-normal-table math/sum-compensated math/sum-nth-power-deviations math/swap math/t-test math/t-test-2 math/trans math/variance math/z-score math/zero


math/add function source
(add m a)
 
 Add `a` to matrix `m` where it can be matrix or scalar.
-Matrix `m` is mutated.
Community Examples

math/add-to-mean function source
(add-to-mean m n v)
+Matrix `m` is mutated.

math/add-to-mean function source
(add-to-mean m n v)
 
-Adds new value `v` to mean `m` from `n` values.
Community Examples

math/approx-eq function source
(approx-eq a e &opt t)
+Adds new value `v` to mean `m` from `n` values.

math/approx-eq function source
(approx-eq a e &opt t)
 
 Approximate equality between actual number `a`
 and expected number `e`. Default tolerance `t`
-is `epsilon`.
Community Examples

math/bernoulli-distribution function source
(bernoulli-distribution p)
+is `epsilon`.

math/bernoulli-distribution function source
(bernoulli-distribution p)
 
-Creates Bernoulli distribution from popability `p` in the tuple.
Community Examples

math/binominal-coeficient function source
(binominal-coeficient n k)
+Creates Bernoulli distribution from popability `p` in the tuple.

math/binominal-coeficient function source
(binominal-coeficient n k)
 
 Computes binominal coeficient from set of size `n`
-and sample size `k`.
Community Examples

math/binominal-distribution function source
(binominal-distribution t p)
+and sample size `k`.

math/binominal-distribution function source
(binominal-distribution t p)
 
 Creates binominal distribution from trials `t`
-and probability `p` in the tuple.
Community Examples

math/check-probability function source
(check-probability p)
+and probability `p` in the tuple.

math/check-probability function source
(check-probability p)
 
-Asserts that probability in in the [0 1] range.
Community Examples

math/chi-squared-distribution-table struct source
Chi Squared distribution table.
Community Examples

math/cols function source
(cols m)
+Asserts that probability in in the [0 1] range.

math/chi-squared-distribution-table struct source
Chi Squared distribution table.

math/cols function source
(cols m)
 
-Returns numbers of columns of matrix `m`.
Community Examples

math/cumulative-std-normal-probability function source
(cumulative-std-normal-probability z)
+Returns numbers of columns of matrix `m`.

math/cumulative-std-normal-probability function source
(cumulative-std-normal-probability z)
 
-Computes standard normal probability for `y`.
Community Examples

math/det function source
(det m)
+Computes standard normal probability for `y`.

math/det function source
(det m)
 
-Computes determinant of matrix `m`.
Community Examples

math/dot function source
(dot mx my)
+Computes determinant of matrix `m`.

math/dot function source
(dot mx my)
 
-Computes dot product of matrices or vectors `x` and `y`.
Community Examples

math/epsilon number source
Epsilon constant
Community Examples

math/extent function source
(extent xs)
+Computes dot product of matrices or vectors `x` and `y`.

math/epsilon number source
Epsilon constant

math/extent function source
(extent xs)
 
-Returns the minimum & maximum number in an `xs` as tuple.
Community Examples

math/factorial function source
(factorial n)
+Returns the minimum & maximum number in an `xs` as tuple.

math/factorial function source
(factorial n)
 
-Returns factorial of `n`.
Community Examples

math/geometric-mean function source
(geometric-mean xs)
+Returns factorial of `n`.

math/geometric-mean function source
(geometric-mean xs)
 
-Gets the geometric mean from `xs`.
Community Examples

math/get-only-el macro source
(get-only-el m)
+Gets the geometric mean from `xs`.

math/get-only-el macro source
(get-only-el m)
 
 Convenience macro for geting first element
-from first row of the two dimensional array `m`.
Community Examples

math/harmonic-mean function source
(harmonic-mean xs)
+from first row of the two dimensional array `m`.

math/harmonic-mean function source
(harmonic-mean xs)
 
-Gets the harmonic mean from `xs`.
Community Examples

math/ident function source
(ident c)
+Gets the harmonic mean from `xs`.

math/ident function source
(ident c)
 
-Creates identity matrix with `c` x `c` size.
Community Examples

math/interquartile-range function source
(interquartile-range xs)
+Creates identity matrix with `c` x `c` size.

math/interquartile-range function source
(interquartile-range xs)
 
-Gets the interquartile range from `xs`.
Community Examples

math/linear-regression function source
(linear-regression coords)
+Gets the interquartile range from `xs`.

math/linear-regression function source
(linear-regression coords)
 
 Computes the slope `:m` and y-intercept `:b`
-of the function in the struct from set of coordinates.
Community Examples

math/linear-regression-line function source
(linear-regression-line {:m m :b b})
+of the function in the struct from set of coordinates.

math/linear-regression-line function source
(linear-regression-line {:m m :b b})
 
-Constructs function from struct returned by linear regression.
Community Examples

math/median function source
(median xs)
+Constructs function from struct returned by linear regression.

math/median function source
(median xs)
 
-Gets the median value from `xs`
Community Examples

math/median-absolute-deviation function source
(median-absolute-deviation xs)
+Gets the median value from `xs`

math/median-absolute-deviation function source
(median-absolute-deviation xs)
 
-Gets median absolute deviation from `xs`.
Community Examples

math/minor function source
(minor m x y)
+Gets median absolute deviation from `xs`.

math/minor function source
(minor m x y)
 
-Computes minor matrix of matrix `m` and `x`, `y`.
Community Examples

math/mode function source
(mode xs)
+Computes minor matrix of matrix `m` and `x`, `y`.

math/mode function source
(mode xs)
 
-Gets the mode value from `xs`.
Community Examples

math/mop function source
(mop m op a)
+Gets the mode value from `xs`.

math/mop function source
(mop m op a)
 
 Mutates every cell of the matrix `m` with `op`
-and corresponding cell from matrix arg `a`.
Community Examples

math/mul function source
(mul m a)
+and corresponding cell from matrix arg `a`.

math/mul function source
(mul m a)
 
 Multiply matrix `m` with `a` which can be matrix or vector.
-Matrix `m` is mutated.
Community Examples

math/perm function source
(perm m)
+Matrix `m` is mutated.

math/perm function source
(perm m)
 
-Computes permanent of the matrix `m`.
Community Examples

math/permutation-test function source
(permutation-test xs ys &opt a k)
+Computes permanent of the matrix `m`.

math/permutation-test function source
(permutation-test xs ys &opt a k)
 
 Conducts a permutation test to determine if two data sets
 `xs` and `ys` are *significantly* different from each other.
 You can use alternative hypotesis `a`, which defaults to `:two-side`,
 with `:greater` and `:lesser` being the other two options.
 The last optional argument is `k` number of values
-in permutation distribution
Community Examples

math/permutations function source
(permutations s &opt k)
+in permutation distribution

math/permutations function source
(permutations s &opt k)
 
-Returns permutations of length `k` from members of `s`
Community Examples

math/poisson-distribution function source
(poisson-distribution lambda)
+Returns permutations of length `k` from members of `s`

math/poisson-distribution function source
(poisson-distribution lambda)
 
-Creates Poisson distribution from `lambda` in tuple.
Community Examples

math/quantile function source
(quantile xs p)
+Creates Poisson distribution from `lambda` in tuple.

math/quantile function source
(quantile xs p)
 
-Gets the quantile value from `xs` at `p` from unsorted population.
Community Examples

math/quantile-rank function source
(quantile-rank xs p)
+Gets the quantile value from `xs` at `p` from unsorted population.

math/quantile-rank function source
(quantile-rank xs p)
 
-Gets the quantile rank of value `v` from unsorted `xs`.
Community Examples

math/quantile-rank-sorted function source
(quantile-rank-sorted xs v)
+Gets the quantile rank of value `v` from unsorted `xs`.

math/quantile-rank-sorted function source
(quantile-rank-sorted xs v)
 
-Gets the quantile rank of value `v` from sorted `xs`.
Community Examples

math/quantile-sorted function source
(quantile-sorted xs p)
+Gets the quantile rank of value `v` from sorted `xs`.

math/quantile-sorted function source
(quantile-sorted xs p)
 
-Gets the quantile value from `xs` at `p` from sorted population.
Community Examples

math/quickselect function source
(quickselect arr k &opt left right)
+Gets the quantile value from `xs` at `p` from sorted population.

math/quickselect function source
(quickselect arr k &opt left right)
 
 Rearrange items in `arr` so that all items in `[left, k]` range
 are the smallest.
 The `k`-th element will have the `(k - left + 1)`-th smallest value
 in `[left, right]`.
-Mutates `arr`.
Community Examples

math/relative-err function source
(relative-err a e)
+Mutates `arr`.

math/relative-err function source
(relative-err a e)
 
 Gets the relative err between actual number `a`
-and expected number `e`.
Community Examples

math/root-mean-square function source
(root-mean-square xs)
+and expected number `e`.

math/root-mean-square function source
(root-mean-square xs)
 
-Gets the root mean square from `xs`.
Community Examples

math/rows function source
(rows m)
+Gets the root mean square from `xs`.

math/rows function source
(rows m)
 
-Returns numbers of rows of matrix `m`.
Community Examples

math/sample-correlation function source
(sample-correlation xs ys)
+Returns numbers of rows of matrix `m`.

math/sample-correlation function source
(sample-correlation xs ys)
 
-Gets the sample correlation between `xs` and `ys`.
Community Examples

math/sample-covariance function source
(sample-covariance xs ys)
+Gets the sample correlation between `xs` and `ys`.

math/sample-covariance function source
(sample-covariance xs ys)
 
-Gets the sample covariance between `xs` and `ys`.
Community Examples

math/sample-skewness function source
(sample-skewness xs)
+Gets the sample covariance between `xs` and `ys`.

math/sample-skewness function source
(sample-skewness xs)
 
-Gets the sample skeweness from the `xs`.
Community Examples

math/sample-standard-deviation function source
(sample-standard-deviation xs)
+Gets the sample skeweness from the `xs`.

math/sample-standard-deviation function source
(sample-standard-deviation xs)
 
-Gets sample standard deviation from `xs`.
Community Examples

math/sample-variance function source
(sample-variance xs)
+Gets sample standard deviation from `xs`.

math/sample-variance function source
(sample-variance xs)
 
-Get the sample variance from `xs`.
Community Examples

math/scalar function source
(scalar c s)
+Get the sample variance from `xs`.

math/scalar function source
(scalar c s)
 
-Creates scalar `s` matrix with `c` x `c` size.
Community Examples

math/shuffle-in-place function source
(shuffle-in-place xs)
+Creates scalar `s` matrix with `c` x `c` size.

math/shuffle-in-place function source
(shuffle-in-place xs)
 
 Generate random permutation of the array `xs`
-which is shuffled in place.
Community Examples

math/size function source
(size m)
+which is shuffled in place.

math/size function source
(size m)
 
-Returns tuple with the matrix `m` size [rows cols].
Community Examples

math/sop function source
(sop m op & a)
+Returns tuple with the matrix `m` size [rows cols].

math/sop function source
(sop m op & a)
 
 Mutates every cell of the matrix `m` with `op`
-and variadic args `a`.
Community Examples

math/standard-deviation function source
(standard-deviation xs)
+and variadic args `a`.

math/standard-deviation function source
(standard-deviation xs)
 
-Gets the standard deviation from `ds`.
Community Examples

math/standard-normal-table tuple source
Computed standard normal table.
Community Examples

math/sum-compensated function source
(sum-compensated xs)
+Gets the standard deviation from `ds`.

math/standard-normal-table tuple source
Computed standard normal table.

math/sum-compensated function source
(sum-compensated xs)
 
-Returns sum of the members of `xs` with Kahan-Babushka algorithm.
Community Examples

math/sum-nth-power-deviations function source
(sum-nth-power-deviations xs n)
+Returns sum of the members of `xs` with Kahan-Babushka algorithm.

math/sum-nth-power-deviations function source
(sum-nth-power-deviations xs n)
 
-Get the sum of deviations to the n power.
Community Examples

math/swap function source
(swap arr i j)
+Get the sum of deviations to the n power.

math/swap function source
(swap arr i j)
 
 Swaps members with indices `i` and `j` of arr.
-Noop when `i` equals `j`.
Community Examples

math/t-test function source
(t-test xs expv)
+Noop when `i` equals `j`.

math/t-test function source
(t-test xs expv)
 
 Computes one sample t-test comparing the mean of `xs`
-to known value `expv`.
Community Examples

math/t-test-2 function source
(t-test-2 xs ys &opt d)
+to known value `expv`.

math/t-test-2 function source
(t-test-2 xs ys &opt d)
 
 Computes two sample t-test of two samples `xs` and `ys`
-with difference optional `d` which defaults to 0.
Community Examples

math/trans function source
(trans m)
+with difference optional `d` which defaults to 0.

math/trans function source
(trans m)
 
-Returns a new transposed matrix from `m`.
Community Examples

math/variance function source
(variance xs)
+Returns a new transposed matrix from `m`.

math/variance function source
(variance xs)
 
-Get the variance from the `xs`.
Community Examples

math/z-score function source
(z-score x m d)
+Get the variance from the `xs`.

math/z-score function source
(z-score x m d)
 
 Gets the standard score for number `x` from mean `m` 
-and standard deviation `d`.
Community Examples

math/zero function source
(zero c &opt r)
+and standard deviation `d`.

math/zero function source
(zero c &opt r)
 
 Creates vector of length `c`, or matrix if `r`
-is provided, and fills it with zeros.
Community Examples
+is provided, and fills it with zeros.

JSON Miscellaneous Functions diff --git a/static/1.28.0/api/spork/misc.html b/static/1.28.0/api/spork/misc.html index c6a06224..3a9ee950 100644 --- a/static/1.28.0/api/spork/misc.html +++ b/static/1.28.0/api/spork/misc.html @@ -116,81 +116,81 @@

Index

misc/always misc/antepenultimate misc/caperr misc/capout misc/cond-> misc/cond->> misc/dedent misc/defs misc/dfs misc/do-def misc/do-var misc/format-table misc/gett misc/insert-sorted misc/insert-sorted-by misc/int->string misc/int/ misc/log misc/make misc/make-id misc/map-keys misc/map-vals misc/penultimate misc/print-table misc/randomize-array misc/second misc/select-keys misc/set* misc/string->int misc/table-filter misc/third misc/trim-prefix misc/trim-suffix misc/until misc/vars


misc/always function source
(always x)
 
-Return a function that discards any arguments and always returns `x`.
Community Examples

misc/antepenultimate function source
(antepenultimate xs)
+Return a function that discards any arguments and always returns `x`.

misc/antepenultimate function source
(antepenultimate xs)
 
-Get the third-to-last element from an indexed data structure.
Community Examples

misc/caperr macro source
(caperr & body)
+Get the third-to-last element from an indexed data structure.

misc/caperr macro source
(caperr & body)
 
 Captures the standart error output of the variadic `body` and returns it
-as a buffer.
Community Examples

misc/capout macro source
(capout & body)
+as a buffer.

misc/capout macro source
(capout & body)
 
 Captures the standart output of the variadic `body` and returns it as
-a buffer.
Community Examples

misc/cond-> macro source
(cond-> val & clauses)
+a buffer.

misc/cond-> macro source
(cond-> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs with condition and operation to which the `val`,
 is put as first argument. All conditions are tried and
 for truthy conditions the operation is executed.
-Returns the value mutated if any condition is truthy.
Community Examples

misc/cond->> macro source
(cond->> val & clauses)
+Returns the value mutated if any condition is truthy.

misc/cond->> macro source
(cond->> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs of condition and operation to which the `val`,
 is put as last argument. All conditions are tried and
 for truthy the operation is ran.
-Returns mutated value if any condition is truthy.
Community Examples

misc/dedent function source
(dedent & xs)
+Returns mutated value if any condition is truthy.

misc/dedent function source
(dedent & xs)
 
 Remove indentation after concatenating the arguments. Works by removing
 leading whitespace, and then removing that same pattern of whitepsace after
-new lines.
Community Examples

misc/defs macro source
(defs & bindings)
+new lines.

misc/defs macro source
(defs & bindings)
 
-Defines many constants as in let `bindings`, but without creating new scope.
Community Examples

misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
+Defines many constants as in let `bindings`, but without creating new scope.

misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
 
 Do a depth first, pre-order traversal over a data structure.
 Also allow for callbacks before and after visiting the children
 of a node. Also allow for a custom `get-children` function to
 change traversal as needed. Will detect cycles if an empty table
 is passed as the `seen` parameter, which is used to cached values
-that have been visited.
Community Examples

misc/do-def macro source
(do-def c d & body)
+that have been visited.

misc/do-def macro source
(do-def c d & body)
 
 Convenience macro for defining constant named `c` with value `d` before `body`
 and returning it after evaluating `body`, that presumably modifies 
-the `c` refered content. For example buffer, table or array.
Community Examples

misc/do-var macro source
(do-var v d & body)
+the `c` refered content. For example buffer, table or array.

misc/do-var macro source
(do-var v d & body)
 
 Convenience macro for defining varible named `v` with value `d` before `body`
-and returning it after evaluating `body`, that presumably modifies `v`.
Community Examples

misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
+and returning it after evaluating `body`, that presumably modifies `v`.

misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
 
-Same as print-table but pushes table into a buffer.
Community Examples

misc/gett macro source
(gett ds & keys)
+Same as print-table but pushes table into a buffer.

misc/gett macro source
(gett ds & keys)
 
-Recursive macro (get). Similar to get-in, but keys are variadic argument.
Community Examples

misc/insert-sorted function source
(insert-sorted arr <? & xs)
+Recursive macro (get). Similar to get-in, but keys are variadic argument.

misc/insert-sorted function source
(insert-sorted arr <? & xs)
 
 Insert elements in `arr` such that it remains sorted by the comparator. If
-`arr` is not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
+`arr` is not sorted beforehand, the results are undefined. Returns `arr`.

misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
 
 Insert elements in `arr` such that it remains sorted by the value returned
 when `f` is called with the element, comparing the values with <. If `arr` is
-not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

misc/int->string function source
(int->string int &opt base)
+not sorted beforehand, the results are undefined. Returns `arr`.

misc/int->string function source
(int->string int &opt base)
 
-Stringify an integer in a particular base. Defaults to decimal (base 10).
Community Examples

misc/int/ function source
(int/ & xs)
+Stringify an integer in a particular base. Defaults to decimal (base 10).

misc/int/ function source
(int/ & xs)
 
-Perform integer division.
Community Examples

misc/log macro source
(log level & args)
+Perform integer division.

misc/log macro source
(log level & args)
 
 Print to a dynamic binding stream if that stream is set, otherwise do
 nothing. Evaluate to nil. 
 For example, `(log :err "value error: %V" my-value)` will print 
-to `(dyn :err)` only if `(dyn :err)` has been set.
Community Examples

misc/make macro source
(make prototype & pairs)
+to `(dyn :err)` only if `(dyn :err)` has been set.

misc/make macro source
(make prototype & pairs)
 
 Convenience macro for creating new table from even number of kvs pairs in a variadic `table-or-pairs`
 arguments and setting its prototype to `prototype`.
-Factory function for creating new objects from prototypes.
Community Examples

misc/make-id function source
(make-id &opt prefix)
+Factory function for creating new objects from prototypes.

misc/make-id function source
(make-id &opt prefix)
 
 Create a random, printable keyword id with 10 bytes of entropy
-with an optional prefix.
Community Examples

misc/map-keys function source
(map-keys f data)
+with an optional prefix.

misc/map-keys function source
(map-keys f data)
 
 Returns new table with function `f` applied to `data`'s
-keys recursively.
Community Examples

misc/map-vals function source
(map-vals f data)
+keys recursively.

misc/map-vals function source
(map-vals f data)
 
-Returns new table with function `f` applied to `data`'s values.
Community Examples

misc/penultimate function source
(penultimate xs)
+Returns new table with function `f` applied to `data`'s values.

misc/penultimate function source
(penultimate xs)
 
-Get the second-to-last element from an indexed data structure.
Community Examples

misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
+Get the second-to-last element from an indexed data structure.

misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
 
 Iterate through the rows of a data structure and print a table in a human
 readable way, with padding and heading information. Can optionally provide
@@ -198,37 +198,37 @@ 

Index for each row. Lastly, a `header-mapping` dictionary can be provided that changes the printed header names by mapping column keys to the desired header name. If no mapping is found, then the column key will be used as -the header name. Returns nil.

Community Examples

misc/randomize-array function source
(randomize-array arr &opt rng)
+the header name. Returns nil.

misc/randomize-array function source
(randomize-array arr &opt rng)
 
 Randomizes array using the fisher-yates shuffle, takes an optional random
-number generator.
Community Examples

misc/second function source
(second xs)
+number generator.

misc/second function source
(second xs)
 
-Get the second element from an indexed data structure.
Community Examples

misc/select-keys function source
(select-keys data keyz)
+Get the second element from an indexed data structure.

misc/select-keys function source
(select-keys data keyz)
 
-Returns new table with selected `keyz` from dictionary `data`.
Community Examples

misc/set* macro source
(set* tgts exprs)
+Returns new table with selected `keyz` from dictionary `data`.

misc/set* macro source
(set* tgts exprs)
 
 Parallel `set` function. Takes a list of targets and
 expressions, evaluates all the expressions, and then
 assigns them to the targets. Each target can be a variable
-or a 2-tuple, just like in the normal `set` special form.
Community Examples

misc/string->int function source
(string->int str &opt base)
+or a 2-tuple, just like in the normal `set` special form.

misc/string->int function source
(string->int str &opt base)
 
 Parse an integer in the given base. Defaults to decimal (base 10). Differs
-from scan-number in that this does not recognize floating point notation.
Community Examples

misc/table-filter function source
(table-filter pred dict)
+from scan-number in that this does not recognize floating point notation.

misc/table-filter function source
(table-filter pred dict)
 
 Filter a key-value structure info a table. Semantics are the same as for
 built-in `filter`, except that `pred` takes two arguments (key and value.)
-Does not consider prototypes.
Community Examples

misc/third function source
(third xs)
+Does not consider prototypes.

misc/third function source
(third xs)
 
-Get the third element from an indexed data structure.
Community Examples

misc/trim-prefix function source
(trim-prefix prefix str)
+Get the third element from an indexed data structure.

misc/trim-prefix function source
(trim-prefix prefix str)
 
-Trim the specified prefix of a string if it has one
Community Examples

misc/trim-suffix function source
(trim-suffix suffix str)
+Trim the specified prefix of a string if it has one

misc/trim-suffix function source
(trim-suffix suffix str)
 
-Trim the specified suffix of a string if it has one
Community Examples

misc/until macro source
(until cnd & body)
+Trim the specified suffix of a string if it has one

misc/until macro source
(until cnd & body)
 
 Repeat `body` while the `cnd` is false.
-Equivalent to (while (not cnd) ;body).
Community Examples

misc/vars macro source
(vars & bindings)
+Equivalent to (while (not cnd) ;body).

misc/vars macro source
(vars & bindings)
 
-Defines many variables as in let `bindings`, but without creating new scope.
Community Examples
+Defines many variables as in let `bindings`, but without creating new scope.
Math extended NetREPL diff --git a/static/1.28.0/api/spork/msg.html b/static/1.28.0/api/spork/msg.html index e254e91c..a103bbf1 100644 --- a/static/1.28.0/api/spork/msg.html +++ b/static/1.28.0/api/spork/msg.html @@ -116,11 +116,11 @@

Index

msg/make-proto msg/make-recv msg/make-send


msg/make-proto function source
(make-proto stream &opt pack unpack)
 
-Create both a send an recv function from a stream, as with `make-send` and `make-recv`.
Community Examples

msg/make-recv function source
(make-recv stream &opt unpack)
+Create both a send an recv function from a stream, as with `make-send` and `make-recv`.

msg/make-recv function source
(make-recv stream &opt unpack)
 
-Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.
Community Examples

msg/make-send function source
(make-send stream &opt pack)
+Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.

msg/make-send function source
(make-send stream &opt pack)
 
-Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Community Examples
+Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Shell Utilities Test diff --git a/static/1.28.0/api/spork/netrepl.html b/static/1.28.0/api/spork/netrepl.html index b856a7a4..29f5ce1a 100644 --- a/static/1.28.0/api/spork/netrepl.html +++ b/static/1.28.0/api/spork/netrepl.html @@ -116,11 +116,11 @@

Index

netrepl/client netrepl/default-host netrepl/default-port netrepl/server netrepl/server-single


netrepl/client function source
(client &opt host port name)
 
-Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".
Community Examples

netrepl/default-host string source
Default host to run server on and connect to.
Community Examples

netrepl/default-port string source
Default port to run the net repl.
Community Examples

netrepl/server function source
(server &opt host port env cleanup welcome-msg)
+Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".

netrepl/default-host string source
Default host to run server on and connect to.

netrepl/default-port string source
Default port to run the net repl.

netrepl/server function source
(server &opt host port env cleanup welcome-msg)
 
-Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.
Community Examples

netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
+Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.

netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
 
-Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Community Examples
+Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Miscellaneous Functions Path Utilities diff --git a/static/1.28.0/api/spork/path.html b/static/1.28.0/api/spork/path.html index 0b2daae6..7463a3fa 100644 --- a/static/1.28.0/api/spork/path.html +++ b/static/1.28.0/api/spork/path.html @@ -116,59 +116,59 @@

Index

path/abspath path/abspath? path/basename path/delim path/dirname path/ext path/join path/normalize path/parts path/posix/abspath path/posix/abspath? path/posix/basename path/posix/delim path/posix/dirname path/posix/ext path/posix/join path/posix/normalize path/posix/parts path/posix/relpath path/posix/sep path/relpath path/sep path/win32/abspath path/win32/abspath? path/win32/basename path/win32/delim path/win32/dirname path/win32/ext path/win32/join path/win32/normalize path/win32/parts path/win32/relpath path/win32/sep


path/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

path/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/basename function source
(posix/basename path)
+Check if a path is absolute.

path/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

path/delim string source
Platform delimiter
Community Examples

path/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

path/delim string source
Platform delimiter

path/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/ext function source
(ext path)
+Gets the directory name of a path.

path/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/join function source
(posix/join & els)
+Get the file extension for a path.

path/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

path/normalize function source
(posix/normalize path)
+Join path elements together.

path/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

path/posix/abspath function source
(posix/abspath path)
+Split a path into its parts.

path/posix/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/posix/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

path/posix/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/posix/basename function source
(posix/basename path)
+Check if a path is absolute.

path/posix/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

path/posix/delim string source
Platform delimiter
Community Examples

path/posix/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

path/posix/delim string source
Platform delimiter

path/posix/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/posix/ext function source
(ext path)
+Gets the directory name of a path.

path/posix/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/posix/join function source
(posix/join & els)
+Get the file extension for a path.

path/posix/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

path/posix/normalize function source
(posix/normalize path)
+Join path elements together.

path/posix/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/posix/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/posix/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

path/posix/relpath function source
(posix/relpath source target)
+Split a path into its parts.

path/posix/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/posix/sep string source
Platform separator
Community Examples

path/relpath function source
(posix/relpath source target)
+Get the relative path between two subpaths.

path/posix/sep string source
Platform separator

path/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/sep string source
Platform separator
Community Examples

path/win32/abspath function source
(win32/abspath path)
+Get the relative path between two subpaths.

path/sep string source
Platform separator

path/win32/abspath function source
(win32/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/win32/abspath? function source
(win32/abspath? path)
+Coerce a path to be absolute.

path/win32/abspath? function source
(win32/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/win32/basename function source
(win32/basename path)
+Check if a path is absolute.

path/win32/basename function source
(win32/basename path)
 
-Gets the base file name of a path.
Community Examples

path/win32/delim string source
Platform delimiter
Community Examples

path/win32/dirname function source
(win32/dirname path)
+Gets the base file name of a path.

path/win32/delim string source
Platform delimiter

path/win32/dirname function source
(win32/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/win32/ext function source
(ext path)
+Gets the directory name of a path.

path/win32/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/win32/join function source
(win32/join & els)
+Get the file extension for a path.

path/win32/join function source
(win32/join & els)
 
-Join path elements together.
Community Examples

path/win32/normalize function source
(win32/normalize path)
+Join path elements together.

path/win32/normalize function source
(win32/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/win32/parts function source
(win32/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/win32/parts function source
(win32/parts path)
 
-Split a path into its parts.
Community Examples

path/win32/relpath function source
(win32/relpath source target)
+Split a path into its parts.

path/win32/relpath function source
(win32/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/win32/sep string source
Platform separator
Community Examples
+Get the relative path between two subpaths.

path/win32/sep string source
Platform separator
NetREPL Raw Terminal Functionality diff --git a/static/1.28.0/api/spork/rawterm.html b/static/1.28.0/api/spork/rawterm.html index 28755c0d..d2a8582e 100644 --- a/static/1.28.0/api/spork/rawterm.html +++ b/static/1.28.0/api/spork/rawterm.html @@ -116,25 +116,25 @@

Index

rawterm/begin rawterm/buffer-traverse rawterm/ctrl-z rawterm/end rawterm/getch rawterm/isatty rawterm/monowidth rawterm/rune-monowidth rawterm/size rawterm/slice-monowidth


rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
 
-Begin raw terminal functionality. Return a stream that can be read from to get input.
Community Examples

rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
+Begin raw terminal functionality. Return a stream that can be read from to get input.

rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
 
-Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.
Community Examples

rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
+Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.

rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
 
-A handler that a user can use to handle ctrl-z from input to suspend the current process.
Community Examples

rawterm/end cfunction source
(rawterm/end)
+A handler that a user can use to handle ctrl-z from input to suspend the current process.

rawterm/end cfunction source
(rawterm/end)
 
-End raw terminal functionality.
Community Examples

rawterm/getch cfunction source
(rawterm/getch &opt into)
+End raw terminal functionality.

rawterm/getch cfunction source
(rawterm/getch &opt into)
 
-Get a byte of input from stdin, without blocking if possible. Returns a buffer.
Community Examples

rawterm/isatty cfunction source
(rawterm/isatty)
+Get a byte of input from stdin, without blocking if possible. Returns a buffer.

rawterm/isatty cfunction source
(rawterm/isatty)
 
-Check if the current stdin is a tty.
Community Examples

rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
+Check if the current stdin is a tty.

rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
 
-Measure the monospace width of a string.
Community Examples

rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
+Measure the monospace width of a string.

rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
 
-Get the monospace width of a rune. Returns either 0, 1, or 2.
Community Examples

rawterm/size cfunction source
(rawterm/size)
+Get the monospace width of a rune. Returns either 0, 1, or 2.

rawterm/size cfunction source
(rawterm/size)
 
-Get the number of rows and columns visible in the terminal as tuple [rows cols]
Community Examples

rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
+Get the number of rows and columns visible in the terminal as tuple [rows cols]

rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
 
-Get a byte slice that will fit into a number of columns.
Community Examples
+Get a byte slice that will fit into a number of columns.
Path Utilities Regular Expression PEG Syntax diff --git a/static/1.28.0/api/spork/regex.html b/static/1.28.0/api/spork/regex.html index 912a8056..0ad7570a 100644 --- a/static/1.28.0/api/spork/regex.html +++ b/static/1.28.0/api/spork/regex.html @@ -119,19 +119,19 @@

Index

regex/compile regex/find regex/find-all regex/match regex/peg regex/replace regex/replace-all regex/source


regex/compile function source
(compile pattern)
 
-Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.
Community Examples

regex/find function source
(find reg text &opt start)
+Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.

regex/find function source
(find reg text &opt start)
 
-Similar to peg/find, but for regexes.
Community Examples

regex/find-all function source
(find-all reg text &opt start)
+Similar to peg/find, but for regexes.

regex/find-all function source
(find-all reg text &opt start)
 
-Similar to peg/find-all, but for regexes.
Community Examples

regex/match function source
(match reg text &opt start)
+Similar to peg/find-all, but for regexes.

regex/match function source
(match reg text &opt start)
 
-Similar to peg/match, but for regexes.
Community Examples

regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.
Community Examples

regex/replace function source
(replace reg rep text &opt start)
+Similar to peg/match, but for regexes.

regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.

regex/replace function source
(replace reg rep text &opt start)
 
-Similar to peg/replace, but for regexes.
Community Examples

regex/replace-all function source
(replace-all reg rep text &opt start)
+Similar to peg/replace, but for regexes.

regex/replace-all function source
(replace-all reg rep text &opt start)
 
-Similar to peg/replace-all, but for regexes.
Community Examples

regex/source function source
(source pattern)
+Similar to peg/replace-all, but for regexes.

regex/source function source
(source pattern)
 
-Compile a subset of regex to PEG source code.
Community Examples
+Compile a subset of regex to PEG source code.
Raw Terminal Functionality Remote Procedure Calls diff --git a/static/1.28.0/api/spork/rpc.html b/static/1.28.0/api/spork/rpc.html index 67d60716..68105d8f 100644 --- a/static/1.28.0/api/spork/rpc.html +++ b/static/1.28.0/api/spork/rpc.html @@ -116,9 +116,9 @@

Index

rpc/client rpc/default-host rpc/default-port rpc/server


rpc/client function source
(client &opt host port name)
 
-Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.
Community Examples

rpc/default-host string source
Default host to run server on and connect to.
Community Examples

rpc/default-port string source
Default port to run the net repl.
Community Examples

rpc/server function source
(server functions &opt host port workers-per-connection)
+Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.

rpc/default-host string source
Default host to run server on and connect to.

rpc/default-port string source
Default port to run the net repl.

rpc/server function source
(server functions &opt host port workers-per-connection)
 
-Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Community Examples
+Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Regular Expression PEG Syntax Schema diff --git a/static/1.28.0/api/spork/schema.html b/static/1.28.0/api/spork/schema.html index 024c91e6..bc8d62a7 100644 --- a/static/1.28.0/api/spork/schema.html +++ b/static/1.28.0/api/spork/schema.html @@ -116,13 +116,13 @@

Index

schema/make-predicate schema/make-validator schema/predicate schema/validator


schema/make-predicate function source
(make-predicate schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `predicate`.
Community Examples

schema/make-validator function source
(make-validator schema)
+Generate a function that can be used to validate a data structure. This is the function form of `predicate`.

schema/make-validator function source
(make-validator schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `validator`.
Community Examples

schema/predicate macro source
(predicate pattern)
+Generate a function that can be used to validate a data structure. This is the function form of `validator`.

schema/predicate macro source
(predicate pattern)
 
-Make a validation predicate given a certain schema.
Community Examples

schema/validator macro source
(validator pattern)
+Make a validation predicate given a certain schema.

schema/validator macro source
(validator pattern)
 
-Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Community Examples
+Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Remote Procedure Calls Shell Utilities diff --git a/static/1.28.0/api/spork/sh.html b/static/1.28.0/api/spork/sh.html index c9c06db9..87180d59 100644 --- a/static/1.28.0/api/spork/sh.html +++ b/static/1.28.0/api/spork/sh.html @@ -117,36 +117,36 @@

Index

sh/copy sh/copy-file sh/create-dirs sh/devnull sh/escape sh/exec sh/exec-fail sh/exec-slurp sh/exec-slurp-all sh/exists? sh/list-all-files sh/make-new-file sh/rm sh/scan-directory sh/split


sh/copy function source
(copy src dest)
 
 Copy a file or directory recursively from one location to another.
-Expects input to be unix style paths
Community Examples

sh/copy-file function source
(copy-file src-path dst-path)
+Expects input to be unix style paths

sh/copy-file function source
(copy-file src-path dst-path)
 
-Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.
Community Examples

sh/create-dirs function source
(create-dirs dir-path)
+Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.

sh/create-dirs function source
(create-dirs dir-path)
 
-Create all directories in path specified as string including itself.
Community Examples

sh/devnull function source
(devnull)
+Create all directories in path specified as string including itself.

sh/devnull function source
(devnull)
 
-get the /dev/null equivalent of the current platform as an open file
Community Examples

sh/escape function source
(escape & args)
+get the /dev/null equivalent of the current platform as an open file

sh/escape function source
(escape & args)
 
-Output a string with all arguments correctly quoted
Community Examples

sh/exec function source
(exec & args)
+Output a string with all arguments correctly quoted

sh/exec function source
(exec & args)
 
-Execute command specified by args returning it's exit code
Community Examples

sh/exec-fail function source
(exec-fail & args)
+Execute command specified by args returning it's exit code

sh/exec-fail function source
(exec-fail & args)
 
-Execute command specified by args, fails when command exits with non-zero exit code
Community Examples

sh/exec-slurp function source
(exec-slurp & args)
+Execute command specified by args, fails when command exits with non-zero exit code

sh/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of command specified by args and return it trimmed in a string.
Community Examples

sh/exec-slurp-all function source
(exec-slurp-all & args)
+Read stdout of command specified by args and return it trimmed in a string.

sh/exec-slurp-all function source
(exec-slurp-all & args)
 
 Read stdout and stderr of subprocess and return it trimmed in a struct with :err and :out containing the output as string.
-This will also return the exit code under the :status key.
Community Examples

sh/exists? function source
(exists? path)
+This will also return the exit code under the :status key.

sh/exists? function source
(exists? path)
 
-Check if the given file or directory exists. (Follows symlinks)
Community Examples

sh/list-all-files function source
(list-all-files dir &opt into)
+Check if the given file or directory exists. (Follows symlinks)

sh/list-all-files function source
(list-all-files dir &opt into)
 
-List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.
Community Examples

sh/make-new-file function source
(make-new-file file-path &opt mode)
+List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.

sh/make-new-file function source
(make-new-file file-path &opt mode)
 
-Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).
Community Examples

sh/rm function source
(rm path)
+Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).

sh/rm function source
(rm path)
 
-Remove a directory and all sub directories recursively.
Community Examples

sh/scan-directory function source
(scan-directory dir func)
+Remove a directory and all sub directories recursively.

sh/scan-directory function source
(scan-directory dir func)
 
-Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.
Community Examples

sh/split function source
(split s)
+Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.

sh/split function source
(split s)
 
-Split a string into 'sh like' tokens, returns nil if unable to parse the string.
Community Examples
+Split a string into 'sh like' tokens, returns nil if unable to parse the string.

Schema Simple Messaging Protocol diff --git a/static/1.28.0/api/spork/tarray.html b/static/1.28.0/api/spork/tarray.html index 2bae7bc4..4b3cf848 100644 --- a/static/1.28.0/api/spork/tarray.html +++ b/static/1.28.0/api/spork/tarray.html @@ -116,19 +116,19 @@

Index

tarray/buffer tarray/copy-bytes tarray/length tarray/new tarray/properties tarray/slice tarray/swap-bytes


tarray/buffer cfunction
(tarray/buffer array|size)
 
-Return typed array buffer or create a new buffer.
Community Examples

tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
+Return typed array buffer or create a new buffer.

tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
 
-Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.
Community Examples

tarray/length cfunction
(tarray/length array|buffer)
+Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.

tarray/length cfunction
(tarray/length array|buffer)
 
-Return typed array or buffer size.
Community Examples

tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
+Return typed array or buffer size.

tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
 
-Create new typed array.
Community Examples

tarray/properties cfunction
(tarray/properties array)
+Create new typed array.

tarray/properties cfunction
(tarray/properties array)
 
-Return typed array properties as a struct.
Community Examples

tarray/slice cfunction
(tarray/slice tarr &opt start end)
+Return typed array properties as a struct.

tarray/slice cfunction
(tarray/slice tarr &opt start end)
 
-Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.
Community Examples

tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
+Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.

tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
 
-Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Community Examples
+Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Test Zip Files diff --git a/static/1.28.0/api/spork/test.html b/static/1.28.0/api/spork/test.html index 84453427..f1ccfc3c 100644 --- a/static/1.28.0/api/spork/test.html +++ b/static/1.28.0/api/spork/test.html @@ -116,34 +116,34 @@

Index

test/assert test/assert-docs test/assert-error test/assert-no-error test/assert-not test/capture-stderr test/capture-stdout test/end-suite test/start-suite test/suppress-stderr test/suppress-stdout test/timeit


test/assert macro source
(assert x &opt e)
 
-Override's the default assert with some nice error handling.
Community Examples

test/assert-docs function source
(assert-docs path)
+Override's the default assert with some nice error handling.

test/assert-docs function source
(assert-docs path)
 
 Assert that all symbols, when module on the path is required,
-have proper doc string
Community Examples

test/assert-error macro source
(assert-error msg & forms)
+have proper doc string

test/assert-error macro source
(assert-error msg & forms)
 
-Test passes if forms error.
Community Examples

test/assert-no-error macro source
(assert-no-error msg & forms)
+Test passes if forms error.

test/assert-no-error macro source
(assert-no-error msg & forms)
 
-Test passes if forms do not error.
Community Examples

test/assert-not macro source
(assert-not x &opt e)
+Test passes if forms do not error.

test/assert-not macro source
(assert-not x &opt e)
 
-Invert assert.
Community Examples

test/capture-stderr macro source
(capture-stderr & body)
+Invert assert.

test/capture-stderr macro source
(capture-stderr & body)
 
 Runs the form and captures stderr. Returns tuple with result of the form
-and a string with captured stderr.
Community Examples

test/capture-stdout macro source
(capture-stdout & body)
+and a string with captured stderr.

test/capture-stdout macro source
(capture-stdout & body)
 
 Runs the form and captures stdout. Returns tuple with result of the form
-and a string with captured stdout.
Community Examples

test/end-suite function source
(end-suite)
+and a string with captured stdout.

test/end-suite function source
(end-suite)
 
-Ends test suite, prints summary and exits if any have failed.
Community Examples

test/start-suite function source
(start-suite &opt name)
+Ends test suite, prints summary and exits if any have failed.

test/start-suite function source
(start-suite &opt name)
 
-Starts test suite.
Community Examples

test/suppress-stderr macro source
(suppress-stderr & body)
+Starts test suite.

test/suppress-stderr macro source
(suppress-stderr & body)
 
-Suppreses stdout from the body
Community Examples

test/suppress-stdout macro source
(suppress-stdout & body)
+Suppreses stdout from the body

test/suppress-stdout macro source
(suppress-stdout & body)
 
-Suppreses stdout from the body
Community Examples

test/timeit macro source
(timeit form &opt tag)
+Suppreses stdout from the body

test/timeit macro source
(timeit form &opt tag)
 
 Time the execution of `form` using `os/clock` before and after,
 and print the result to stdout. returns: result of executing `form`.
-Uses `tag` (default "Elapsed time:") to tag the printout.
Community Examples
+Uses `tag` (default "Elapsed time:") to tag the printout.
Simple Messaging Protocol Typed Arrays diff --git a/static/1.28.0/api/spork/zip.html b/static/1.28.0/api/spork/zip.html index 2bbd5a60..c100fe45 100644 --- a/static/1.28.0/api/spork/zip.html +++ b/static/1.28.0/api/spork/zip.html @@ -116,33 +116,33 @@

Index

zip/add-bytes zip/add-file zip/compress zip/decompress zip/extract zip/file-directory? zip/file-encrypted? zip/file-supported? zip/get-filename zip/locate-file zip/read-bytes zip/read-file zip/reader-close zip/reader-count zip/stat zip/version zip/write-buffer zip/write-file zip/writer-close zip/writer-finalize


zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
 
-Add a byte sequence to the zip writer.
Community Examples

zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
+Add a byte sequence to the zip writer.

zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
 
-Add a file to the zip writer.
Community Examples

zip/compress cfunction source
(zip/compress bytes &opt level into)
+Add a file to the zip writer.

zip/compress cfunction source
(zip/compress bytes &opt level into)
 
-Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.
Community Examples

zip/decompress cfunction source
(zip/decompress bytes &opt into)
+Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.

zip/decompress cfunction source
(zip/decompress bytes &opt into)
 
-Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.
Community Examples

zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
+Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.

zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
 
-Extract a file from the zip archive, either to memory or to a file on disk.
Community Examples

zip/file-directory? cfunction source
(zip/file-directory? reader idx)
+Extract a file from the zip archive, either to memory or to a file on disk.

zip/file-directory? cfunction source
(zip/file-directory? reader idx)
 
-Check if a file index is a directory.
Community Examples

zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
+Check if a file index is a directory.

zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
 
-Check if a file is encrypted inside an archive.
Community Examples

zip/file-supported? cfunction source
(zip/file-supported? reader idx)
+Check if a file is encrypted inside an archive.

zip/file-supported? cfunction source
(zip/file-supported? reader idx)
 
-Check if a file is supported with this verstion of miniz.
Community Examples

zip/get-filename cfunction source
(zip/get-filename reader idx)
+Check if a file is supported with this verstion of miniz.

zip/get-filename cfunction source
(zip/get-filename reader idx)
 
-Convert a file index index in the archive to a filename.
Community Examples

zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
+Convert a file index index in the archive to a filename.

zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
 
-Get the index of a particular filename in the archive.
Community Examples

zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
+Get the index of a particular filename in the archive.

zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
 
-Read a byte sequence as a zip archive. Returns a new zip reader.
Community Examples

zip/read-file cfunction source
(zip/read-file filename &opt flags)
+Read a byte sequence as a zip archive. Returns a new zip reader.

zip/read-file cfunction source
(zip/read-file filename &opt flags)
 
-Read a file as a zip archive. Returns a new zip reader.
Community Examples

zip/reader-close cfunction source
(zip/reader-close reader)
+Read a file as a zip archive. Returns a new zip reader.

zip/reader-close cfunction source
(zip/reader-close reader)
 
-Close a reader and free related memory.
Community Examples

zip/reader-count cfunction source
(zip/reader-count reader)
+Close a reader and free related memory.

zip/reader-count cfunction source
(zip/reader-count reader)
 
-Get the number of files inside the zip archive. The files can be indexed 
Community Examples

zip/stat cfunction source
(zip/stat reader idx)
+Get the number of files inside the zip archive. The files can be indexed 

zip/stat cfunction source
(zip/stat reader idx)
 
 Get stat information of file. Returns a new struct with the following fields:
 
@@ -159,17 +159,17 @@ 

Index * :comment * :internal-attr * :external-attr -

Community Examples

zip/version cfunction source
(zip/version)
+

zip/version cfunction source
(zip/version)
 
-Get the version string of the underlying miniz library.
Community Examples

zip/write-buffer cfunction source
(zip/write-buffer)
+Get the version string of the underlying miniz library.

zip/write-buffer cfunction source
(zip/write-buffer)
 
-Create a new zip archive writer that write to memory.
Community Examples

zip/write-file cfunction source
(zip/write-file dest-path)
+Create a new zip archive writer that write to memory.

zip/write-file cfunction source
(zip/write-file dest-path)
 
-Create a new zip archive writer that will write into an archive file.
Community Examples

zip/writer-close cfunction source
(zip/writer-close writer)
+Create a new zip archive writer that will write into an archive file.

zip/writer-close cfunction source
(zip/writer-close writer)
 
-Close a ZipWriter.
Community Examples

zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
+Close a ZipWriter.

zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
 
-Finalize a writer, writing any zip files to disk. Return the writer.
Community Examples
+Finalize a writer, writing any zip files to disk. Return the writer.
Typed Arrays String Module diff --git a/static/1.29.1/api/jpm/cc.html b/static/1.29.1/api/jpm/cc.html index f79ac313..e5ea78b7 100644 --- a/static/1.29.1/api/jpm/cc.html +++ b/static/1.29.1/api/jpm/cc.html @@ -118,35 +118,35 @@

Index

cc/archive-c cc/compile-c cc/create-buffer-c cc/create-buffer-c-impl cc/create-executable cc/embed-name cc/entry-name cc/entry-replace cc/link-c cc/make-bin-source cc/make-define cc/make-defines cc/modpath-to-meta cc/modpath-to-static cc/out-path


cc/archive-c function source
(archive-c opts target & objects)
 
-Link object files together to make a static library.
Community Examples

cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
+Link object files together to make a static library.

cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
 
-Compile a C file into an object file.
Community Examples

cc/create-buffer-c function source
(create-buffer-c source dest name)
+Compile a C file into an object file.

cc/create-buffer-c function source
(create-buffer-c source dest name)
 
-Inline raw byte file as a c file.
Community Examples

cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
+Inline raw byte file as a c file.

cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
 
-
Community Examples

cc/create-executable function source
(create-executable opts source dest no-core)
+

cc/create-executable function source
(create-executable opts source dest no-core)
 
-Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.
Community Examples

cc/embed-name function source
(embed-name path)
+Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.

cc/embed-name function source
(embed-name path)
 
-Rename a janet symbol for embedding.
Community Examples

cc/entry-name function source
(entry-name name)
+Rename a janet symbol for embedding.

cc/entry-name function source
(entry-name name)
 
-Name of symbol that enters static compilation of a module.
Community Examples

cc/entry-replace function source
(entry-replace name)
+Name of symbol that enters static compilation of a module.

cc/entry-replace function source
(entry-replace name)
 
-Escape special characters in the entry-name
Community Examples

cc/link-c function source
(link-c has-cpp opts target & objects)
+Escape special characters in the entry-name

cc/link-c function source
(link-c has-cpp opts target & objects)
 
-Link C or C++ object files together to make a native module.
Community Examples

cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
+Link C or C++ object files together to make a native module.

cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
 
-
Community Examples

cc/make-define function source
(make-define define value)
+

cc/make-define function source
(make-define define value)
 
-Generate strings for adding custom defines to the compiler.
Community Examples

cc/make-defines function source
(make-defines defines)
+Generate strings for adding custom defines to the compiler.

cc/make-defines function source
(make-defines defines)
 
-Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.
Community Examples

cc/modpath-to-meta function source
(modpath-to-meta path)
+Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.

cc/modpath-to-meta function source
(modpath-to-meta path)
 
-Get the meta file path (.meta.janet) corresponding to a native module path (.so).
Community Examples

cc/modpath-to-static function source
(modpath-to-static path)
+Get the meta file path (.meta.janet) corresponding to a native module path (.so).

cc/modpath-to-static function source
(modpath-to-static path)
 
-Get the static library (.a) path corresponding to a native module path (.so).
Community Examples

cc/out-path function source
(out-path path from-ext to-ext)
+Get the static library (.a) path corresponding to a native module path (.so).

cc/out-path function source
(out-path path from-ext to-ext)
 
-Take a source file path and convert it to an output path.
Community Examples
+Take a source file path and convert it to an output path.
Build Rules C Source Generation diff --git a/static/1.29.1/api/jpm/cgen.html b/static/1.29.1/api/jpm/cgen.html index bac86384..bce23079 100644 --- a/static/1.29.1/api/jpm/cgen.html +++ b/static/1.29.1/api/jpm/cgen.html @@ -118,13 +118,13 @@

Index

cgen/add-loader cgen/ir cgen/mangle cgen/print-ir


cgen/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

cgen/ir macro source
(ir & body)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

cgen/ir macro source
(ir & body)
 
-Macro that automatically quotes the body provided and calls (print-ir ...) on the body.
Community Examples

cgen/mangle function source
(mangle token)
+Macro that automatically quotes the body provided and calls (print-ir ...) on the body.

cgen/mangle function source
(mangle token)
 
-Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.
Community Examples

cgen/print-ir function source
(print-ir ir)
+Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.

cgen/print-ir function source
(print-ir ir)
 
-Compile the CGEN IR to C and print it to (dyn :out).
Community Examples
+Compile the CGEN IR to C and print it to (dyn :out).
C Compiler Command Line Interface diff --git a/static/1.29.1/api/jpm/cli.html b/static/1.29.1/api/jpm/cli.html index 3082050e..9e39089a 100644 --- a/static/1.29.1/api/jpm/cli.html +++ b/static/1.29.1/api/jpm/cli.html @@ -118,11 +118,11 @@

Index

cli/jpm cli/main cli/run cli/setup


cli/jpm macro source
(jpm & argv)
 
-A Macro User Interface for jpm to be used from a repl in a way similar to the command line.
Community Examples

cli/main function source
(main & argv)
+A Macro User Interface for jpm to be used from a repl in a way similar to the command line.

cli/main function source
(main & argv)
 
-Script entry.
Community Examples

cli/run function source
(run & args)
+Script entry.

cli/run function source
(run & args)
 
-Run CLI commands.
Community Examples

cli/setup function source
(setup args)
+Run CLI commands.

cli/setup function source
(setup args)
 
 Load configuration from the command line, environment variables, and
 configuration files. Returns array of non-configuration arguments as well.
@@ -130,7 +130,7 @@ 

Index 1. Commmand line settings 2. The value of `(dyn :jpm-config)` 3. Environment variables - 4. Config file settings (default-config if non specified)

Community Examples
+ 4. Config file settings (default-config if non specified)
C Source Generation Commands diff --git a/static/1.29.1/api/jpm/commands.html b/static/1.29.1/api/jpm/commands.html index fd34a9b3..0a7c8674 100644 --- a/static/1.29.1/api/jpm/commands.html +++ b/static/1.29.1/api/jpm/commands.html @@ -118,47 +118,47 @@

Index

commands/build commands/clean commands/configure commands/deps commands/enable-local-mode commands/help commands/install commands/jpm-debug-repl commands/list-installed commands/list-pkgs commands/list-rules commands/list-tasks commands/new-c-project commands/new-exe-project commands/new-project commands/quickbin commands/set-tree commands/show-paths commands/show-rule-tree commands/test commands/update-pkgs


commands/build function source
(build)
 
-
Community Examples

commands/clean function source
(clean)
+

commands/clean function source
(clean)
 
-
Community Examples

commands/configure function source
(configure &opt path)
+

commands/configure function source
(configure &opt path)
 
-Setup an out-of-tree build with certain configuration options.
Community Examples

commands/deps function source
(deps)
+Setup an out-of-tree build with certain configuration options.

commands/deps function source
(deps)
 
-
Community Examples

commands/enable-local-mode function source
(enable-local-mode)
+

commands/enable-local-mode function source
(enable-local-mode)
 
-Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/
Community Examples

commands/help function source
(help)
+Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/

commands/help function source
(help)
 
-
Community Examples

commands/install function source
(install & repo)
+

commands/install function source
(install & repo)
 
-
Community Examples

commands/jpm-debug-repl function source
(jpm-debug-repl)
+

commands/jpm-debug-repl function source
(jpm-debug-repl)
 
-
Community Examples

commands/list-installed function source
(list-installed)
+

commands/list-installed function source
(list-installed)
 
-
Community Examples

commands/list-pkgs function source
(list-pkgs &opt search)
+

commands/list-pkgs function source
(list-pkgs &opt search)
 
-
Community Examples

commands/list-rules function source
(list-rules &opt ctx)
+

commands/list-rules function source
(list-rules &opt ctx)
 
-
Community Examples

commands/list-tasks function source
(list-tasks &opt ctx)
+

commands/list-tasks function source
(list-tasks &opt ctx)
 
-
Community Examples

commands/new-c-project function source
(new-c-project name)
+

commands/new-c-project function source
(new-c-project name)
 
-Create a new C project
Community Examples

commands/new-exe-project function source
(new-exe-project name)
+Create a new C project

commands/new-exe-project function source
(new-exe-project name)
 
-Create a new executable project
Community Examples

commands/new-project function source
(new-project name)
+Create a new executable project

commands/new-project function source
(new-project name)
 
-Create a new project
Community Examples

commands/quickbin function source
(quickbin input output)
+Create a new project

commands/quickbin function source
(quickbin input output)
 
-
Community Examples

commands/set-tree function source
(set-tree tree)
+

commands/set-tree function source
(set-tree tree)
 
-Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.
Community Examples

commands/show-paths function source
(show-paths)
+Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.

commands/show-paths function source
(show-paths)
 
-
Community Examples

commands/show-rule-tree function source
(show-rule-tree &opt root depth)
+

commands/show-rule-tree function source
(show-rule-tree &opt root depth)
 
-
Community Examples

commands/test function source
(test)
+

commands/test function source
(test)
 
-
Community Examples

commands/update-pkgs function source
(update-pkgs)
+

commands/update-pkgs function source
(update-pkgs)
 
-
Community Examples
+
Command Line Interface Config diff --git a/static/1.29.1/api/jpm/config.html b/static/1.29.1/api/jpm/config.html index 27c65b66..f2c7f2b1 100644 --- a/static/1.29.1/api/jpm/config.html +++ b/static/1.29.1/api/jpm/config.html @@ -116,111 +116,111 @@

Config

Index

-

config/builtin-configs config/config-checkers config/config-docs config/config-options config/config-parsers config/config-set config/defconf config/dyn:ar config/dyn:auto-shebang config/dyn:binpath config/dyn:build-type config/dyn:buildpath config/dyn:c++ config/dyn:c++-link config/dyn:cc config/dyn:cc-link config/dyn:cflags config/dyn:cflags-verbose config/dyn:config-file config/dyn:cppflags config/dyn:curlpath config/dyn:dest-dir config/dyn:dynamic-cflags config/dyn:dynamic-lflags config/dyn:gitpath config/dyn:headerpath config/dyn:is-msvc config/dyn:janet config/dyn:janet-cflags config/dyn:janet-importlib config/dyn:janet-lflags config/dyn:ldflags config/dyn:lflags config/dyn:libpath config/dyn:local config/dyn:manpath config/dyn:modext config/dyn:modpath config/dyn:nocolor config/dyn:offline config/dyn:optimize config/dyn:pkglist config/dyn:silent config/dyn:statext config/dyn:tarpath config/dyn:test config/dyn:tree config/dyn:update-pkgs config/dyn:use-batch-shell config/dyn:verbose config/dyn:workers config/load-config config/load-config-file config/load-default config/load-options config/opt config/read-env-variables config/save-config config/shorthand-mapping


config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.
Community Examples

config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).
Community Examples

config/config-docs table source
Table of all of the help text for each config option.
Community Examples

config/config-options table source
A table of possible options for enum option types.
Community Examples

config/config-parsers table source
A table of all of the dynamic config bindings to parsers.
Community Examples

config/config-set table source
Listing of all config dyns.
Community Examples

config/defconf macro source
(defconf kw &opt parser docs options)
+

config/builtin-configs config/config-checkers config/config-docs config/config-options config/config-parsers config/config-set config/defconf config/dyn:ar config/dyn:auto-shebang config/dyn:binpath config/dyn:build-type config/dyn:buildpath config/dyn:c++ config/dyn:c++-link config/dyn:cc config/dyn:cc-link config/dyn:cflags config/dyn:cflags-verbose config/dyn:config-file config/dyn:cppflags config/dyn:curlpath config/dyn:dest-dir config/dyn:dynamic-cflags config/dyn:dynamic-lflags config/dyn:gitpath config/dyn:headerpath config/dyn:is-msvc config/dyn:janet config/dyn:janet-cflags config/dyn:janet-importlib config/dyn:janet-lflags config/dyn:ldflags config/dyn:lflags config/dyn:libpath config/dyn:local config/dyn:manpath config/dyn:modext config/dyn:modpath config/dyn:nocolor config/dyn:offline config/dyn:optimize config/dyn:pkglist config/dyn:silent config/dyn:statext config/dyn:tarpath config/dyn:test config/dyn:tree config/dyn:update-pkgs config/dyn:use-batch-shell config/dyn:verbose config/dyn:workers config/load-config config/load-config-file config/load-default config/load-options config/opt config/read-env-variables config/save-config config/shorthand-mapping


config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.

config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).

config/config-docs table source
Table of all of the help text for each config option.

config/config-options table source
A table of possible options for enum option types.

config/config-parsers table source
A table of all of the dynamic config bindings to parsers.

config/config-set table source
Listing of all config dyns.

config/defconf macro source
(defconf kw &opt parser docs options)
 
-Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.
Community Examples

config/dyn:ar function source
(dyn:ar &opt dflt)
+Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.

config/dyn:ar function source
(dyn:ar &opt dflt)
 
-
Community Examples

config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
+

config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
 
-
Community Examples

config/dyn:binpath function source
(dyn:binpath &opt dflt)
+

config/dyn:binpath function source
(dyn:binpath &opt dflt)
 
-
Community Examples

config/dyn:build-type function source
(dyn:build-type &opt dflt)
+

config/dyn:build-type function source
(dyn:build-type &opt dflt)
 
-
Community Examples

config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
+

config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
 
-
Community Examples

config/dyn:c++ function source
(dyn:c++ &opt dflt)
+

config/dyn:c++ function source
(dyn:c++ &opt dflt)
 
-
Community Examples

config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
+

config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
 
-
Community Examples

config/dyn:cc function source
(dyn:cc &opt dflt)
+

config/dyn:cc function source
(dyn:cc &opt dflt)
 
-
Community Examples

config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
+

config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
 
-
Community Examples

config/dyn:cflags function source
(dyn:cflags &opt dflt)
+

config/dyn:cflags function source
(dyn:cflags &opt dflt)
 
-
Community Examples

config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
+

config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
 
-
Community Examples

config/dyn:config-file function source
(dyn:config-file &opt dflt)
+

config/dyn:config-file function source
(dyn:config-file &opt dflt)
 
-
Community Examples

config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
+

config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
 
-
Community Examples

config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
+

config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
 
-
Community Examples

config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
+

config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
 
-
Community Examples

config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
+

config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
 
-
Community Examples

config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
+

config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
 
-
Community Examples

config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
+

config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
 
-
Community Examples

config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
+

config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
 
-
Community Examples

config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
+

config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
 
-
Community Examples

config/dyn:janet function source
(dyn:janet &opt dflt)
+

config/dyn:janet function source
(dyn:janet &opt dflt)
 
-
Community Examples

config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
+

config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
 
-
Community Examples

config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
+

config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
 
-
Community Examples

config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
+

config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
 
-
Community Examples

config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
+

config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
 
-
Community Examples

config/dyn:lflags function source
(dyn:lflags &opt dflt)
+

config/dyn:lflags function source
(dyn:lflags &opt dflt)
 
-
Community Examples

config/dyn:libpath function source
(dyn:libpath &opt dflt)
+

config/dyn:libpath function source
(dyn:libpath &opt dflt)
 
-
Community Examples

config/dyn:local function source
(dyn:local &opt dflt)
+

config/dyn:local function source
(dyn:local &opt dflt)
 
-
Community Examples

config/dyn:manpath function source
(dyn:manpath &opt dflt)
+

config/dyn:manpath function source
(dyn:manpath &opt dflt)
 
-
Community Examples

config/dyn:modext function source
(dyn:modext &opt dflt)
+

config/dyn:modext function source
(dyn:modext &opt dflt)
 
-
Community Examples

config/dyn:modpath function source
(dyn:modpath &opt dflt)
+

config/dyn:modpath function source
(dyn:modpath &opt dflt)
 
-
Community Examples

config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
+

config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
 
-
Community Examples

config/dyn:offline function source
(dyn:offline &opt dflt)
+

config/dyn:offline function source
(dyn:offline &opt dflt)
 
-
Community Examples

config/dyn:optimize function source
(dyn:optimize &opt dflt)
+

config/dyn:optimize function source
(dyn:optimize &opt dflt)
 
-
Community Examples

config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
+

config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
 
-
Community Examples

config/dyn:silent function source
(dyn:silent &opt dflt)
+

config/dyn:silent function source
(dyn:silent &opt dflt)
 
-
Community Examples

config/dyn:statext function source
(dyn:statext &opt dflt)
+

config/dyn:statext function source
(dyn:statext &opt dflt)
 
-
Community Examples

config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
+

config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
 
-
Community Examples

config/dyn:test function source
(dyn:test &opt dflt)
+

config/dyn:test function source
(dyn:test &opt dflt)
 
-
Community Examples

config/dyn:tree function source
(dyn:tree &opt dflt)
+

config/dyn:tree function source
(dyn:tree &opt dflt)
 
-
Community Examples

config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
+

config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
 
-
Community Examples

config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
+

config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
 
-
Community Examples

config/dyn:verbose function source
(dyn:verbose &opt dflt)
+

config/dyn:verbose function source
(dyn:verbose &opt dflt)
 
-
Community Examples

config/dyn:workers function source
(dyn:workers &opt dflt)
+

config/dyn:workers function source
(dyn:workers &opt dflt)
 
-
Community Examples

config/load-config function source
(load-config settings &opt override)
+

config/load-config function source
(load-config settings &opt override)
 
-Load a configuration from a table or struct.
Community Examples

config/load-config-file function source
(load-config-file path &opt override)
+Load a configuration from a table or struct.

config/load-config-file function source
(load-config-file path &opt override)
 
-Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.
Community Examples

config/load-default function source
(load-default &opt override)
+Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.

config/load-default function source
(load-default &opt override)
 
-Load the default configuration.
Community Examples

config/load-options function source
(load-options &opt path)
+Load the default configuration.

config/load-options function source
(load-options &opt path)
 
-Load a file that contains config options that can be set. If no such file exists, then do nothing.
Community Examples

config/opt function source
(opt opts key &opt dflt)
+Load a file that contains config options that can be set. If no such file exists, then do nothing.

config/opt function source
(opt opts key &opt dflt)
 
-Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.
Community Examples

config/read-env-variables function source
(read-env-variables)
+Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.

config/read-env-variables function source
(read-env-variables)
 
-Read environment variables that correspond to config variables into dyns.
Community Examples

config/save-config function source
(save-config path)
+Read environment variables that correspond to config variables into dyns.

config/save-config function source
(save-config path)
 
-Write the current configuration information to a file.
Community Examples

config/shorthand-mapping struct source
Map some single characters to long options.
Community Examples
+Write the current configuration information to a file.

config/shorthand-mapping struct source
Map some single characters to long options.
Commands Configuration Generation diff --git a/static/1.29.1/api/jpm/dagbuild.html b/static/1.29.1/api/jpm/dagbuild.html index 8458fb66..cd40061e 100644 --- a/static/1.29.1/api/jpm/dagbuild.html +++ b/static/1.29.1/api/jpm/dagbuild.html @@ -118,9 +118,9 @@

Index

dagbuild/pdag dagbuild/pmap


dagbuild/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.
Community Examples

dagbuild/pmap function source
(pmap f data)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.

dagbuild/pmap function source
(pmap f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Community Examples
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Configuration Generation Project Management diff --git a/static/1.29.1/api/jpm/index.html b/static/1.29.1/api/jpm/index.html index b7777ceb..e35b8474 100644 --- a/static/1.29.1/api/jpm/index.html +++ b/static/1.29.1/api/jpm/index.html @@ -118,319 +118,319 @@

Index

jpm/cc/archive-c jpm/cc/compile-c jpm/cc/create-buffer-c jpm/cc/create-buffer-c-impl jpm/cc/create-executable jpm/cc/embed-name jpm/cc/entry-name jpm/cc/entry-replace jpm/cc/link-c jpm/cc/make-bin-source jpm/cc/make-define jpm/cc/make-defines jpm/cc/modpath-to-meta jpm/cc/modpath-to-static jpm/cc/out-path jpm/cgen/add-loader jpm/cgen/ir jpm/cgen/mangle jpm/cgen/print-ir jpm/commands/build jpm/commands/clean jpm/commands/configure jpm/commands/deps jpm/commands/enable-local-mode jpm/commands/help jpm/commands/install jpm/commands/jpm-debug-repl jpm/commands/list-installed jpm/commands/list-pkgs jpm/commands/list-rules jpm/commands/list-tasks jpm/commands/new-c-project jpm/commands/new-exe-project jpm/commands/new-project jpm/commands/quickbin jpm/commands/set-tree jpm/commands/show-paths jpm/commands/show-rule-tree jpm/commands/test jpm/commands/update-pkgs jpm/config/builtin-configs jpm/config/config-checkers jpm/config/config-docs jpm/config/config-options jpm/config/config-parsers jpm/config/config-set jpm/config/defconf jpm/config/dyn:ar jpm/config/dyn:auto-shebang jpm/config/dyn:binpath jpm/config/dyn:build-type jpm/config/dyn:buildpath jpm/config/dyn:c++ jpm/config/dyn:c++-link jpm/config/dyn:cc jpm/config/dyn:cc-link jpm/config/dyn:cflags jpm/config/dyn:cflags-verbose jpm/config/dyn:config-file jpm/config/dyn:cppflags jpm/config/dyn:curlpath jpm/config/dyn:dest-dir jpm/config/dyn:dynamic-cflags jpm/config/dyn:dynamic-lflags jpm/config/dyn:gitpath jpm/config/dyn:headerpath jpm/config/dyn:is-msvc jpm/config/dyn:janet jpm/config/dyn:janet-cflags jpm/config/dyn:janet-importlib jpm/config/dyn:janet-lflags jpm/config/dyn:ldflags jpm/config/dyn:lflags jpm/config/dyn:libpath jpm/config/dyn:local jpm/config/dyn:manpath jpm/config/dyn:modext jpm/config/dyn:modpath jpm/config/dyn:nocolor jpm/config/dyn:offline jpm/config/dyn:optimize jpm/config/dyn:pkglist jpm/config/dyn:silent jpm/config/dyn:statext jpm/config/dyn:tarpath jpm/config/dyn:test jpm/config/dyn:tree jpm/config/dyn:update-pkgs jpm/config/dyn:use-batch-shell jpm/config/dyn:verbose jpm/config/dyn:workers jpm/config/load-config jpm/config/load-config-file jpm/config/load-default jpm/config/load-options jpm/config/opt jpm/config/read-env-variables jpm/config/save-config jpm/config/shorthand-mapping jpm/dagbuild/pdag jpm/dagbuild/pmap jpm/make-config/auto jpm/make-config/generate-config jpm/pm/bundle-install jpm/pm/curl jpm/pm/do-rule jpm/pm/download-bundle jpm/pm/download-git-bundle jpm/pm/download-tar-bundle jpm/pm/git jpm/pm/import-rules jpm/pm/load-lockfile jpm/pm/load-project-meta jpm/pm/make-jpm-env jpm/pm/make-lockfile jpm/pm/out-of-tree-config jpm/pm/post-deps jpm/pm/require-jpm jpm/pm/resolve-bundle jpm/pm/tar jpm/pm/update-git-bundle jpm/pm/update-installed jpm/rules/add-body jpm/rules/add-dep jpm/rules/add-input jpm/rules/add-output jpm/rules/add-thunk jpm/rules/build-rules jpm/rules/getrules jpm/rules/phony jpm/rules/rule jpm/rules/sh-phony jpm/rules/sh-rule jpm/rules/sh-task jpm/rules/task jpm/scaffold/scaffold-project jpm/shutil/abspath jpm/shutil/basename jpm/shutil/clear-cache jpm/shutil/clear-manifest jpm/shutil/clexe-shell jpm/shutil/copy jpm/shutil/copyfile jpm/shutil/create-dirs jpm/shutil/devnull jpm/shutil/dirname jpm/shutil/do-monkeypatch jpm/shutil/drop1-shell jpm/shutil/exec-slurp jpm/shutil/filepath-replace jpm/shutil/find-build-dir jpm/shutil/find-cache jpm/shutil/find-manifest jpm/shutil/find-manifest-dir jpm/shutil/is-mingw jpm/shutil/is-win jpm/shutil/is-win-or-mingw jpm/shutil/path-splitter jpm/shutil/rimraf jpm/shutil/rm jpm/shutil/run-patched jpm/shutil/run-repl jpm/shutil/run-script jpm/shutil/shell jpm/shutil/undo-monkeypatch


jpm/cc/archive-c function source
(archive-c opts target & objects)
 
-Link object files together to make a static library.
Community Examples

jpm/cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
+Link object files together to make a static library.

jpm/cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
 
-Compile a C file into an object file.
Community Examples

jpm/cc/create-buffer-c function source
(create-buffer-c source dest name)
+Compile a C file into an object file.

jpm/cc/create-buffer-c function source
(create-buffer-c source dest name)
 
-Inline raw byte file as a c file.
Community Examples

jpm/cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
+Inline raw byte file as a c file.

jpm/cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
 
-
Community Examples

jpm/cc/create-executable function source
(create-executable opts source dest no-core)
+

jpm/cc/create-executable function source
(create-executable opts source dest no-core)
 
-Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.
Community Examples

jpm/cc/embed-name function source
(embed-name path)
+Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.

jpm/cc/embed-name function source
(embed-name path)
 
-Rename a janet symbol for embedding.
Community Examples

jpm/cc/entry-name function source
(entry-name name)
+Rename a janet symbol for embedding.

jpm/cc/entry-name function source
(entry-name name)
 
-Name of symbol that enters static compilation of a module.
Community Examples

jpm/cc/entry-replace function source
(entry-replace name)
+Name of symbol that enters static compilation of a module.

jpm/cc/entry-replace function source
(entry-replace name)
 
-Escape special characters in the entry-name
Community Examples

jpm/cc/link-c function source
(link-c has-cpp opts target & objects)
+Escape special characters in the entry-name

jpm/cc/link-c function source
(link-c has-cpp opts target & objects)
 
-Link C or C++ object files together to make a native module.
Community Examples

jpm/cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
+Link C or C++ object files together to make a native module.

jpm/cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
 
-
Community Examples

jpm/cc/make-define function source
(make-define define value)
+

jpm/cc/make-define function source
(make-define define value)
 
-Generate strings for adding custom defines to the compiler.
Community Examples

jpm/cc/make-defines function source
(make-defines defines)
+Generate strings for adding custom defines to the compiler.

jpm/cc/make-defines function source
(make-defines defines)
 
-Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.
Community Examples

jpm/cc/modpath-to-meta function source
(modpath-to-meta path)
+Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.

jpm/cc/modpath-to-meta function source
(modpath-to-meta path)
 
-Get the meta file path (.meta.janet) corresponding to a native module path (.so).
Community Examples

jpm/cc/modpath-to-static function source
(modpath-to-static path)
+Get the meta file path (.meta.janet) corresponding to a native module path (.so).

jpm/cc/modpath-to-static function source
(modpath-to-static path)
 
-Get the static library (.a) path corresponding to a native module path (.so).
Community Examples

jpm/cc/out-path function source
(out-path path from-ext to-ext)
+Get the static library (.a) path corresponding to a native module path (.so).

jpm/cc/out-path function source
(out-path path from-ext to-ext)
 
-Take a source file path and convert it to an output path.
Community Examples

jpm/cgen/add-loader function source
(add-loader)
+Take a source file path and convert it to an output path.

jpm/cgen/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

jpm/cgen/ir macro source
(ir & body)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

jpm/cgen/ir macro source
(ir & body)
 
-Macro that automatically quotes the body provided and calls (print-ir ...) on the body.
Community Examples

jpm/cgen/mangle function source
(mangle token)
+Macro that automatically quotes the body provided and calls (print-ir ...) on the body.

jpm/cgen/mangle function source
(mangle token)
 
-Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.
Community Examples

jpm/cgen/print-ir function source
(print-ir ir)
+Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.

jpm/cgen/print-ir function source
(print-ir ir)
 
-Compile the CGEN IR to C and print it to (dyn :out).
Community Examples

jpm/commands/build function source
(build)
+Compile the CGEN IR to C and print it to (dyn :out).

jpm/commands/build function source
(build)
 
-
Community Examples

jpm/commands/clean function source
(clean)
+

jpm/commands/clean function source
(clean)
 
-
Community Examples

jpm/commands/configure function source
(configure &opt path)
+

jpm/commands/configure function source
(configure &opt path)
 
-Setup an out-of-tree build with certain configuration options.
Community Examples

jpm/commands/deps function source
(deps)
+Setup an out-of-tree build with certain configuration options.

jpm/commands/deps function source
(deps)
 
-
Community Examples

jpm/commands/enable-local-mode function source
(enable-local-mode)
+

jpm/commands/enable-local-mode function source
(enable-local-mode)
 
-Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/
Community Examples

jpm/commands/help function source
(help)
+Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/

jpm/commands/help function source
(help)
 
-
Community Examples

jpm/commands/install function source
(install & repo)
+

jpm/commands/install function source
(install & repo)
 
-
Community Examples

jpm/commands/jpm-debug-repl function source
(jpm-debug-repl)
+

jpm/commands/jpm-debug-repl function source
(jpm-debug-repl)
 
-
Community Examples

jpm/commands/list-installed function source
(list-installed)
+

jpm/commands/list-installed function source
(list-installed)
 
-
Community Examples

jpm/commands/list-pkgs function source
(list-pkgs &opt search)
+

jpm/commands/list-pkgs function source
(list-pkgs &opt search)
 
-
Community Examples

jpm/commands/list-rules function source
(list-rules &opt ctx)
+

jpm/commands/list-rules function source
(list-rules &opt ctx)
 
-
Community Examples

jpm/commands/list-tasks function source
(list-tasks &opt ctx)
+

jpm/commands/list-tasks function source
(list-tasks &opt ctx)
 
-
Community Examples

jpm/commands/new-c-project function source
(new-c-project name)
+

jpm/commands/new-c-project function source
(new-c-project name)
 
-Create a new C project
Community Examples

jpm/commands/new-exe-project function source
(new-exe-project name)
+Create a new C project

jpm/commands/new-exe-project function source
(new-exe-project name)
 
-Create a new executable project
Community Examples

jpm/commands/new-project function source
(new-project name)
+Create a new executable project

jpm/commands/new-project function source
(new-project name)
 
-Create a new project
Community Examples

jpm/commands/quickbin function source
(quickbin input output)
+Create a new project

jpm/commands/quickbin function source
(quickbin input output)
 
-
Community Examples

jpm/commands/set-tree function source
(set-tree tree)
+

jpm/commands/set-tree function source
(set-tree tree)
 
-Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.
Community Examples

jpm/commands/show-paths function source
(show-paths)
+Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.

jpm/commands/show-paths function source
(show-paths)
 
-
Community Examples

jpm/commands/show-rule-tree function source
(show-rule-tree &opt root depth)
+

jpm/commands/show-rule-tree function source
(show-rule-tree &opt root depth)
 
-
Community Examples

jpm/commands/test function source
(test)
+

jpm/commands/test function source
(test)
 
-
Community Examples

jpm/commands/update-pkgs function source
(update-pkgs)
+

jpm/commands/update-pkgs function source
(update-pkgs)
 
-
Community Examples

jpm/config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.
Community Examples

jpm/config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).
Community Examples

jpm/config/config-docs table source
Table of all of the help text for each config option.
Community Examples

jpm/config/config-options table source
A table of possible options for enum option types.
Community Examples

jpm/config/config-parsers table source
A table of all of the dynamic config bindings to parsers.
Community Examples

jpm/config/config-set table source
Listing of all config dyns.
Community Examples

jpm/config/defconf macro source
(defconf kw &opt parser docs options)
+

jpm/config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.

jpm/config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).

jpm/config/config-docs table source
Table of all of the help text for each config option.

jpm/config/config-options table source
A table of possible options for enum option types.

jpm/config/config-parsers table source
A table of all of the dynamic config bindings to parsers.

jpm/config/config-set table source
Listing of all config dyns.

jpm/config/defconf macro source
(defconf kw &opt parser docs options)
 
-Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.
Community Examples

jpm/config/dyn:ar function source
(dyn:ar &opt dflt)
+Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.

jpm/config/dyn:ar function source
(dyn:ar &opt dflt)
 
-
Community Examples

jpm/config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
+

jpm/config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
 
-
Community Examples

jpm/config/dyn:binpath function source
(dyn:binpath &opt dflt)
+

jpm/config/dyn:binpath function source
(dyn:binpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:build-type function source
(dyn:build-type &opt dflt)
+

jpm/config/dyn:build-type function source
(dyn:build-type &opt dflt)
 
-
Community Examples

jpm/config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
+

jpm/config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:c++ function source
(dyn:c++ &opt dflt)
+

jpm/config/dyn:c++ function source
(dyn:c++ &opt dflt)
 
-
Community Examples

jpm/config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
+

jpm/config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
 
-
Community Examples

jpm/config/dyn:cc function source
(dyn:cc &opt dflt)
+

jpm/config/dyn:cc function source
(dyn:cc &opt dflt)
 
-
Community Examples

jpm/config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
+

jpm/config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
 
-
Community Examples

jpm/config/dyn:cflags function source
(dyn:cflags &opt dflt)
+

jpm/config/dyn:cflags function source
(dyn:cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
+

jpm/config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
 
-
Community Examples

jpm/config/dyn:config-file function source
(dyn:config-file &opt dflt)
+

jpm/config/dyn:config-file function source
(dyn:config-file &opt dflt)
 
-
Community Examples

jpm/config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
+

jpm/config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
+

jpm/config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
+

jpm/config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
 
-
Community Examples

jpm/config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
+

jpm/config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
+

jpm/config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
+

jpm/config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
+

jpm/config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
+

jpm/config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet function source
(dyn:janet &opt dflt)
+

jpm/config/dyn:janet function source
(dyn:janet &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
+

jpm/config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
+

jpm/config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
+

jpm/config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
+

jpm/config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:lflags function source
(dyn:lflags &opt dflt)
+

jpm/config/dyn:lflags function source
(dyn:lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:libpath function source
(dyn:libpath &opt dflt)
+

jpm/config/dyn:libpath function source
(dyn:libpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:local function source
(dyn:local &opt dflt)
+

jpm/config/dyn:local function source
(dyn:local &opt dflt)
 
-
Community Examples

jpm/config/dyn:manpath function source
(dyn:manpath &opt dflt)
+

jpm/config/dyn:manpath function source
(dyn:manpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:modext function source
(dyn:modext &opt dflt)
+

jpm/config/dyn:modext function source
(dyn:modext &opt dflt)
 
-
Community Examples

jpm/config/dyn:modpath function source
(dyn:modpath &opt dflt)
+

jpm/config/dyn:modpath function source
(dyn:modpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
+

jpm/config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
 
-
Community Examples

jpm/config/dyn:offline function source
(dyn:offline &opt dflt)
+

jpm/config/dyn:offline function source
(dyn:offline &opt dflt)
 
-
Community Examples

jpm/config/dyn:optimize function source
(dyn:optimize &opt dflt)
+

jpm/config/dyn:optimize function source
(dyn:optimize &opt dflt)
 
-
Community Examples

jpm/config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
+

jpm/config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
 
-
Community Examples

jpm/config/dyn:silent function source
(dyn:silent &opt dflt)
+

jpm/config/dyn:silent function source
(dyn:silent &opt dflt)
 
-
Community Examples

jpm/config/dyn:statext function source
(dyn:statext &opt dflt)
+

jpm/config/dyn:statext function source
(dyn:statext &opt dflt)
 
-
Community Examples

jpm/config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
+

jpm/config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:test function source
(dyn:test &opt dflt)
+

jpm/config/dyn:test function source
(dyn:test &opt dflt)
 
-
Community Examples

jpm/config/dyn:tree function source
(dyn:tree &opt dflt)
+

jpm/config/dyn:tree function source
(dyn:tree &opt dflt)
 
-
Community Examples

jpm/config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
+

jpm/config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
 
-
Community Examples

jpm/config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
+

jpm/config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
 
-
Community Examples

jpm/config/dyn:verbose function source
(dyn:verbose &opt dflt)
+

jpm/config/dyn:verbose function source
(dyn:verbose &opt dflt)
 
-
Community Examples

jpm/config/dyn:workers function source
(dyn:workers &opt dflt)
+

jpm/config/dyn:workers function source
(dyn:workers &opt dflt)
 
-
Community Examples

jpm/config/load-config function source
(load-config settings &opt override)
+

jpm/config/load-config function source
(load-config settings &opt override)
 
-Load a configuration from a table or struct.
Community Examples

jpm/config/load-config-file function source
(load-config-file path &opt override)
+Load a configuration from a table or struct.

jpm/config/load-config-file function source
(load-config-file path &opt override)
 
-Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.
Community Examples

jpm/config/load-default function source
(load-default &opt override)
+Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.

jpm/config/load-default function source
(load-default &opt override)
 
-Load the default configuration.
Community Examples

jpm/config/load-options function source
(load-options &opt path)
+Load the default configuration.

jpm/config/load-options function source
(load-options &opt path)
 
-Load a file that contains config options that can be set. If no such file exists, then do nothing.
Community Examples

jpm/config/opt function source
(opt opts key &opt dflt)
+Load a file that contains config options that can be set. If no such file exists, then do nothing.

jpm/config/opt function source
(opt opts key &opt dflt)
 
-Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.
Community Examples

jpm/config/read-env-variables function source
(read-env-variables)
+Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.

jpm/config/read-env-variables function source
(read-env-variables)
 
-Read environment variables that correspond to config variables into dyns.
Community Examples

jpm/config/save-config function source
(save-config path)
+Read environment variables that correspond to config variables into dyns.

jpm/config/save-config function source
(save-config path)
 
-Write the current configuration information to a file.
Community Examples

jpm/config/shorthand-mapping struct source
Map some single characters to long options.
Community Examples

jpm/dagbuild/pdag function source
(pdag f dag &opt n-workers)
+Write the current configuration information to a file.

jpm/config/shorthand-mapping struct source
Map some single characters to long options.

jpm/dagbuild/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.
Community Examples

jpm/dagbuild/pmap function source
(pmap f data)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.

jpm/dagbuild/pmap function source
(pmap f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Community Examples

jpm/make-config/auto function source
(auto)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.

jpm/make-config/auto function source
(auto)
 
-Get an autodetected config.
Community Examples

jpm/make-config/generate-config function source
(generate-config &opt destdir silent as-data)
+Get an autodetected config.

jpm/make-config/generate-config function source
(generate-config &opt destdir silent as-data)
 
-Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Community Examples

jpm/pm/bundle-install function source
(bundle-install bundle &opt no-deps)
+Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.

jpm/pm/bundle-install function source
(bundle-install bundle &opt no-deps)
 
-Install a bundle from a git repository.
Community Examples

jpm/pm/curl function source
(curl & args)
+Install a bundle from a git repository.

jpm/pm/curl function source
(curl & args)
 
-Make a call to curl
Community Examples

jpm/pm/do-rule function source
(do-rule target)
+Make a call to curl

jpm/pm/do-rule function source
(do-rule target)
 
-Evaluate a given rule in a one-off manner.
Community Examples

jpm/pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
+Evaluate a given rule in a one-off manner.

jpm/pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
 
-Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.
Community Examples

jpm/pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
+Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.

jpm/pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
 
-Download a git bundle from a remote respository
Community Examples

jpm/pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
+Download a git bundle from a remote respository

jpm/pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
 
-Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.
Community Examples

jpm/pm/git function source
(git & args)
+Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.

jpm/pm/git function source
(git & args)
 
-Make a call to git.
Community Examples

jpm/pm/import-rules function source
(import-rules path &opt base-env)
+Make a call to git.

jpm/pm/import-rules function source
(import-rules path &opt base-env)
 
-Import another file that defines more rules. This ruleset is merged into the current ruleset.
Community Examples

jpm/pm/load-lockfile function source
(load-lockfile &opt filename)
+Import another file that defines more rules. This ruleset is merged into the current ruleset.

jpm/pm/load-lockfile function source
(load-lockfile &opt filename)
 
-Load packages from a lockfile.
Community Examples

jpm/pm/load-project-meta function source
(load-project-meta &opt path)
+Load packages from a lockfile.

jpm/pm/load-project-meta function source
(load-project-meta &opt path)
 
-Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.
Community Examples

jpm/pm/make-jpm-env function source
(make-jpm-env &opt base-env)
+Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.

jpm/pm/make-jpm-env function source
(make-jpm-env &opt base-env)
 
-Create an environment that is preloaded with jpm symbols.
Community Examples

jpm/pm/make-lockfile function source
(make-lockfile &opt filename)
+Create an environment that is preloaded with jpm symbols.

jpm/pm/make-lockfile function source
(make-lockfile &opt filename)
 
-
Community Examples

jpm/pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
+

jpm/pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
 
-Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.
Community Examples

jpm/pm/post-deps macro source
(post-deps & body)
+Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.

jpm/pm/post-deps macro source
(post-deps & body)
 
-Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.
Community Examples

jpm/pm/require-jpm function source
(require-jpm path &opt base-env)
+Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.

jpm/pm/require-jpm function source
(require-jpm path &opt base-env)
 
-Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.
Community Examples

jpm/pm/resolve-bundle function source
(resolve-bundle bundle)
+Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.

jpm/pm/resolve-bundle function source
(resolve-bundle bundle)
 
-Convert any bundle string/table to the normalized table form.
Community Examples

jpm/pm/tar function source
(tar & args)
+Convert any bundle string/table to the normalized table form.

jpm/pm/tar function source
(tar & args)
 
-Make a call to tar.
Community Examples

jpm/pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
+Make a call to tar.

jpm/pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
 
-Fetch latest tag version from remote repository
Community Examples

jpm/pm/update-installed function source
(update-installed)
+Fetch latest tag version from remote repository

jpm/pm/update-installed function source
(update-installed)
 
-Update all previously installed packages to their latest versions.
Community Examples

jpm/rules/add-body macro source
(add-body target & body)
+Update all previously installed packages to their latest versions.

jpm/rules/add-body macro source
(add-body target & body)
 
-Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.
Community Examples

jpm/rules/add-dep function source
(add-dep target dep)
+Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.

jpm/rules/add-dep function source
(add-dep target dep)
 
-Alias for `add-input`
Community Examples

jpm/rules/add-input function source
(add-input target input)
+Alias for `add-input`

jpm/rules/add-input function source
(add-input target input)
 
-Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.
Community Examples

jpm/rules/add-output function source
(add-output target output)
+Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.

jpm/rules/add-output function source
(add-output target output)
 
-Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.
Community Examples

jpm/rules/add-thunk function source
(add-thunk target thunk)
+Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.

jpm/rules/add-thunk function source
(add-thunk target thunk)
 
-Append a thunk to a target's recipe.
Community Examples

jpm/rules/build-rules function source
(build-rules rules targets &opt n-workers)
+Append a thunk to a target's recipe.

jpm/rules/build-rules function source
(build-rules rules targets &opt n-workers)
 
-Given a graph of all rules, extract a work graph that will build out-of-date files.
Community Examples

jpm/rules/getrules function source
(getrules)
+Given a graph of all rules, extract a work graph that will build out-of-date files.

jpm/rules/getrules function source
(getrules)
 
-
Community Examples

jpm/rules/phony macro source
(phony target deps & body)
+

jpm/rules/phony macro source
(phony target deps & body)
 
-Alias for `task`.
Community Examples

jpm/rules/rule macro source
(rule target deps & body)
+Alias for `task`.

jpm/rules/rule macro source
(rule target deps & body)
 
-Add a rule to the rule graph.
Community Examples

jpm/rules/sh-phony macro source
(sh-phony target deps & body)
+Add a rule to the rule graph.

jpm/rules/sh-phony macro source
(sh-phony target deps & body)
 
-Alias for `sh-task`.
Community Examples

jpm/rules/sh-rule macro source
(sh-rule target deps & body)
+Alias for `sh-task`.

jpm/rules/sh-rule macro source
(sh-rule target deps & body)
 
-Add a rule that invokes a shell command, and fails if the command returns non-zero.
Community Examples

jpm/rules/sh-task macro source
(sh-task target deps & body)
+Add a rule that invokes a shell command, and fails if the command returns non-zero.

jpm/rules/sh-task macro source
(sh-task target deps & body)
 
-Add a task that invokes a shell command, and fails if the command returns non-zero.
Community Examples

jpm/rules/task macro source
(task target deps & body)
+Add a task that invokes a shell command, and fails if the command returns non-zero.

jpm/rules/task macro source
(task target deps & body)
 
-Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
Community Examples

jpm/scaffold/scaffold-project function source
(scaffold-project name &opt options)
+Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).

jpm/scaffold/scaffold-project function source
(scaffold-project name &opt options)
 
-Generate a standardized project scaffold.
Community Examples

jpm/shutil/abspath function source
(abspath path)
+Generate a standardized project scaffold.

jpm/shutil/abspath function source
(abspath path)
 
-Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).
Community Examples

jpm/shutil/basename function source
(basename path)
+Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).

jpm/shutil/basename function source
(basename path)
 
-Get the filename of a path without any leading directory components.
Community Examples

jpm/shutil/clear-cache function source
(clear-cache)
+Get the filename of a path without any leading directory components.

jpm/shutil/clear-cache function source
(clear-cache)
 
-Clear the global git cache.
Community Examples

jpm/shutil/clear-manifest function source
(clear-manifest)
+Clear the global git cache.

jpm/shutil/clear-manifest function source
(clear-manifest)
 
-Clear the global installation manifest.
Community Examples

jpm/shutil/clexe-shell function source
(clexe-shell & args)
+Clear the global installation manifest.

jpm/shutil/clexe-shell function source
(clexe-shell & args)
 
-
Community Examples

jpm/shutil/copy function source
(copy src dest)
+

jpm/shutil/copy function source
(copy src dest)
 
-Copy a file or directory recursively from one location to another.
Community Examples

jpm/shutil/copyfile function source
(copyfile src dest)
+Copy a file or directory recursively from one location to another.

jpm/shutil/copyfile function source
(copyfile src dest)
 
-Copy a file one location to another.
Community Examples

jpm/shutil/create-dirs function source
(create-dirs dest)
+Copy a file one location to another.

jpm/shutil/create-dirs function source
(create-dirs dest)
 
-Create all directories needed for a file (mkdir -p).
Community Examples

jpm/shutil/devnull function source
(devnull)
+Create all directories needed for a file (mkdir -p).

jpm/shutil/devnull function source
(devnull)
 
-
Community Examples

jpm/shutil/dirname function source
(dirname path)
+

jpm/shutil/dirname function source
(dirname path)
 
-Get the directory of a file without the filename.
Community Examples

jpm/shutil/do-monkeypatch function source
(do-monkeypatch build-dir)
+Get the directory of a file without the filename.

jpm/shutil/do-monkeypatch function source
(do-monkeypatch build-dir)
 
-Modify the existing environment to have the same paths as the test environment.
Community Examples

jpm/shutil/drop1-shell function source
(drop1-shell std args)
+Modify the existing environment to have the same paths as the test environment.

jpm/shutil/drop1-shell function source
(drop1-shell std args)
 
-Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.
Community Examples

jpm/shutil/exec-slurp function source
(exec-slurp & args)
+Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.

jpm/shutil/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

jpm/shutil/filepath-replace function source
(filepath-replace repo)
+Read stdout of subprocess and return it trimmed in a string.

jpm/shutil/filepath-replace function source
(filepath-replace repo)
 
-Remove special characters from a string or path to make it into a path segment.
Community Examples

jpm/shutil/find-build-dir function source
(find-build-dir)
+Remove special characters from a string or path to make it into a path segment.

jpm/shutil/find-build-dir function source
(find-build-dir)
 
-Gets the build directory to output files to.
Community Examples

jpm/shutil/find-cache function source
(find-cache)
+Gets the build directory to output files to.

jpm/shutil/find-cache function source
(find-cache)
 
-Return the path to the global cache.
Community Examples

jpm/shutil/find-manifest function source
(find-manifest name)
+Return the path to the global cache.

jpm/shutil/find-manifest function source
(find-manifest name)
 
-Get the full path of a manifest file given a package name.
Community Examples

jpm/shutil/find-manifest-dir function source
(find-manifest-dir)
+Get the full path of a manifest file given a package name.

jpm/shutil/find-manifest-dir function source
(find-manifest-dir)
 
-Get the path to the directory containing manifests for installed packages.
Community Examples

jpm/shutil/is-mingw function source
(is-mingw)
+Get the path to the directory containing manifests for installed packages.

jpm/shutil/is-mingw function source
(is-mingw)
 
-Check if built with mingw
Community Examples

jpm/shutil/is-win function source
(is-win)
+Check if built with mingw

jpm/shutil/is-win function source
(is-win)
 
-Check if we should assume a DOS-like shell or default to posix shell.
Community Examples

jpm/shutil/is-win-or-mingw function source
(is-win-or-mingw)
+Check if we should assume a DOS-like shell or default to posix shell.

jpm/shutil/is-win-or-mingw function source
(is-win-or-mingw)
 
-Check if built with mingw
Community Examples

jpm/shutil/path-splitter core/peg source
split paths on / and \.
Community Examples

jpm/shutil/rimraf function source
(rimraf path)
+Check if built with mingw

jpm/shutil/path-splitter core/peg source
split paths on / and \.

jpm/shutil/rimraf function source
(rimraf path)
 
-Hard delete directory tree
Community Examples

jpm/shutil/rm function source
(rm path)
+Hard delete directory tree

jpm/shutil/rm function source
(rm path)
 
-Remove a directory and all sub directories.
Community Examples

jpm/shutil/run-patched function source
(run-patched & extra-args)
+Remove a directory and all sub directories.

jpm/shutil/run-patched function source
(run-patched & extra-args)
 
-Run a subprocess Janet repl that has the same environment as the test environment.
Community Examples

jpm/shutil/run-repl function source
(run-repl)
+Run a subprocess Janet repl that has the same environment as the test environment.

jpm/shutil/run-repl function source
(run-repl)
 
-Run a repl in the monkey patched test environment
Community Examples

jpm/shutil/run-script function source
(run-script path)
+Run a repl in the monkey patched test environment

jpm/shutil/run-script function source
(run-script path)
 
-Run a local script in the monkey patched environment.
Community Examples

jpm/shutil/shell function source
(shell & args)
+Run a local script in the monkey patched environment.

jpm/shutil/shell function source
(shell & args)
 
-Do a shell command
Community Examples

jpm/shutil/undo-monkeypatch function source
(undo-monkeypatch old-builddir)
+Do a shell command

jpm/shutil/undo-monkeypatch function source
(undo-monkeypatch old-builddir)
 
-
Community Examples
+
Integer Types Module Build Rules diff --git a/static/1.29.1/api/jpm/make-config.html b/static/1.29.1/api/jpm/make-config.html index 81267a27..48d743a1 100644 --- a/static/1.29.1/api/jpm/make-config.html +++ b/static/1.29.1/api/jpm/make-config.html @@ -118,9 +118,9 @@

Index

make-config/auto make-config/generate-config


make-config/auto function source
(auto)
 
-Get an autodetected config.
Community Examples

make-config/generate-config function source
(generate-config &opt destdir silent as-data)
+Get an autodetected config.

make-config/generate-config function source
(generate-config &opt destdir silent as-data)
 
-Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Community Examples
+Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Config DAG Build diff --git a/static/1.29.1/api/jpm/pm.html b/static/1.29.1/api/jpm/pm.html index 1d0900c7..84e4b298 100644 --- a/static/1.29.1/api/jpm/pm.html +++ b/static/1.29.1/api/jpm/pm.html @@ -118,43 +118,43 @@

Index

pm/bundle-install pm/curl pm/do-rule pm/download-bundle pm/download-git-bundle pm/download-tar-bundle pm/git pm/import-rules pm/load-lockfile pm/load-project-meta pm/make-jpm-env pm/make-lockfile pm/out-of-tree-config pm/post-deps pm/require-jpm pm/resolve-bundle pm/tar pm/update-git-bundle pm/update-installed


pm/bundle-install function source
(bundle-install bundle &opt no-deps)
 
-Install a bundle from a git repository.
Community Examples

pm/curl function source
(curl & args)
+Install a bundle from a git repository.

pm/curl function source
(curl & args)
 
-Make a call to curl
Community Examples

pm/do-rule function source
(do-rule target)
+Make a call to curl

pm/do-rule function source
(do-rule target)
 
-Evaluate a given rule in a one-off manner.
Community Examples

pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
+Evaluate a given rule in a one-off manner.

pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
 
-Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.
Community Examples

pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
+Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.

pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
 
-Download a git bundle from a remote respository
Community Examples

pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
+Download a git bundle from a remote respository

pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
 
-Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.
Community Examples

pm/git function source
(git & args)
+Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.

pm/git function source
(git & args)
 
-Make a call to git.
Community Examples

pm/import-rules function source
(import-rules path &opt base-env)
+Make a call to git.

pm/import-rules function source
(import-rules path &opt base-env)
 
-Import another file that defines more rules. This ruleset is merged into the current ruleset.
Community Examples

pm/load-lockfile function source
(load-lockfile &opt filename)
+Import another file that defines more rules. This ruleset is merged into the current ruleset.

pm/load-lockfile function source
(load-lockfile &opt filename)
 
-Load packages from a lockfile.
Community Examples

pm/load-project-meta function source
(load-project-meta &opt path)
+Load packages from a lockfile.

pm/load-project-meta function source
(load-project-meta &opt path)
 
-Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.
Community Examples

pm/make-jpm-env function source
(make-jpm-env &opt base-env)
+Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.

pm/make-jpm-env function source
(make-jpm-env &opt base-env)
 
-Create an environment that is preloaded with jpm symbols.
Community Examples

pm/make-lockfile function source
(make-lockfile &opt filename)
+Create an environment that is preloaded with jpm symbols.

pm/make-lockfile function source
(make-lockfile &opt filename)
 
-
Community Examples

pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
+

pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
 
-Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.
Community Examples

pm/post-deps macro source
(post-deps & body)
+Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.

pm/post-deps macro source
(post-deps & body)
 
-Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.
Community Examples

pm/require-jpm function source
(require-jpm path &opt base-env)
+Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.

pm/require-jpm function source
(require-jpm path &opt base-env)
 
-Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.
Community Examples

pm/resolve-bundle function source
(resolve-bundle bundle)
+Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.

pm/resolve-bundle function source
(resolve-bundle bundle)
 
-Convert any bundle string/table to the normalized table form.
Community Examples

pm/tar function source
(tar & args)
+Convert any bundle string/table to the normalized table form.

pm/tar function source
(tar & args)
 
-Make a call to tar.
Community Examples

pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
+Make a call to tar.

pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
 
-Fetch latest tag version from remote repository
Community Examples

pm/update-installed function source
(update-installed)
+Fetch latest tag version from remote repository

pm/update-installed function source
(update-installed)
 
-Update all previously installed packages to their latest versions.
Community Examples
+Update all previously installed packages to their latest versions.
DAG Build Project Scaffolding diff --git a/static/1.29.1/api/jpm/rules.html b/static/1.29.1/api/jpm/rules.html index 324382ce..8df4a9af 100644 --- a/static/1.29.1/api/jpm/rules.html +++ b/static/1.29.1/api/jpm/rules.html @@ -118,31 +118,31 @@

Index

rules/add-body rules/add-dep rules/add-input rules/add-output rules/add-thunk rules/build-rules rules/getrules rules/phony rules/rule rules/sh-phony rules/sh-rule rules/sh-task rules/task


rules/add-body macro source
(add-body target & body)
 
-Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.
Community Examples

rules/add-dep function source
(add-dep target dep)
+Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.

rules/add-dep function source
(add-dep target dep)
 
-Alias for `add-input`
Community Examples

rules/add-input function source
(add-input target input)
+Alias for `add-input`

rules/add-input function source
(add-input target input)
 
-Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.
Community Examples

rules/add-output function source
(add-output target output)
+Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.

rules/add-output function source
(add-output target output)
 
-Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.
Community Examples

rules/add-thunk function source
(add-thunk target thunk)
+Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.

rules/add-thunk function source
(add-thunk target thunk)
 
-Append a thunk to a target's recipe.
Community Examples

rules/build-rules function source
(build-rules rules targets &opt n-workers)
+Append a thunk to a target's recipe.

rules/build-rules function source
(build-rules rules targets &opt n-workers)
 
-Given a graph of all rules, extract a work graph that will build out-of-date files.
Community Examples

rules/getrules function source
(getrules)
+Given a graph of all rules, extract a work graph that will build out-of-date files.

rules/getrules function source
(getrules)
 
-
Community Examples

rules/phony macro source
(phony target deps & body)
+

rules/phony macro source
(phony target deps & body)
 
-Alias for `task`.
Community Examples

rules/rule macro source
(rule target deps & body)
+Alias for `task`.

rules/rule macro source
(rule target deps & body)
 
-Add a rule to the rule graph.
Community Examples

rules/sh-phony macro source
(sh-phony target deps & body)
+Add a rule to the rule graph.

rules/sh-phony macro source
(sh-phony target deps & body)
 
-Alias for `sh-task`.
Community Examples

rules/sh-rule macro source
(sh-rule target deps & body)
+Alias for `sh-task`.

rules/sh-rule macro source
(sh-rule target deps & body)
 
-Add a rule that invokes a shell command, and fails if the command returns non-zero.
Community Examples

rules/sh-task macro source
(sh-task target deps & body)
+Add a rule that invokes a shell command, and fails if the command returns non-zero.

rules/sh-task macro source
(sh-task target deps & body)
 
-Add a task that invokes a shell command, and fails if the command returns non-zero.
Community Examples

rules/task macro source
(task target deps & body)
+Add a task that invokes a shell command, and fails if the command returns non-zero.

rules/task macro source
(task target deps & body)
 
-Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
Community Examples
+Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
JPM C Compiler diff --git a/static/1.29.1/api/jpm/scaffold.html b/static/1.29.1/api/jpm/scaffold.html index 72ccc909..f32233fd 100644 --- a/static/1.29.1/api/jpm/scaffold.html +++ b/static/1.29.1/api/jpm/scaffold.html @@ -118,7 +118,7 @@

Index

scaffold/scaffold-project


scaffold/scaffold-project function source
(scaffold-project name &opt options)
 
-Generate a standardized project scaffold.
Community Examples
+Generate a standardized project scaffold.
Project Management Shell Utilities diff --git a/static/1.29.1/api/jpm/shutil.html b/static/1.29.1/api/jpm/shutil.html index f8e3f363..9fa4fcb7 100644 --- a/static/1.29.1/api/jpm/shutil.html +++ b/static/1.29.1/api/jpm/shutil.html @@ -118,61 +118,61 @@

Index

shutil/abspath shutil/basename shutil/clear-cache shutil/clear-manifest shutil/clexe-shell shutil/copy shutil/copyfile shutil/create-dirs shutil/devnull shutil/dirname shutil/do-monkeypatch shutil/drop1-shell shutil/exec-slurp shutil/filepath-replace shutil/find-build-dir shutil/find-cache shutil/find-manifest shutil/find-manifest-dir shutil/is-mingw shutil/is-win shutil/is-win-or-mingw shutil/path-splitter shutil/rimraf shutil/rm shutil/run-patched shutil/run-repl shutil/run-script shutil/shell shutil/undo-monkeypatch


shutil/abspath function source
(abspath path)
 
-Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).
Community Examples

shutil/basename function source
(basename path)
+Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).

shutil/basename function source
(basename path)
 
-Get the filename of a path without any leading directory components.
Community Examples

shutil/clear-cache function source
(clear-cache)
+Get the filename of a path without any leading directory components.

shutil/clear-cache function source
(clear-cache)
 
-Clear the global git cache.
Community Examples

shutil/clear-manifest function source
(clear-manifest)
+Clear the global git cache.

shutil/clear-manifest function source
(clear-manifest)
 
-Clear the global installation manifest.
Community Examples

shutil/clexe-shell function source
(clexe-shell & args)
+Clear the global installation manifest.

shutil/clexe-shell function source
(clexe-shell & args)
 
-
Community Examples

shutil/copy function source
(copy src dest)
+

shutil/copy function source
(copy src dest)
 
-Copy a file or directory recursively from one location to another.
Community Examples

shutil/copyfile function source
(copyfile src dest)
+Copy a file or directory recursively from one location to another.

shutil/copyfile function source
(copyfile src dest)
 
-Copy a file one location to another.
Community Examples

shutil/create-dirs function source
(create-dirs dest)
+Copy a file one location to another.

shutil/create-dirs function source
(create-dirs dest)
 
-Create all directories needed for a file (mkdir -p).
Community Examples

shutil/devnull function source
(devnull)
+Create all directories needed for a file (mkdir -p).

shutil/devnull function source
(devnull)
 
-
Community Examples

shutil/dirname function source
(dirname path)
+

shutil/dirname function source
(dirname path)
 
-Get the directory of a file without the filename.
Community Examples

shutil/do-monkeypatch function source
(do-monkeypatch build-dir)
+Get the directory of a file without the filename.

shutil/do-monkeypatch function source
(do-monkeypatch build-dir)
 
-Modify the existing environment to have the same paths as the test environment.
Community Examples

shutil/drop1-shell function source
(drop1-shell std args)
+Modify the existing environment to have the same paths as the test environment.

shutil/drop1-shell function source
(drop1-shell std args)
 
-Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.
Community Examples

shutil/exec-slurp function source
(exec-slurp & args)
+Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.

shutil/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

shutil/filepath-replace function source
(filepath-replace repo)
+Read stdout of subprocess and return it trimmed in a string.

shutil/filepath-replace function source
(filepath-replace repo)
 
-Remove special characters from a string or path to make it into a path segment.
Community Examples

shutil/find-build-dir function source
(find-build-dir)
+Remove special characters from a string or path to make it into a path segment.

shutil/find-build-dir function source
(find-build-dir)
 
-Gets the build directory to output files to.
Community Examples

shutil/find-cache function source
(find-cache)
+Gets the build directory to output files to.

shutil/find-cache function source
(find-cache)
 
-Return the path to the global cache.
Community Examples

shutil/find-manifest function source
(find-manifest name)
+Return the path to the global cache.

shutil/find-manifest function source
(find-manifest name)
 
-Get the full path of a manifest file given a package name.
Community Examples

shutil/find-manifest-dir function source
(find-manifest-dir)
+Get the full path of a manifest file given a package name.

shutil/find-manifest-dir function source
(find-manifest-dir)
 
-Get the path to the directory containing manifests for installed packages.
Community Examples

shutil/is-mingw function source
(is-mingw)
+Get the path to the directory containing manifests for installed packages.

shutil/is-mingw function source
(is-mingw)
 
-Check if built with mingw
Community Examples

shutil/is-win function source
(is-win)
+Check if built with mingw

shutil/is-win function source
(is-win)
 
-Check if we should assume a DOS-like shell or default to posix shell.
Community Examples

shutil/is-win-or-mingw function source
(is-win-or-mingw)
+Check if we should assume a DOS-like shell or default to posix shell.

shutil/is-win-or-mingw function source
(is-win-or-mingw)
 
-Check if built with mingw
Community Examples

shutil/path-splitter core/peg source
split paths on / and \.
Community Examples

shutil/rimraf function source
(rimraf path)
+Check if built with mingw

shutil/path-splitter core/peg source
split paths on / and \.

shutil/rimraf function source
(rimraf path)
 
-Hard delete directory tree
Community Examples

shutil/rm function source
(rm path)
+Hard delete directory tree

shutil/rm function source
(rm path)
 
-Remove a directory and all sub directories.
Community Examples

shutil/run-patched function source
(run-patched & extra-args)
+Remove a directory and all sub directories.

shutil/run-patched function source
(run-patched & extra-args)
 
-Run a subprocess Janet repl that has the same environment as the test environment.
Community Examples

shutil/run-repl function source
(run-repl)
+Run a subprocess Janet repl that has the same environment as the test environment.

shutil/run-repl function source
(run-repl)
 
-Run a repl in the monkey patched test environment
Community Examples

shutil/run-script function source
(run-script path)
+Run a repl in the monkey patched test environment

shutil/run-script function source
(run-script path)
 
-Run a local script in the monkey patched environment.
Community Examples

shutil/shell function source
(shell & args)
+Run a local script in the monkey patched environment.

shutil/shell function source
(shell & args)
 
-Do a shell command
Community Examples

shutil/undo-monkeypatch function source
(undo-monkeypatch old-builddir)
+Do a shell command

shutil/undo-monkeypatch function source
(undo-monkeypatch old-builddir)
 
-
Community Examples
+
Project Scaffolding Math Module diff --git a/static/1.29.1/api/spork/argparse.html b/static/1.29.1/api/spork/argparse.html index 4463e7db..3e7687b1 100644 --- a/static/1.29.1/api/spork/argparse.html +++ b/static/1.29.1/api/spork/argparse.html @@ -149,7 +149,7 @@

Index Once parsed, values are accessible in the returned table by the name of the option. For example `(result "verbose")` will check if the verbose flag is enabled. -You may also use a custom args array when specified via the special option `:args`Community Examples

+You may also use a custom args array when specified via the special option `:args`
Spork Base64 diff --git a/static/1.29.1/api/spork/base64.html b/static/1.29.1/api/spork/base64.html index 9eb02ed8..13252a22 100644 --- a/static/1.29.1/api/spork/base64.html +++ b/static/1.29.1/api/spork/base64.html @@ -119,9 +119,9 @@

Index

base64/decode base64/encode


base64/decode function source
(decode s)
 
 Converts a base64 encoded string to its binary representation of any format
-(UTF-8, binary, ..).
Community Examples

base64/encode function source
(encode s)
+(UTF-8, binary, ..).

base64/encode function source
(encode s)
 
-Converts a string of any format (UTF-8, binary, ..) to base64 encoding.
Community Examples
+Converts a string of any format (UTF-8, binary, ..) to base64 encoding.

Argument Parsing CRC diff --git a/static/1.29.1/api/spork/crc.html b/static/1.29.1/api/spork/crc.html index 1da788f1..ca31b56d 100644 --- a/static/1.29.1/api/spork/crc.html +++ b/static/1.29.1/api/spork/crc.html @@ -118,9 +118,9 @@

Index

crc/make-variant crc/named-variant


crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
 
-Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.
Community Examples

crc/named-variant cfunction source
(crc/named-variant name)
+Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.

crc/named-variant cfunction source
(crc/named-variant name)
 
-Get a named CRC variant.
Community Examples
+Get a named CRC variant.
Base64 Cron diff --git a/static/1.29.1/api/spork/cron.html b/static/1.29.1/api/spork/cron.html index 460f7bc6..ada66bd3 100644 --- a/static/1.29.1/api/spork/cron.html +++ b/static/1.29.1/api/spork/cron.html @@ -118,11 +118,11 @@

Index

cron/check cron/next-timestamp cron/parse-cron


cron/check function source
(check cron &opt time local)
 
-Check if a given time matches a cron specifier.
Community Examples

cron/next-timestamp function source
(next-timestamp cron &opt time local)
+Check if a given time matches a cron specifier.

cron/next-timestamp function source
(next-timestamp cron &opt time local)
 
-Given a cron schedule, get the next instance on the cron tab after time
Community Examples

cron/parse-cron function source
(parse-cron str)
+Given a cron schedule, get the next instance on the cron tab after time

cron/parse-cron function source
(parse-cron str)
 
-Parse a cron string into a valid cron schedule object
Community Examples
+Parse a cron string into a valid cron schedule object
CRC EV Utilities diff --git a/static/1.29.1/api/spork/ev-utils.html b/static/1.29.1/api/spork/ev-utils.html index 2123c348..9cd0027c 100644 --- a/static/1.29.1/api/spork/ev-utils.html +++ b/static/1.29.1/api/spork/ev-utils.html @@ -118,27 +118,27 @@

Index

ev-utils/go-nursery ev-utils/join-nursery ev-utils/multithread-service ev-utils/nursery ev-utils/pcall ev-utils/pdag ev-utils/pmap ev-utils/pmap-full ev-utils/pmap-limited ev-utils/spawn-nursery ev-utils/wait-cancel


ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
 
-Spawn a fiber into a nursery, similar to ev/go.
Community Examples

ev-utils/join-nursery function source
(join-nursery nurse)
+Spawn a fiber into a nursery, similar to ev/go.

ev-utils/join-nursery function source
(join-nursery nurse)
 
-Suspend the current fiber until the nursery is emptied.
Community Examples

ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
+Suspend the current fiber until the nursery is emptied.

ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
 
-Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.
Community Examples

ev-utils/nursery function source
(nursery)
+Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.

ev-utils/nursery function source
(nursery)
 
-Group a number of fibers into a single object for structured concurrency
Community Examples

ev-utils/pcall function source
(pcall f n)
+Group a number of fibers into a single object for structured concurrency

ev-utils/pcall function source
(pcall f n)
 
-Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.
Community Examples

ev-utils/pdag function source
(pdag f dag &opt n-workers)
+Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.

ev-utils/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.
Community Examples

ev-utils/pmap function source
(pmap f data &opt n-workers)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.

ev-utils/pmap function source
(pmap f data &opt n-workers)
 
-Map `f` over data in parallel, optionally limiting parallelism to `n` workers.
Community Examples

ev-utils/pmap-full function source
(pmap-full f data)
+Map `f` over data in parallel, optionally limiting parallelism to `n` workers.

ev-utils/pmap-full function source
(pmap-full f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.
Community Examples

ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.

ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
 
-Similar to pmap-full, but only runs work n-ways parallel.
Community Examples

ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
+Similar to pmap-full, but only runs work n-ways parallel.

ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
 
-Similar to ev/spawn but associate spawned fibers with a nursery
Community Examples

ev-utils/wait-cancel macro source
(wait-cancel & body)
+Similar to ev/spawn but associate spawned fibers with a nursery

ev-utils/wait-cancel macro source
(wait-cancel & body)
 
-Wait forever until the current fiber is canceled, and then run some cleanup code.
Community Examples
+Wait forever until the current fiber is canceled, and then run some cleanup code.
Cron Format diff --git a/static/1.29.1/api/spork/fmt.html b/static/1.29.1/api/spork/fmt.html index fc3ea653..38087881 100644 --- a/static/1.29.1/api/spork/fmt.html +++ b/static/1.29.1/api/spork/fmt.html @@ -118,11 +118,11 @@

Index

fmt/format fmt/format-file fmt/format-print


fmt/format function source
(format source)
 
-Format a string of source code to a buffer.
Community Examples

fmt/format-file function source
(format-file file)
+Format a string of source code to a buffer.

fmt/format-file function source
(format-file file)
 
-Format a file
Community Examples

fmt/format-print function source
(format-print source)
+Format a file

fmt/format-print function source
(format-print source)
 
-Format a string of source code and print the result.
Community Examples
+Format a string of source code and print the result.
EV Utilities Generators diff --git a/static/1.29.1/api/spork/generators.html b/static/1.29.1/api/spork/generators.html index bbd8fda3..a99fb87d 100644 --- a/static/1.29.1/api/spork/generators.html +++ b/static/1.29.1/api/spork/generators.html @@ -118,35 +118,35 @@

Index

generators/concat generators/cycle generators/drop generators/drop-until generators/drop-while generators/filter generators/from-iterable generators/map generators/mapcat generators/range generators/run generators/take generators/take-until generators/take-while generators/to-array


generators/concat function source
(concat & xs)
 
-Concatenate one or more generators or iterables into a single generator.
Community Examples

generators/cycle function source
(cycle ds)
+Concatenate one or more generators or iterables into a single generator.

generators/cycle function source
(cycle ds)
 
-Repeatedly yield the elements of `ds`, looping back to the beginning when finished.
Community Examples

generators/drop function source
(drop n ds)
+Repeatedly yield the elements of `ds`, looping back to the beginning when finished.

generators/drop function source
(drop n ds)
 
-Drop `n` elements from `ds`.
Community Examples

generators/drop-until function source
(drop-until p ds)
+Drop `n` elements from `ds`.

generators/drop-until function source
(drop-until p ds)
 
-Drop elements from `ds` until `p` is true.
Community Examples

generators/drop-while function source
(drop-while p ds)
+Drop elements from `ds` until `p` is true.

generators/drop-while function source
(drop-while p ds)
 
-Drop elements from `ds` while `p` is true.
Community Examples

generators/filter function source
(filter p ds)
+Drop elements from `ds` while `p` is true.

generators/filter function source
(filter p ds)
 
-Create a generator that filters `ds` with `p`.
Community Examples

generators/from-iterable function source
(from-iterable ds)
+Create a generator that filters `ds` with `p`.

generators/from-iterable function source
(from-iterable ds)
 
-Create a new generator around any iterable data structure.
Community Examples

generators/map function source
(map f ds)
+Create a new generator around any iterable data structure.

generators/map function source
(map f ds)
 
-Create a generator that maps `f` over `ds`.
Community Examples

generators/mapcat function source
(mapcat f ds)
+Create a generator that maps `f` over `ds`.

generators/mapcat function source
(mapcat f ds)
 
-Map `f` over `ds`, concatenating the results into a new generator.
Community Examples

generators/range function source
(range from to)
+Map `f` over `ds`, concatenating the results into a new generator.

generators/range function source
(range from to)
 
-Create a lazy range.
Community Examples

generators/run function source
(run s)
+Create a lazy range.

generators/run function source
(run s)
 
-Evaluate `s` for side effects.
Community Examples

generators/take function source
(take n ds)
+Evaluate `s` for side effects.

generators/take function source
(take n ds)
 
-Take `n` elements from iterable `ds`.
Community Examples

generators/take-until function source
(take-until p ds)
+Take `n` elements from iterable `ds`.

generators/take-until function source
(take-until p ds)
 
-Return elements from `ds` until `p` is true.
Community Examples

generators/take-while function source
(take-while p ds)
+Return elements from `ds` until `p` is true.

generators/take-while function source
(take-while p ds)
 
-Return elements from `ds` while `p` is true.
Community Examples

generators/to-array function source
(to-array s)
+Return elements from `ds` while `p` is true.

generators/to-array function source
(to-array s)
 
-Consume `s` into a new array.
Community Examples
+Consume `s` into a new array.
Format Getline diff --git a/static/1.29.1/api/spork/getline.html b/static/1.29.1/api/spork/getline.html index 541f3c7a..7febc953 100644 --- a/static/1.29.1/api/spork/getline.html +++ b/static/1.29.1/api/spork/getline.html @@ -118,13 +118,13 @@

Index

getline/default-autocomplete-context getline/default-autocomplete-options getline/default-doc-fetch getline/make-getline getline/max-history


getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
 
-Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.
Community Examples

getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
+Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.

getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
 
-Default handler to get available autocomplete options for a given substring.
Community Examples

getline/default-doc-fetch function source
(default-doc-fetch sym w &)
+Default handler to get available autocomplete options for a given substring.

getline/default-doc-fetch function source
(default-doc-fetch sym w &)
 
-Default handler for Ctrl-G to lookup docstrings in the current environment.
Community Examples

getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
+Default handler for Ctrl-G to lookup docstrings in the current environment.

getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
 
-Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.
Community Examples

getline/max-history number source
Maximal amount of items in the history
Community Examples
+Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.

getline/max-history number source
Maximal amount of items in the history
Generators HTML Generation diff --git a/static/1.29.1/api/spork/htmlgen.html b/static/1.29.1/api/spork/htmlgen.html index f164db22..378ea44d 100644 --- a/static/1.29.1/api/spork/htmlgen.html +++ b/static/1.29.1/api/spork/htmlgen.html @@ -116,13 +116,13 @@

HTML Generation

Index

-

htmlgen/doctype-html htmlgen/escape htmlgen/html htmlgen/raw


htmlgen/doctype-html function source
The html5 doctype header
Community Examples

htmlgen/escape function source
(escape x)
+

htmlgen/doctype-html htmlgen/escape htmlgen/html htmlgen/raw


htmlgen/doctype-html function source
The html5 doctype header

htmlgen/escape function source
(escape x)
 
-Escape characters in a string for HTML
Community Examples

htmlgen/html function source
(html data &opt buf)
+Escape characters in a string for HTML

htmlgen/html function source
(html data &opt buf)
 
-Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.
Community Examples

htmlgen/raw function source
(raw text)
+Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.

htmlgen/raw function source
(raw text)
 
-Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Community Examples
+Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Getline HTTP diff --git a/static/1.29.1/api/spork/http.html b/static/1.29.1/api/spork/http.html index b69d9070..475b96fd 100644 --- a/static/1.29.1/api/spork/http.html +++ b/static/1.29.1/api/spork/http.html @@ -116,29 +116,29 @@

HTTP

Index

-

http/cookie-grammar http/cookies http/logger http/middleware http/query-string-grammar http/read-body http/read-request http/read-response http/request http/request-peg http/response-peg http/router http/send-response http/server http/server-handler http/status-messages http/url-grammar


http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.
Community Examples

http/cookies function source
(cookies nextmw)
+

http/cookie-grammar http/cookies http/logger http/middleware http/query-string-grammar http/read-body http/read-request http/read-response http/request http/request-peg http/response-peg http/router http/send-response http/server http/server-handler http/status-messages http/url-grammar


http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.

http/cookies function source
(cookies nextmw)
 
-Parses cookies into the table under :cookies key
Community Examples

http/logger function source
(logger nextmw)
+Parses cookies into the table under :cookies key

http/logger function source
(logger nextmw)
 
-Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.
Community Examples

http/middleware function source
(middleware x)
+Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.

http/middleware function source
(middleware x)
 
-Coerce any type to http middleware
Community Examples

http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.
Community Examples

http/read-body function source
(read-body req)
+Coerce any type to http middleware

http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.

http/read-body function source
(read-body req)
 
-Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.
Community Examples

http/read-request function source
(read-request conn buf &opt no-query)
+Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.

http/read-request function source
(read-request conn buf &opt no-query)
 
-Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`
Community Examples

http/read-response function source
(read-response conn buf)
+Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`

http/read-response function source
(read-response conn buf)
 
-Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`
Community Examples

http/request function source
(request method url &keys {:headers headers :body body})
+Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`

http/request function source
(request method url &keys {:headers headers :body body})
 
-Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.
Community Examples

http/request-peg core/peg source
PEG for parsing HTTP requests
Community Examples

http/response-peg core/peg source
PEG for parsing HTTP responses
Community Examples

http/router function source
(router routes)
+Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.

http/request-peg core/peg source
PEG for parsing HTTP requests

http/response-peg core/peg source
PEG for parsing HTTP responses

http/router function source
(router routes)
 
-Creates a router middleware. A router will dispatch to different routes based on the URL path.
Community Examples

http/send-response function source
(send-response conn response &opt buf)
+Creates a router middleware. A router will dispatch to different routes based on the URL path.

http/send-response function source
(send-response conn response &opt buf)
 
-Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.
Community Examples

http/server function source
(server handler &opt host port)
+Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.

http/server function source
(server handler &opt host port)
 
-Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.
Community Examples

http/server-handler function source
(server-handler conn handler)
+Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.

http/server-handler function source
(server-handler conn handler)
 
-A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.
Community Examples

http/status-messages struct source
Mapping of HTTP status codes to their status message.
Community Examples

http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
Community Examples
+A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.

http/status-messages struct source
Mapping of HTTP status codes to their status message.

http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
HTML Generation HTTP Framework diff --git a/static/1.29.1/api/spork/httpf.html b/static/1.29.1/api/spork/httpf.html index 73330cad..fd15cd26 100644 --- a/static/1.29.1/api/spork/httpf.html +++ b/static/1.29.1/api/spork/httpf.html @@ -118,15 +118,15 @@

Index

httpf/add-bindings-as-routes httpf/add-route httpf/default-payload-wrapper httpf/listen httpf/server


httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
 
-Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.
Community Examples

httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
+Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.

httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
 
-Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.
Community Examples

httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
+Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.

httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
 
-Add some metadata to all responses
Community Examples

httpf/listen function source
(listen server &opt host port n-workers)
+Add some metadata to all responses

httpf/listen function source
(listen server &opt host port n-workers)
 
-Start server
Community Examples

httpf/server function source
(server &opt parent)
+Start server

httpf/server function source
(server &opt parent)
 
-Create a new server.
Community Examples
+Create a new server.
HTTP JSON diff --git a/static/1.29.1/api/spork/index.html b/static/1.29.1/api/spork/index.html index b4d0524f..1d04a1b5 100644 --- a/static/1.29.1/api/spork/index.html +++ b/static/1.29.1/api/spork/index.html @@ -154,238 +154,238 @@

Spork

Once parsed, values are accessible in the returned table by the name of the option. For example `(result "verbose")` will check if the verbose flag is enabled. -You may also use a custom args array when specified via the special option `:args`Community Examples

spork/base64/decode function source
(decode s)
+You may also use a custom args array when specified via the special option `:args`

spork/base64/decode function source
(decode s)
 
 Converts a base64 encoded string to its binary representation of any format
-(UTF-8, binary, ..).
Community Examples

spork/base64/encode function source
(encode s)
+(UTF-8, binary, ..).

spork/base64/encode function source
(encode s)
 
-Converts a string of any format (UTF-8, binary, ..) to base64 encoding.
Community Examples

spork/crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
+Converts a string of any format (UTF-8, binary, ..) to base64 encoding.

spork/crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
 
-Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.
Community Examples

spork/crc/named-variant cfunction source
(crc/named-variant name)
+Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.

spork/crc/named-variant cfunction source
(crc/named-variant name)
 
-Get a named CRC variant.
Community Examples

spork/cron/check function source
(check cron &opt time local)
+Get a named CRC variant.

spork/cron/check function source
(check cron &opt time local)
 
-Check if a given time matches a cron specifier.
Community Examples

spork/cron/next-timestamp function source
(next-timestamp cron &opt time local)
+Check if a given time matches a cron specifier.

spork/cron/next-timestamp function source
(next-timestamp cron &opt time local)
 
-Given a cron schedule, get the next instance on the cron tab after time
Community Examples

spork/cron/parse-cron function source
(parse-cron str)
+Given a cron schedule, get the next instance on the cron tab after time

spork/cron/parse-cron function source
(parse-cron str)
 
-Parse a cron string into a valid cron schedule object
Community Examples

spork/ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
+Parse a cron string into a valid cron schedule object

spork/ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
 
-Spawn a fiber into a nursery, similar to ev/go.
Community Examples

spork/ev-utils/join-nursery function source
(join-nursery nurse)
+Spawn a fiber into a nursery, similar to ev/go.

spork/ev-utils/join-nursery function source
(join-nursery nurse)
 
-Suspend the current fiber until the nursery is emptied.
Community Examples

spork/ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
+Suspend the current fiber until the nursery is emptied.

spork/ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
 
-Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.
Community Examples

spork/ev-utils/nursery function source
(nursery)
+Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.

spork/ev-utils/nursery function source
(nursery)
 
-Group a number of fibers into a single object for structured concurrency
Community Examples

spork/ev-utils/pcall function source
(pcall f n)
+Group a number of fibers into a single object for structured concurrency

spork/ev-utils/pcall function source
(pcall f n)
 
-Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.
Community Examples

spork/ev-utils/pdag function source
(pdag f dag &opt n-workers)
+Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.

spork/ev-utils/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.
Community Examples

spork/ev-utils/pmap function source
(pmap f data &opt n-workers)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.

spork/ev-utils/pmap function source
(pmap f data &opt n-workers)
 
-Map `f` over data in parallel, optionally limiting parallelism to `n` workers.
Community Examples

spork/ev-utils/pmap-full function source
(pmap-full f data)
+Map `f` over data in parallel, optionally limiting parallelism to `n` workers.

spork/ev-utils/pmap-full function source
(pmap-full f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.
Community Examples

spork/ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.

spork/ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
 
-Similar to pmap-full, but only runs work n-ways parallel.
Community Examples

spork/ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
+Similar to pmap-full, but only runs work n-ways parallel.

spork/ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
 
-Similar to ev/spawn but associate spawned fibers with a nursery
Community Examples

spork/ev-utils/wait-cancel macro source
(wait-cancel & body)
+Similar to ev/spawn but associate spawned fibers with a nursery

spork/ev-utils/wait-cancel macro source
(wait-cancel & body)
 
-Wait forever until the current fiber is canceled, and then run some cleanup code.
Community Examples

spork/fmt/format function source
(format source)
+Wait forever until the current fiber is canceled, and then run some cleanup code.

spork/fmt/format function source
(format source)
 
-Format a string of source code to a buffer.
Community Examples

spork/fmt/format-file function source
(format-file file)
+Format a string of source code to a buffer.

spork/fmt/format-file function source
(format-file file)
 
-Format a file
Community Examples

spork/fmt/format-print function source
(format-print source)
+Format a file

spork/fmt/format-print function source
(format-print source)
 
-Format a string of source code and print the result.
Community Examples

spork/generators/concat function source
(concat & xs)
+Format a string of source code and print the result.

spork/generators/concat function source
(concat & xs)
 
-Concatenate one or more generators or iterables into a single generator.
Community Examples

spork/generators/cycle function source
(cycle ds)
+Concatenate one or more generators or iterables into a single generator.

spork/generators/cycle function source
(cycle ds)
 
-Repeatedly yield the elements of `ds`, looping back to the beginning when finished.
Community Examples

spork/generators/drop function source
(drop n ds)
+Repeatedly yield the elements of `ds`, looping back to the beginning when finished.

spork/generators/drop function source
(drop n ds)
 
-Drop `n` elements from `ds`.
Community Examples

spork/generators/drop-until function source
(drop-until p ds)
+Drop `n` elements from `ds`.

spork/generators/drop-until function source
(drop-until p ds)
 
-Drop elements from `ds` until `p` is true.
Community Examples

spork/generators/drop-while function source
(drop-while p ds)
+Drop elements from `ds` until `p` is true.

spork/generators/drop-while function source
(drop-while p ds)
 
-Drop elements from `ds` while `p` is true.
Community Examples

spork/generators/filter function source
(filter p ds)
+Drop elements from `ds` while `p` is true.

spork/generators/filter function source
(filter p ds)
 
-Create a generator that filters `ds` with `p`.
Community Examples

spork/generators/from-iterable function source
(from-iterable ds)
+Create a generator that filters `ds` with `p`.

spork/generators/from-iterable function source
(from-iterable ds)
 
-Create a new generator around any iterable data structure.
Community Examples

spork/generators/map function source
(map f ds)
+Create a new generator around any iterable data structure.

spork/generators/map function source
(map f ds)
 
-Create a generator that maps `f` over `ds`.
Community Examples

spork/generators/mapcat function source
(mapcat f ds)
+Create a generator that maps `f` over `ds`.

spork/generators/mapcat function source
(mapcat f ds)
 
-Map `f` over `ds`, concatenating the results into a new generator.
Community Examples

spork/generators/range function source
(range from to)
+Map `f` over `ds`, concatenating the results into a new generator.

spork/generators/range function source
(range from to)
 
-Create a lazy range.
Community Examples

spork/generators/run function source
(run s)
+Create a lazy range.

spork/generators/run function source
(run s)
 
-Evaluate `s` for side effects.
Community Examples

spork/generators/take function source
(take n ds)
+Evaluate `s` for side effects.

spork/generators/take function source
(take n ds)
 
-Take `n` elements from iterable `ds`.
Community Examples

spork/generators/take-until function source
(take-until p ds)
+Take `n` elements from iterable `ds`.

spork/generators/take-until function source
(take-until p ds)
 
-Return elements from `ds` until `p` is true.
Community Examples

spork/generators/take-while function source
(take-while p ds)
+Return elements from `ds` until `p` is true.

spork/generators/take-while function source
(take-while p ds)
 
-Return elements from `ds` while `p` is true.
Community Examples

spork/generators/to-array function source
(to-array s)
+Return elements from `ds` while `p` is true.

spork/generators/to-array function source
(to-array s)
 
-Consume `s` into a new array.
Community Examples

spork/getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
+Consume `s` into a new array.

spork/getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
 
-Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.
Community Examples

spork/getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
+Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.

spork/getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
 
-Default handler to get available autocomplete options for a given substring.
Community Examples

spork/getline/default-doc-fetch function source
(default-doc-fetch sym w &)
+Default handler to get available autocomplete options for a given substring.

spork/getline/default-doc-fetch function source
(default-doc-fetch sym w &)
 
-Default handler for Ctrl-G to lookup docstrings in the current environment.
Community Examples

spork/getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
+Default handler for Ctrl-G to lookup docstrings in the current environment.

spork/getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
 
-Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.
Community Examples

spork/getline/max-history number source
Maximal amount of items in the history
Community Examples

spork/htmlgen/doctype-html function source
The html5 doctype header
Community Examples

spork/htmlgen/escape function source
(escape x)
+Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.

spork/getline/max-history number source
Maximal amount of items in the history

spork/htmlgen/doctype-html function source
The html5 doctype header

spork/htmlgen/escape function source
(escape x)
 
-Escape characters in a string for HTML
Community Examples

spork/htmlgen/html function source
(html data &opt buf)
+Escape characters in a string for HTML

spork/htmlgen/html function source
(html data &opt buf)
 
-Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.
Community Examples

spork/htmlgen/raw function source
(raw text)
+Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.

spork/htmlgen/raw function source
(raw text)
 
-Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Community Examples

spork/http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.
Community Examples

spork/http/cookies function source
(cookies nextmw)
+Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.

spork/http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.

spork/http/cookies function source
(cookies nextmw)
 
-Parses cookies into the table under :cookies key
Community Examples

spork/http/logger function source
(logger nextmw)
+Parses cookies into the table under :cookies key

spork/http/logger function source
(logger nextmw)
 
-Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.
Community Examples

spork/http/middleware function source
(middleware x)
+Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.

spork/http/middleware function source
(middleware x)
 
-Coerce any type to http middleware
Community Examples

spork/http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.
Community Examples

spork/http/read-body function source
(read-body req)
+Coerce any type to http middleware

spork/http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.

spork/http/read-body function source
(read-body req)
 
-Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.
Community Examples

spork/http/read-request function source
(read-request conn buf &opt no-query)
+Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.

spork/http/read-request function source
(read-request conn buf &opt no-query)
 
-Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`
Community Examples

spork/http/read-response function source
(read-response conn buf)
+Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`

spork/http/read-response function source
(read-response conn buf)
 
-Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`
Community Examples

spork/http/request function source
(request method url &keys {:headers headers :body body})
+Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`

spork/http/request function source
(request method url &keys {:headers headers :body body})
 
-Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.
Community Examples

spork/http/request-peg core/peg source
PEG for parsing HTTP requests
Community Examples

spork/http/response-peg core/peg source
PEG for parsing HTTP responses
Community Examples

spork/http/router function source
(router routes)
+Make an HTTP request to a server. Returns a table contain response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.

spork/http/request-peg core/peg source
PEG for parsing HTTP requests

spork/http/response-peg core/peg source
PEG for parsing HTTP responses

spork/http/router function source
(router routes)
 
-Creates a router middleware. A router will dispatch to different routes based on the URL path.
Community Examples

spork/http/send-response function source
(send-response conn response &opt buf)
+Creates a router middleware. A router will dispatch to different routes based on the URL path.

spork/http/send-response function source
(send-response conn response &opt buf)
 
-Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.
Community Examples

spork/http/server function source
(server handler &opt host port)
+Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.

spork/http/server function source
(server handler &opt host port)
 
-Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.
Community Examples

spork/http/server-handler function source
(server-handler conn handler)
+Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.

spork/http/server-handler function source
(server-handler conn handler)
 
-A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.
Community Examples

spork/http/status-messages struct source
Mapping of HTTP status codes to their status message.
Community Examples

spork/http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
Community Examples

spork/httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
+A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.

spork/http/status-messages struct source
Mapping of HTTP status codes to their status message.

spork/http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.

spork/httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
 
-Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.
Community Examples

spork/httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
+Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.

spork/httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
 
-Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.
Community Examples

spork/httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
+Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.

spork/httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
 
-Add some metadata to all responses
Community Examples

spork/httpf/listen function source
(listen server &opt host port n-workers)
+Add some metadata to all responses

spork/httpf/listen function source
(listen server &opt host port n-workers)
 
-Start server
Community Examples

spork/httpf/server function source
(server &opt parent)
+Start server

spork/httpf/server function source
(server &opt parent)
 
-Create a new server.
Community Examples

spork/json/decode cfunction
(json/decode json-source &opt keywords nils)
+Create a new server.

spork/json/decode cfunction
(json/decode json-source &opt keywords nils)
 
-Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.
Community Examples

spork/json/encode cfunction
(json/encode x &opt tab newline buf)
+Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.

spork/json/encode cfunction
(json/encode x &opt tab newline buf)
 
-Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
Community Examples

spork/mdz/*front-matter* keyword source
Dynamic binding to front matter after parsing, compilation, and evaluation, of markup completes.
Community Examples

spork/mdz/*markup-dom* keyword source
The htmlgen source that can be used to generate a document with htmlgen/html.
Community Examples

spork/mdz/add-loader function source
(add-loader)
+Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.

spork/mdz/*front-matter* keyword source
Dynamic binding to front matter after parsing, compilation, and evaluation, of markup completes.

spork/mdz/*markup-dom* keyword source
The htmlgen source that can be used to generate a document with htmlgen/html.

spork/mdz/add-loader function source
(add-loader)
 
-Allow importing and requiring markup as a module
Community Examples

spork/mdz/anchor function source
(anchor name & content)
+Allow importing and requiring markup as a module

spork/mdz/anchor function source
(anchor name & content)
 
-Create an in-page anchor for a local link.
Community Examples

spork/mdz/bigger function source
(bigger content)
+Create an in-page anchor for a local link.

spork/mdz/bigger function source
(bigger content)
 
-Make span element with bigger font
Community Examples

spork/mdz/blockquote function source
(blockquote content)
+Make span element with bigger font

spork/mdz/blockquote function source
(blockquote content)
 
-Make a block quote element
Community Examples

spork/mdz/center function source
(center content)
+Make a block quote element

spork/mdz/center function source
(center content)
 
-Center some content
Community Examples

spork/mdz/code function source
(code content)
+Center some content

spork/mdz/code function source
(code content)
 
-Make code element with class mendoza-code
Community Examples

spork/mdz/codeblock function source
(codeblock lang &opt source)
+Make code element with class mendoza-code

spork/mdz/codeblock function source
(codeblock lang &opt source)
 
-Inline code or codeblock
Community Examples

spork/mdz/div function
Make a div element
Community Examples

spork/mdz/em function
Make a em element
Community Examples

spork/mdz/hr function source
(hr)
+Inline code or codeblock

spork/mdz/div function
Make a div element

spork/mdz/em function
Make a em element

spork/mdz/hr function source
(hr)
 
-Add a horizontal rule
Community Examples

spork/mdz/html function source
(html source)
+Add a horizontal rule

spork/mdz/html function source
(html source)
 
-Embed some raw html
Community Examples

spork/mdz/image function source
(image src alt)
+Embed some raw html

spork/mdz/image function source
(image src alt)
 
-Make an image element
Community Examples

spork/mdz/li function
Make a li element
Community Examples

spork/mdz/link function source
(link url &opt content)
+Make an image element

spork/mdz/li function
Make a li element

spork/mdz/link function source
(link url &opt content)
 
-Create an anchor link
Community Examples

spork/mdz/markup function source
(markup source &opt env where)
+Create an anchor link

spork/mdz/markup function source
(markup source &opt env where)
 
-Parse mendoza markup and evaluate it returning an htmlgen document tree.
Community Examples

spork/mdz/mdz-loader function source
(mdz-loader path &)
+Parse mendoza markup and evaluate it returning an htmlgen document tree.

spork/mdz/mdz-loader function source
(mdz-loader path &)
 
-Loader for the mdz format
Community Examples

spork/mdz/ol function
Make a ol element
Community Examples

spork/mdz/p function
Make a p element
Community Examples

spork/mdz/pre function
Make a pre element
Community Examples

spork/mdz/section function source
(section name content)
+Loader for the mdz format

spork/mdz/ol function
Make a ol element

spork/mdz/p function
Make a p element

spork/mdz/pre function
Make a pre element

spork/mdz/section function source
(section name content)
 
-Create a section. Usually used to embed different parts of the content document into different parts of the main page.
Community Examples

spork/mdz/smaller function source
(smaller content)
+Create a section. Usually used to embed different parts of the content document into different parts of the main page.

spork/mdz/smaller function source
(smaller content)
 
-Make span element with smaller font
Community Examples

spork/mdz/strong function
Make a strong element
Community Examples

spork/mdz/sub function
Make a sub element
Community Examples

spork/mdz/sup function
Make a sup element
Community Examples

spork/mdz/tag function source
(tag name content)
+Make span element with smaller font

spork/mdz/strong function
Make a strong element

spork/mdz/sub function
Make a sub element

spork/mdz/sup function
Make a sup element

spork/mdz/tag function source
(tag name content)
 
-Wrap some content in an html tag. If you need attributes or other properties, you may want to use raw HTML via the html function.
Community Examples

spork/mdz/td function
Make a td element
Community Examples

spork/mdz/th function
Make a th element
Community Examples

spork/mdz/tr function
Make a tr element
Community Examples

spork/mdz/u function
Make a u element
Community Examples

spork/mdz/ul function
Make a ul element
Community Examples

spork/misc/always function source
(always x)
+Wrap some content in an html tag. If you need attributes or other properties, you may want to use raw HTML via the html function.

spork/mdz/td function
Make a td element

spork/mdz/th function
Make a th element

spork/mdz/tr function
Make a tr element

spork/mdz/u function
Make a u element

spork/mdz/ul function
Make a ul element

spork/misc/always function source
(always x)
 
-Return a function that discards any arguments and always returns `x`.
Community Examples

spork/misc/antepenultimate function source
(antepenultimate xs)
+Return a function that discards any arguments and always returns `x`.

spork/misc/antepenultimate function source
(antepenultimate xs)
 
-Get the third-to-last element from an indexed data structure.
Community Examples

spork/misc/caperr macro source
(caperr & body)
+Get the third-to-last element from an indexed data structure.

spork/misc/caperr macro source
(caperr & body)
 
 Captures the standart error output of the variadic `body` and returns it
-as a buffer.
Community Examples

spork/misc/capout macro source
(capout & body)
+as a buffer.

spork/misc/capout macro source
(capout & body)
 
 Captures the standart output of the variadic `body` and returns it as
-a buffer.
Community Examples

spork/misc/cond-> macro source
(cond-> val & clauses)
+a buffer.

spork/misc/cond-> macro source
(cond-> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs with condition and operation to which the `val`,
 is put as first argument. All conditions are tried and
 for truthy conditions the operation is executed.
-Returns the value mutated if any condition is truthy.
Community Examples

spork/misc/cond->> macro source
(cond->> val & clauses)
+Returns the value mutated if any condition is truthy.

spork/misc/cond->> macro source
(cond->> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs of condition and operation to which the `val`,
 is put as last argument. All conditions are tried and
 for truthy the operation is ran.
-Returns mutated value if any condition is truthy.
Community Examples

spork/misc/dedent function source
(dedent & xs)
+Returns mutated value if any condition is truthy.

spork/misc/dedent function source
(dedent & xs)
 
 Remove indentation after concatenating the arguments. Works by removing
 leading whitespace, and then removing that same pattern of whitepsace after
-new lines.
Community Examples

spork/misc/defs macro source
(defs & bindings)
+new lines.

spork/misc/defs macro source
(defs & bindings)
 
-Defines many constants as in let `bindings`, but without creating new scope.
Community Examples

spork/misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
+Defines many constants as in let `bindings`, but without creating new scope.

spork/misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
 
 Do a depth first, pre-order traversal over a data structure.
 Also allow for callbacks before and after visiting the children
 of a node. Also allow for a custom `get-children` function to
 change traversal as needed. Will detect cycles if an empty table
 is passed as the `seen` parameter, which is used to cached values
-that have been visited.
Community Examples

spork/misc/do-def macro source
(do-def c d & body)
+that have been visited.

spork/misc/do-def macro source
(do-def c d & body)
 
 Convenience macro for defining constant named `c` with value `d` before `body`
 and returning it after evaluating `body`, that presumably modifies 
-the `c` refered content. For example buffer, table or array.
Community Examples

spork/misc/do-var macro source
(do-var v d & body)
+the `c` refered content. For example buffer, table or array.

spork/misc/do-var macro source
(do-var v d & body)
 
 Convenience macro for defining varible named `v` with value `d` before `body`
-and returning it after evaluating `body`, that presumably modifies `v`.
Community Examples

spork/misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
+and returning it after evaluating `body`, that presumably modifies `v`.

spork/misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
 
-Same as print-table but pushes table into a buffer.
Community Examples

spork/misc/gett macro source
(gett ds & keys)
+Same as print-table but pushes table into a buffer.

spork/misc/gett macro source
(gett ds & keys)
 
-Recursive macro (get). Similar to get-in, but keys are variadic argument.
Community Examples

spork/misc/insert-sorted function source
(insert-sorted arr <? & xs)
+Recursive macro (get). Similar to get-in, but keys are variadic argument.

spork/misc/insert-sorted function source
(insert-sorted arr <? & xs)
 
 Insert elements in `arr` such that it remains sorted by the comparator. If
-`arr` is not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

spork/misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
+`arr` is not sorted beforehand, the results are undefined. Returns `arr`.

spork/misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
 
 Insert elements in `arr` such that it remains sorted by the value returned
 when `f` is called with the element, comparing the values with <. If `arr` is
-not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

spork/misc/int->string function source
(int->string int &opt base)
+not sorted beforehand, the results are undefined. Returns `arr`.

spork/misc/int->string function source
(int->string int &opt base)
 
-Stringify an integer in a particular base. Defaults to decimal (base 10).
Community Examples

spork/misc/int/ function source
(int/ & xs)
+Stringify an integer in a particular base. Defaults to decimal (base 10).

spork/misc/int/ function source
(int/ & xs)
 
-Perform integer division.
Community Examples

spork/misc/log macro source
(log level & args)
+Perform integer division.

spork/misc/log macro source
(log level & args)
 
 Print to a dynamic binding stream if that stream is set, otherwise do
 nothing. Evaluate to nil. 
 For example, `(log :err "value error: %V" my-value)` will print 
-to `(dyn :err)` only if `(dyn :err)` has been set.
Community Examples

spork/misc/make macro source
(make prototype & pairs)
+to `(dyn :err)` only if `(dyn :err)` has been set.

spork/misc/make macro source
(make prototype & pairs)
 
 Convenience macro for creating new table from even number of kvs pairs in a variadic `table-or-pairs`
 arguments and setting its prototype to `prototype`.
-Factory function for creating new objects from prototypes.
Community Examples

spork/misc/make-id function source
(make-id &opt prefix)
+Factory function for creating new objects from prototypes.

spork/misc/make-id function source
(make-id &opt prefix)
 
 Create a random, printable keyword id with 10 bytes of entropy
-with an optional prefix.
Community Examples

spork/misc/map-keys function source
(map-keys f data)
+with an optional prefix.

spork/misc/map-keys function source
(map-keys f data)
 
 Returns new table with function `f` applied to `data`'s
-keys recursively.
Community Examples

spork/misc/map-vals function source
(map-vals f data)
+keys recursively.

spork/misc/map-vals function source
(map-vals f data)
 
-Returns new table with function `f` applied to `data`'s values.
Community Examples

spork/misc/penultimate function source
(penultimate xs)
+Returns new table with function `f` applied to `data`'s values.

spork/misc/penultimate function source
(penultimate xs)
 
-Get the second-to-last element from an indexed data structure.
Community Examples

spork/misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
+Get the second-to-last element from an indexed data structure.

spork/misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
 
 Iterate through the rows of a data structure and print a table in a human
 readable way, with padding and heading information. Can optionally provide
@@ -393,315 +393,315 @@ 

Spork

for each row. Lastly, a `header-mapping` dictionary can be provided that changes the printed header names by mapping column keys to the desired header name. If no mapping is found, then the column key will be used as -the header name. Returns nil.
Community Examples

spork/misc/randomize-array function source
(randomize-array arr &opt rng)
+the header name. Returns nil.

spork/misc/randomize-array function source
(randomize-array arr &opt rng)
 
 Randomizes array using the fisher-yates shuffle, takes an optional random
-number generator.
Community Examples

spork/misc/second function source
(second xs)
+number generator.

spork/misc/second function source
(second xs)
 
-Get the second element from an indexed data structure.
Community Examples

spork/misc/select-keys function source
(select-keys data keyz)
+Get the second element from an indexed data structure.

spork/misc/select-keys function source
(select-keys data keyz)
 
-Returns new table with selected `keyz` from dictionary `data`.
Community Examples

spork/misc/set* macro source
(set* tgts exprs)
+Returns new table with selected `keyz` from dictionary `data`.

spork/misc/set* macro source
(set* tgts exprs)
 
 Parallel `set` function. Takes a list of targets and
 expressions, evaluates all the expressions, and then
 assigns them to the targets. Each target can be a variable
-or a 2-tuple, just like in the normal `set` special form.
Community Examples

spork/misc/string->int function source
(string->int str &opt base)
+or a 2-tuple, just like in the normal `set` special form.

spork/misc/string->int function source
(string->int str &opt base)
 
 Parse an integer in the given base. Defaults to decimal (base 10). Differs
-from scan-number in that this does not recognize floating point notation.
Community Examples

spork/misc/table-filter function source
(table-filter pred dict)
+from scan-number in that this does not recognize floating point notation.

spork/misc/table-filter function source
(table-filter pred dict)
 
 Filter a key-value structure info a table. Semantics are the same as for
 built-in `filter`, except that `pred` takes two arguments (key and value.)
-Does not consider prototypes.
Community Examples

spork/misc/third function source
(third xs)
+Does not consider prototypes.

spork/misc/third function source
(third xs)
 
-Get the third element from an indexed data structure.
Community Examples

spork/misc/trim-prefix function source
(trim-prefix prefix str)
+Get the third element from an indexed data structure.

spork/misc/trim-prefix function source
(trim-prefix prefix str)
 
-Trim the specified prefix of a string if it has one
Community Examples

spork/misc/trim-suffix function source
(trim-suffix suffix str)
+Trim the specified prefix of a string if it has one

spork/misc/trim-suffix function source
(trim-suffix suffix str)
 
-Trim the specified suffix of a string if it has one
Community Examples

spork/misc/until macro source
(until cnd & body)
+Trim the specified suffix of a string if it has one

spork/misc/until macro source
(until cnd & body)
 
 Repeat `body` while the `cnd` is false.
-Equivalent to (while (not cnd) ;body).
Community Examples

spork/misc/vars macro source
(vars & bindings)
+Equivalent to (while (not cnd) ;body).

spork/misc/vars macro source
(vars & bindings)
 
-Defines many variables as in let `bindings`, but without creating new scope.
Community Examples

spork/msg/make-proto function source
(make-proto stream &opt pack unpack)
+Defines many variables as in let `bindings`, but without creating new scope.

spork/msg/make-proto function source
(make-proto stream &opt pack unpack)
 
-Create both a send an recv function from a stream, as with `make-send` and `make-recv`.
Community Examples

spork/msg/make-recv function source
(make-recv stream &opt unpack)
+Create both a send an recv function from a stream, as with `make-send` and `make-recv`.

spork/msg/make-recv function source
(make-recv stream &opt unpack)
 
-Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.
Community Examples

spork/msg/make-send function source
(make-send stream &opt pack)
+Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.

spork/msg/make-send function source
(make-send stream &opt pack)
 
-Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Community Examples

spork/netrepl/client function source
(client &opt host port name)
+Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.

spork/netrepl/client function source
(client &opt host port name)
 
-Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".
Community Examples

spork/netrepl/default-host string source
Default host to run server on and connect to.
Community Examples

spork/netrepl/default-port string source
Default port to run the net repl.
Community Examples

spork/netrepl/server function source
(server &opt host port env cleanup welcome-msg)
+Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".

spork/netrepl/default-host string source
Default host to run server on and connect to.

spork/netrepl/default-port string source
Default port to run the net repl.

spork/netrepl/server function source
(server &opt host port env cleanup welcome-msg)
 
-Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.
Community Examples

spork/netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
+Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.

spork/netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
 
-Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Community Examples

spork/path/abspath function source
(posix/abspath path)
+Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.

spork/path/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

spork/path/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/basename function source
(posix/basename path)
+Check if a path is absolute.

spork/path/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/delim string source
Platform delimiter
Community Examples

spork/path/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

spork/path/delim string source
Platform delimiter

spork/path/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/join function source
(posix/join & els)
+Get the file extension for a path.

spork/path/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

spork/path/normalize function source
(posix/normalize path)
+Join path elements together.

spork/path/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/posix/abspath function source
(posix/abspath path)
+Split a path into its parts.

spork/path/posix/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/posix/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

spork/path/posix/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/posix/basename function source
(posix/basename path)
+Check if a path is absolute.

spork/path/posix/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/posix/delim string source
Platform delimiter
Community Examples

spork/path/posix/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

spork/path/posix/delim string source
Platform delimiter

spork/path/posix/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/posix/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/posix/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/posix/join function source
(posix/join & els)
+Get the file extension for a path.

spork/path/posix/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

spork/path/posix/normalize function source
(posix/normalize path)
+Join path elements together.

spork/path/posix/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/posix/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/posix/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/posix/relpath function source
(posix/relpath source target)
+Split a path into its parts.

spork/path/posix/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/posix/sep string source
Platform separator
Community Examples

spork/path/relpath function source
(posix/relpath source target)
+Get the relative path between two subpaths.

spork/path/posix/sep string source
Platform separator

spork/path/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/sep string source
Platform separator
Community Examples

spork/path/win32/abspath function source
(win32/abspath path)
+Get the relative path between two subpaths.

spork/path/sep string source
Platform separator

spork/path/win32/abspath function source
(win32/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/win32/abspath? function source
(win32/abspath? path)
+Coerce a path to be absolute.

spork/path/win32/abspath? function source
(win32/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/win32/basename function source
(win32/basename path)
+Check if a path is absolute.

spork/path/win32/basename function source
(win32/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/win32/delim string source
Platform delimiter
Community Examples

spork/path/win32/dirname function source
(win32/dirname path)
+Gets the base file name of a path.

spork/path/win32/delim string source
Platform delimiter

spork/path/win32/dirname function source
(win32/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/win32/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/win32/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/win32/join function source
(win32/join & els)
+Get the file extension for a path.

spork/path/win32/join function source
(win32/join & els)
 
-Join path elements together.
Community Examples

spork/path/win32/normalize function source
(win32/normalize path)
+Join path elements together.

spork/path/win32/normalize function source
(win32/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/win32/parts function source
(win32/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/win32/parts function source
(win32/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/win32/relpath function source
(win32/relpath source target)
+Split a path into its parts.

spork/path/win32/relpath function source
(win32/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/win32/sep string source
Platform separator
Community Examples

spork/rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
+Get the relative path between two subpaths.

spork/path/win32/sep string source
Platform separator

spork/rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
 
-Begin raw terminal functionality. Return a stream that can be read from to get input.
Community Examples

spork/rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
+Begin raw terminal functionality. Return a stream that can be read from to get input.

spork/rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
 
-Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.
Community Examples

spork/rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
+Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.

spork/rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
 
-A handler that a user can use to handle ctrl-z from input to suspend the current process.
Community Examples

spork/rawterm/end cfunction source
(rawterm/end)
+A handler that a user can use to handle ctrl-z from input to suspend the current process.

spork/rawterm/end cfunction source
(rawterm/end)
 
-End raw terminal functionality.
Community Examples

spork/rawterm/getch cfunction source
(rawterm/getch &opt into)
+End raw terminal functionality.

spork/rawterm/getch cfunction source
(rawterm/getch &opt into)
 
-Get a byte of input from stdin, without blocking if possible. Returns a buffer.
Community Examples

spork/rawterm/isatty cfunction source
(rawterm/isatty)
+Get a byte of input from stdin, without blocking if possible. Returns a buffer.

spork/rawterm/isatty cfunction source
(rawterm/isatty)
 
-Check if the current stdin is a tty.
Community Examples

spork/rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
+Check if the current stdin is a tty.

spork/rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
 
-Measure the monospace width of a string.
Community Examples

spork/rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
+Measure the monospace width of a string.

spork/rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
 
-Get the monospace width of a rune. Returns either 0, 1, or 2.
Community Examples

spork/rawterm/size cfunction source
(rawterm/size)
+Get the monospace width of a rune. Returns either 0, 1, or 2.

spork/rawterm/size cfunction source
(rawterm/size)
 
-Get the number of rows and columns visible in the terminal as tuple [rows cols]
Community Examples

spork/rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
+Get the number of rows and columns visible in the terminal as tuple [rows cols]

spork/rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
 
-Get a byte slice that will fit into a number of columns.
Community Examples

spork/regex/compile function source
(compile pattern)
+Get a byte slice that will fit into a number of columns.

spork/regex/compile function source
(compile pattern)
 
-Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.
Community Examples

spork/regex/find function source
(find reg text &opt start)
+Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.

spork/regex/find function source
(find reg text &opt start)
 
-Similar to peg/find, but for regexes.
Community Examples

spork/regex/find-all function source
(find-all reg text &opt start)
+Similar to peg/find, but for regexes.

spork/regex/find-all function source
(find-all reg text &opt start)
 
-Similar to peg/find-all, but for regexes.
Community Examples

spork/regex/match function source
(match reg text &opt start)
+Similar to peg/find-all, but for regexes.

spork/regex/match function source
(match reg text &opt start)
 
-Similar to peg/match, but for regexes.
Community Examples

spork/regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.
Community Examples

spork/regex/replace function source
(replace reg rep text &opt start)
+Similar to peg/match, but for regexes.

spork/regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.

spork/regex/replace function source
(replace reg rep text &opt start)
 
-Similar to peg/replace, but for regexes.
Community Examples

spork/regex/replace-all function source
(replace-all reg rep text &opt start)
+Similar to peg/replace, but for regexes.

spork/regex/replace-all function source
(replace-all reg rep text &opt start)
 
-Similar to peg/replace-all, but for regexes.
Community Examples

spork/regex/source function source
(source pattern)
+Similar to peg/replace-all, but for regexes.

spork/regex/source function source
(source pattern)
 
-Compile a subset of regex to PEG source code.
Community Examples

spork/rpc/client function source
(client &opt host port name)
+Compile a subset of regex to PEG source code.

spork/rpc/client function source
(client &opt host port name)
 
-Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.
Community Examples

spork/rpc/default-host string source
Default host to run server on and connect to.
Community Examples

spork/rpc/default-port string source
Default port to run the net repl.
Community Examples

spork/rpc/server function source
(server functions &opt host port workers-per-connection)
+Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.

spork/rpc/default-host string source
Default host to run server on and connect to.

spork/rpc/default-port string source
Default port to run the net repl.

spork/rpc/server function source
(server functions &opt host port workers-per-connection)
 
-Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Community Examples

spork/schema/make-predicate function source
(make-predicate schema)
+Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.

spork/schema/make-predicate function source
(make-predicate schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `predicate`.
Community Examples

spork/schema/make-validator function source
(make-validator schema)
+Generate a function that can be used to validate a data structure. This is the function form of `predicate`.

spork/schema/make-validator function source
(make-validator schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `validator`.
Community Examples

spork/schema/predicate macro source
(predicate pattern)
+Generate a function that can be used to validate a data structure. This is the function form of `validator`.

spork/schema/predicate macro source
(predicate pattern)
 
-Make a validation predicate given a certain schema.
Community Examples

spork/schema/validator macro source
(validator pattern)
+Make a validation predicate given a certain schema.

spork/schema/validator macro source
(validator pattern)
 
-Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Community Examples

spork/services/*current-manager* keyword source
The currently running service manager, if there is one
Community Examples

spork/services/*current-service* keyword source
The currently running service, if there is one
Community Examples

spork/services/add-service function source
(add-service service-name main-function & args)
+Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.

spork/services/*current-manager* keyword source
The currently running service manager, if there is one

spork/services/*current-service* keyword source
The currently running service, if there is one

spork/services/add-service function source
(add-service service-name main-function & args)
 
-Spawn a service
Community Examples

spork/services/all-services function source
(all-services)
+Spawn a service

spork/services/all-services function source
(all-services)
 
-Get a list of running services
Community Examples

spork/services/get-manager function source
(get-manager)
+Get a list of running services

spork/services/get-manager function source
(get-manager)
 
-Get the current manager. If no manager exists, create one.
Community Examples

spork/services/get-service function source
(get-service)
+Get the current manager. If no manager exists, create one.

spork/services/get-service function source
(get-service)
 
-Get the current service. If not in a service, raise an error
Community Examples

spork/services/make-manager function source
(make-manager &opt log-dir)
+Get the current service. If not in a service, raise an error

spork/services/make-manager function source
(make-manager &opt log-dir)
 
-Group a number of fibers into a single object for structured concurrency. Also includes utilities for running services like servers in the background.
Community Examples

spork/services/print-all function source
(print-all &opt filter-fn)
+Group a number of fibers into a single object for structured concurrency. Also includes utilities for running services like servers in the background.

spork/services/print-all function source
(print-all &opt filter-fn)
 
-Print a table of all running services.
Community Examples

spork/services/remove-service function source
(remove-service service-name)
+Print a table of all running services.

spork/services/remove-service function source
(remove-service service-name)
 
-Remove a service
Community Examples

spork/services/set-title function source
(set-title title)
+Remove a service

spork/services/set-title function source
(set-title title)
 
-Set a textual description of the service to describe what it is doing currently
Community Examples

spork/services/start-service function source
(start-service service-name)
+Set a textual description of the service to describe what it is doing currently

spork/services/start-service function source
(start-service service-name)
 
-Start or restart a service
Community Examples

spork/services/stop-service function source
(stop-service service-name &opt reason)
+Start or restart a service

spork/services/stop-service function source
(stop-service service-name &opt reason)
 
-Stop a running service
Community Examples

spork/services/wait function source
(wait)
+Stop a running service

spork/services/wait function source
(wait)
 
-Once a number of services have been spawned, call `wait` to block the fiber until the manager is canceled. This lets a manager fiber behave as a service itself.
Community Examples

spork/sh/copy function source
(copy src dest)
+Once a number of services have been spawned, call `wait` to block the fiber until the manager is canceled. This lets a manager fiber behave as a service itself.

spork/sh/copy function source
(copy src dest)
 
 Copy a file or directory recursively from one location to another.
-Expects input to be unix style paths
Community Examples

spork/sh/copy-file function source
(copy-file src-path dst-path)
+Expects input to be unix style paths

spork/sh/copy-file function source
(copy-file src-path dst-path)
 
-Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.
Community Examples

spork/sh/create-dirs function source
(create-dirs dir-path)
+Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.

spork/sh/create-dirs function source
(create-dirs dir-path)
 
-Create all directories in path specified as string including itself.
Community Examples

spork/sh/devnull function source
(devnull)
+Create all directories in path specified as string including itself.

spork/sh/devnull function source
(devnull)
 
-get the /dev/null equivalent of the current platform as an open file
Community Examples

spork/sh/escape function source
(escape & args)
+get the /dev/null equivalent of the current platform as an open file

spork/sh/escape function source
(escape & args)
 
-Output a string with all arguments correctly quoted
Community Examples

spork/sh/exec function source
(exec & args)
+Output a string with all arguments correctly quoted

spork/sh/exec function source
(exec & args)
 
-Execute command specified by args returning it's exit code
Community Examples

spork/sh/exec-fail function source
(exec-fail & args)
+Execute command specified by args returning it's exit code

spork/sh/exec-fail function source
(exec-fail & args)
 
-Execute command specified by args, fails when command exits with non-zero exit code
Community Examples

spork/sh/exec-slurp function source
(exec-slurp & args)
+Execute command specified by args, fails when command exits with non-zero exit code

spork/sh/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of command specified by args and return it trimmed in a string.
Community Examples

spork/sh/exec-slurp-all function source
(exec-slurp-all & args)
+Read stdout of command specified by args and return it trimmed in a string.

spork/sh/exec-slurp-all function source
(exec-slurp-all & args)
 
 Read stdout and stderr of subprocess and return it trimmed in a struct with :err and :out containing the output as string.
-This will also return the exit code under the :status key.
Community Examples

spork/sh/exists? function source
(exists? path)
+This will also return the exit code under the :status key.

spork/sh/exists? function source
(exists? path)
 
-Check if the given file or directory exists. (Follows symlinks)
Community Examples

spork/sh/list-all-files function source
(list-all-files dir &opt into)
+Check if the given file or directory exists. (Follows symlinks)

spork/sh/list-all-files function source
(list-all-files dir &opt into)
 
-List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.
Community Examples

spork/sh/make-new-file function source
(make-new-file file-path &opt mode)
+List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.

spork/sh/make-new-file function source
(make-new-file file-path &opt mode)
 
-Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).
Community Examples

spork/sh/rm function source
(rm path)
+Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).

spork/sh/rm function source
(rm path)
 
-Remove a directory and all sub directories recursively.
Community Examples

spork/sh/scan-directory function source
(scan-directory dir func)
+Remove a directory and all sub directories recursively.

spork/sh/scan-directory function source
(scan-directory dir func)
 
-Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.
Community Examples

spork/sh/split function source
(split s)
+Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.

spork/sh/split function source
(split s)
 
-Split a string into 'sh like' tokens, returns nil if unable to parse the string.
Community Examples

spork/tarray/buffer cfunction
(tarray/buffer array|size)
+Split a string into 'sh like' tokens, returns nil if unable to parse the string.

spork/tarray/buffer cfunction
(tarray/buffer array|size)
 
-Return typed array buffer or create a new buffer.
Community Examples

spork/tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
+Return typed array buffer or create a new buffer.

spork/tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
 
-Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.
Community Examples

spork/tarray/length cfunction
(tarray/length array|buffer)
+Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.

spork/tarray/length cfunction
(tarray/length array|buffer)
 
-Return typed array or buffer size.
Community Examples

spork/tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
+Return typed array or buffer size.

spork/tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
 
-Create new typed array.
Community Examples

spork/tarray/properties cfunction
(tarray/properties array)
+Create new typed array.

spork/tarray/properties cfunction
(tarray/properties array)
 
-Return typed array properties as a struct.
Community Examples

spork/tarray/slice cfunction
(tarray/slice tarr &opt start end)
+Return typed array properties as a struct.

spork/tarray/slice cfunction
(tarray/slice tarr &opt start end)
 
-Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.
Community Examples

spork/tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
+Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.

spork/tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
 
-Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Community Examples

spork/tasker/all-tasks function source
(all-tasks tasker &opt detailed)
+Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.

spork/tasker/all-tasks function source
(all-tasks tasker &opt detailed)
 
-Get an array of all task ids for which there is still data on disk. If `detailed` is truthy, return full task metadata instead of ids.
Community Examples

spork/tasker/cancel-task function source
(cancel-task tasker task-id)
+Get an array of all task ids for which there is still data on disk. If `detailed` is truthy, return full task metadata instead of ids.

spork/tasker/cancel-task function source
(cancel-task tasker task-id)
 
-Cancel a queued or running task.
Community Examples

spork/tasker/close-queues function source
(close-queues tasker)
+Cancel a queued or running task.

spork/tasker/close-queues function source
(close-queues tasker)
 
-Prevent any tasks from being added to queues. When an executor finishes it's current job, if there are any, it will terminate. When all executors complete, the call to `run-executors` will complete.
Community Examples

spork/tasker/default-expiration number source
Default expiration time (1 day)
Community Examples

spork/tasker/default-priority number source
Default task priority
Community Examples

spork/tasker/default-task-directory string source
Default location of task records
Community Examples

spork/tasker/err-file-name string source
Name of the file for logging errors
Community Examples

spork/tasker/max-priority number source
Maximum allowed priority (lower priority tasks will execute first)
Community Examples

spork/tasker/min-priority number source
Minimum allowed priority (lower priority tasks will execute first)
Community Examples

spork/tasker/new-tasker function source
(new-tasker &opt task-directory queues queue-size)
+Prevent any tasks from being added to queues. When an executor finishes it's current job, if there are any, it will terminate. When all executors complete, the call to `run-executors` will complete.

spork/tasker/default-expiration number source
Default expiration time (1 day)

spork/tasker/default-priority number source
Default task priority

spork/tasker/default-task-directory string source
Default location of task records

spork/tasker/err-file-name string source
Name of the file for logging errors

spork/tasker/max-priority number source
Maximum allowed priority (lower priority tasks will execute first)

spork/tasker/min-priority number source
Minimum allowed priority (lower priority tasks will execute first)

spork/tasker/new-tasker function source
(new-tasker &opt task-directory queues queue-size)
 
-Create queues and various settings to run tasks. Create a new tasker table.
Community Examples

spork/tasker/out-file-name string source
Name of the file for general logging
Community Examples

spork/tasker/queue-task function source
(queue-task tasker argv &opt note priority qname timeout expiration input)
+Create queues and various settings to run tasks. Create a new tasker table.

spork/tasker/out-file-name string source
Name of the file for general logging

spork/tasker/queue-task function source
(queue-task tasker argv &opt note priority qname timeout expiration input)
 
-Add a task specification to a queue. Supply an argv string array that will be used to invoke s a subprocess. The optional `note` parameter is just a textual note for task trackingv. The `priority` parameter should be an integer between 0 and 9 inclusive, default is 4. Lower priority jobs in the same queue will be executed by higher priority. Use input to pass in generic, unstructured input to a task.
Community Examples

spork/tasker/run-cleanup function source
(run-cleanup tasker)
+Add a task specification to a queue. Supply an argv string array that will be used to invoke s a subprocess. The optional `note` parameter is just a textual note for task trackingv. The `priority` parameter should be an integer between 0 and 9 inclusive, default is 4. Lower priority jobs in the same queue will be executed by higher priority. Use input to pass in generic, unstructured input to a task.

spork/tasker/run-cleanup function source
(run-cleanup tasker)
 
-Delete old expired jobs saved on disk
Community Examples

spork/tasker/run-executors function source
(run-executors tasker &opt workers-per-queue pre-task post-task)
+Delete old expired jobs saved on disk

spork/tasker/run-executors function source
(run-executors tasker &opt workers-per-queue pre-task post-task)
 
-Start a number of executors to run tasks as with `tasker/spawn-executors`, and then wait for all executors to complete.
Community Examples

spork/tasker/spawn-executors function source
(spawn-executors tasker &opt qnames workers-per-queue pre-task post-task)
+Start a number of executors to run tasks as with `tasker/spawn-executors`, and then wait for all executors to complete.

spork/tasker/spawn-executors function source
(spawn-executors tasker &opt qnames workers-per-queue pre-task post-task)
 
-Start a number of executors to run tasks. Tasks can be added to a queue by calling queue-task. A single tasker object can make multiple calls to spawn-executors.
Community Examples

spork/tasker/statuses tuple source
A tuple of all possible statuses that a task can have.
Community Examples

spork/tasker/task-file function source
(task-file tasker task-id &opt file-name)
+Start a number of executors to run tasks. Tasks can be added to a queue by calling queue-task. A single tasker object can make multiple calls to spawn-executors.

spork/tasker/statuses tuple source
A tuple of all possible statuses that a task can have.

spork/tasker/task-file function source
(task-file tasker task-id &opt file-name)
 
-Get a log file for a path. By default, will get a path to out.log.
Community Examples

spork/tasker/task-meta-name string source
Name of the task metadata file
Community Examples

spork/tasker/task-status function source
(task-status tasker task-id)
+Get a log file for a path. By default, will get a path to out.log.

spork/tasker/task-meta-name string source
Name of the task metadata file

spork/tasker/task-status function source
(task-status tasker task-id)
 
-Look up the status of a given task by id.
Community Examples

spork/temple/add-loader function source
(add-loader)
+Look up the status of a given task by id.

spork/temple/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

spork/temple/base-env table source
Base environment for rendering
Community Examples

spork/temple/compile function source
(compile str)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

spork/temple/base-env table source
Base environment for rendering

spork/temple/compile function source
(compile str)
 
 Compile a Temple template into a function which will return a
 rendered buffer.
 
 The resulting function should receive the template arguments in the
-&keys format.
Community Examples

spork/temple/create function source
(create source &opt where)
+&keys format.

spork/temple/create function source
(create source &opt where)
 
-Compile a template string into a function. Optionally provide a location where the source is from to improve debugging. Returns the template function.
Community Examples

spork/test/assert macro source
(assert x &opt e)
+Compile a template string into a function. Optionally provide a location where the source is from to improve debugging. Returns the template function.

spork/test/assert macro source
(assert x &opt e)
 
-Override's the default assert with some nice error handling.
Community Examples

spork/test/assert-docs function source
(assert-docs path)
+Override's the default assert with some nice error handling.

spork/test/assert-docs function source
(assert-docs path)
 
 Assert that all symbols, when module on the path is required,
-have proper doc string
Community Examples

spork/test/assert-error macro source
(assert-error msg & forms)
+have proper doc string

spork/test/assert-error macro source
(assert-error msg & forms)
 
-Test passes if forms error.
Community Examples

spork/test/assert-no-error macro source
(assert-no-error msg & forms)
+Test passes if forms error.

spork/test/assert-no-error macro source
(assert-no-error msg & forms)
 
-Test passes if forms do not error.
Community Examples

spork/test/assert-not macro source
(assert-not x &opt e)
+Test passes if forms do not error.

spork/test/assert-not macro source
(assert-not x &opt e)
 
-Invert assert.
Community Examples

spork/test/capture-stderr macro source
(capture-stderr & body)
+Invert assert.

spork/test/capture-stderr macro source
(capture-stderr & body)
 
 Runs the form and captures stderr. Returns tuple with result of the form
-and a string with captured stderr.
Community Examples

spork/test/capture-stdout macro source
(capture-stdout & body)
+and a string with captured stderr.

spork/test/capture-stdout macro source
(capture-stdout & body)
 
 Runs the form and captures stdout. Returns tuple with result of the form
-and a string with captured stdout.
Community Examples

spork/test/end-suite function source
(end-suite)
+and a string with captured stdout.

spork/test/end-suite function source
(end-suite)
 
-Ends test suite, prints summary and exits if any have failed.
Community Examples

spork/test/start-suite function source
(start-suite &opt name)
+Ends test suite, prints summary and exits if any have failed.

spork/test/start-suite function source
(start-suite &opt name)
 
-Starts test suite.
Community Examples

spork/test/suppress-stderr macro source
(suppress-stderr & body)
+Starts test suite.

spork/test/suppress-stderr macro source
(suppress-stderr & body)
 
-Suppreses stdout from the body
Community Examples

spork/test/suppress-stdout macro source
(suppress-stdout & body)
+Suppreses stdout from the body

spork/test/suppress-stdout macro source
(suppress-stdout & body)
 
-Suppreses stdout from the body
Community Examples

spork/test/timeit macro source
(timeit form &opt tag)
+Suppreses stdout from the body

spork/test/timeit macro source
(timeit form &opt tag)
 
 Time the execution of `form` using `os/clock` before and after,
 and print the result to stdout. returns: result of executing `form`.
-Uses `tag` (default "Elapsed time:") to tag the printout.
Community Examples

spork/test/timeit-loop macro source
(timeit-loop head & body)
+Uses `tag` (default "Elapsed time:") to tag the printout.

spork/test/timeit-loop macro source
(timeit-loop head & body)
 
 Similar to `loop`, but outputs performance statistics after completion.
 Additionally defines a `:timeout` verb to iterate continuously for a given
 number of seconds. If the first form of `body` is a bytes, it will be taken
-as a custom tag.
Community Examples

spork/utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
+as a custom tag.

spork/utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
 
-Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].
Community Examples

spork/utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
+Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].

spork/utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
 
-Encode a Unicode codepoint into the end of a buffer.
Community Examples

spork/utf8/prefix->width cfunction source
(utf8/prefix->width c)
+Encode a Unicode codepoint into the end of a buffer.

spork/utf8/prefix->width cfunction source
(utf8/prefix->width c)
 
-Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Community Examples

spork/zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
+Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.

spork/zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
 
-Add a byte sequence to the zip writer.
Community Examples

spork/zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
+Add a byte sequence to the zip writer.

spork/zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
 
-Add a file to the zip writer.
Community Examples

spork/zip/compress cfunction source
(zip/compress bytes &opt level into)
+Add a file to the zip writer.

spork/zip/compress cfunction source
(zip/compress bytes &opt level into)
 
-Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.
Community Examples

spork/zip/decompress cfunction source
(zip/decompress bytes &opt into)
+Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.

spork/zip/decompress cfunction source
(zip/decompress bytes &opt into)
 
-Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.
Community Examples

spork/zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
+Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.

spork/zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
 
-Extract a file from the zip archive, either to memory or to a file on disk.
Community Examples

spork/zip/file-directory? cfunction source
(zip/file-directory? reader idx)
+Extract a file from the zip archive, either to memory or to a file on disk.

spork/zip/file-directory? cfunction source
(zip/file-directory? reader idx)
 
-Check if a file index is a directory.
Community Examples

spork/zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
+Check if a file index is a directory.

spork/zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
 
-Check if a file is encrypted inside an archive.
Community Examples

spork/zip/file-supported? cfunction source
(zip/file-supported? reader idx)
+Check if a file is encrypted inside an archive.

spork/zip/file-supported? cfunction source
(zip/file-supported? reader idx)
 
-Check if a file is supported with this verstion of miniz.
Community Examples

spork/zip/get-filename cfunction source
(zip/get-filename reader idx)
+Check if a file is supported with this verstion of miniz.

spork/zip/get-filename cfunction source
(zip/get-filename reader idx)
 
-Convert a file index index in the archive to a filename.
Community Examples

spork/zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
+Convert a file index index in the archive to a filename.

spork/zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
 
-Get the index of a particular filename in the archive.
Community Examples

spork/zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
+Get the index of a particular filename in the archive.

spork/zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
 
-Read a byte sequence as a zip archive. Returns a new zip reader.
Community Examples

spork/zip/read-file cfunction source
(zip/read-file filename &opt flags)
+Read a byte sequence as a zip archive. Returns a new zip reader.

spork/zip/read-file cfunction source
(zip/read-file filename &opt flags)
 
-Read a file as a zip archive. Returns a new zip reader.
Community Examples

spork/zip/reader-close cfunction source
(zip/reader-close reader)
+Read a file as a zip archive. Returns a new zip reader.

spork/zip/reader-close cfunction source
(zip/reader-close reader)
 
-Close a reader and free related memory.
Community Examples

spork/zip/reader-count cfunction source
(zip/reader-count reader)
+Close a reader and free related memory.

spork/zip/reader-count cfunction source
(zip/reader-count reader)
 
-Get the number of files inside the zip archive. The files can be indexed 
Community Examples

spork/zip/stat cfunction source
(zip/stat reader idx)
+Get the number of files inside the zip archive. The files can be indexed 

spork/zip/stat cfunction source
(zip/stat reader idx)
 
 Get stat information of file. Returns a new struct with the following fields:
 
@@ -718,17 +718,17 @@ 

Spork

* :comment * :internal-attr * :external-attr -
Community Examples

spork/zip/version cfunction source
(zip/version)
+

spork/zip/version cfunction source
(zip/version)
 
-Get the version string of the underlying miniz library.
Community Examples

spork/zip/write-buffer cfunction source
(zip/write-buffer)
+Get the version string of the underlying miniz library.

spork/zip/write-buffer cfunction source
(zip/write-buffer)
 
-Create a new zip archive writer that write to memory.
Community Examples

spork/zip/write-file cfunction source
(zip/write-file dest-path)
+Create a new zip archive writer that write to memory.

spork/zip/write-file cfunction source
(zip/write-file dest-path)
 
-Create a new zip archive writer that will write into an archive file.
Community Examples

spork/zip/writer-close cfunction source
(zip/writer-close writer)
+Create a new zip archive writer that will write into an archive file.

spork/zip/writer-close cfunction source
(zip/writer-close writer)
 
-Close a ZipWriter.
Community Examples

spork/zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
+Close a ZipWriter.

spork/zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
 
-Finalize a writer, writing any zip files to disk. Return the writer.
Community Examples
+Finalize a writer, writing any zip files to disk. Return the writer.
Parser Module Argument Parsing diff --git a/static/1.29.1/api/spork/json.html b/static/1.29.1/api/spork/json.html index d1d434e3..0368dd3a 100644 --- a/static/1.29.1/api/spork/json.html +++ b/static/1.29.1/api/spork/json.html @@ -118,9 +118,9 @@

Index

json/decode json/encode


json/decode cfunction
(json/decode json-source &opt keywords nils)
 
-Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.
Community Examples

json/encode cfunction
(json/encode x &opt tab newline buf)
+Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.

json/encode cfunction
(json/encode x &opt tab newline buf)
 
-Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
Community Examples
+Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
HTTP Framework Math extended diff --git a/static/1.29.1/api/spork/math.html b/static/1.29.1/api/spork/math.html index 58a47a42..c952e394 100644 --- a/static/1.29.1/api/spork/math.html +++ b/static/1.29.1/api/spork/math.html @@ -119,144 +119,144 @@

Index

math/add math/add-to-mean math/approx-eq math/bernoulli-distribution math/binominal-coeficient math/binominal-distribution math/check-probability math/chi-squared-distribution-table math/cols math/cumulative-std-normal-probability math/det math/dot math/epsilon math/extent math/factorial math/geometric-mean math/get-only-el math/harmonic-mean math/ident math/interquartile-range math/linear-regression math/linear-regression-line math/median math/median-absolute-deviation math/minor math/mode math/mop math/mul math/perm math/permutation-test math/permutations math/poisson-distribution math/quantile math/quantile-rank math/quantile-rank-sorted math/quantile-sorted math/quickselect math/relative-err math/root-mean-square math/rows math/sample-correlation math/sample-covariance math/sample-skewness math/sample-standard-deviation math/sample-variance math/scalar math/shuffle-in-place math/size math/sop math/standard-deviation math/standard-normal-table math/sum-compensated math/sum-nth-power-deviations math/swap math/t-test math/t-test-2 math/trans math/variance math/z-score math/zero


math/add function source
(add m a)
 
 Add `a` to matrix `m` where it can be matrix or scalar.
-Matrix `m` is mutated.
Community Examples

math/add-to-mean function source
(add-to-mean m n v)
+Matrix `m` is mutated.

math/add-to-mean function source
(add-to-mean m n v)
 
-Adds new value `v` to mean `m` from `n` values.
Community Examples

math/approx-eq function source
(approx-eq a e &opt t)
+Adds new value `v` to mean `m` from `n` values.

math/approx-eq function source
(approx-eq a e &opt t)
 
 Approximate equality between actual number `a`
 and expected number `e`. Default tolerance `t`
-is `epsilon`.
Community Examples

math/bernoulli-distribution function source
(bernoulli-distribution p)
+is `epsilon`.

math/bernoulli-distribution function source
(bernoulli-distribution p)
 
-Creates Bernoulli distribution from popability `p` in the tuple.
Community Examples

math/binominal-coeficient function source
(binominal-coeficient n k)
+Creates Bernoulli distribution from popability `p` in the tuple.

math/binominal-coeficient function source
(binominal-coeficient n k)
 
 Computes binominal coeficient from set of size `n`
-and sample size `k`.
Community Examples

math/binominal-distribution function source
(binominal-distribution t p)
+and sample size `k`.

math/binominal-distribution function source
(binominal-distribution t p)
 
 Creates binominal distribution from trials `t`
-and probability `p` in the tuple.
Community Examples

math/check-probability function source
(check-probability p)
+and probability `p` in the tuple.

math/check-probability function source
(check-probability p)
 
-Asserts that probability in in the [0 1] range.
Community Examples

math/chi-squared-distribution-table struct source
Chi Squared distribution table.
Community Examples

math/cols function source
(cols m)
+Asserts that probability in in the [0 1] range.

math/chi-squared-distribution-table struct source
Chi Squared distribution table.

math/cols function source
(cols m)
 
-Returns numbers of columns of matrix `m`.
Community Examples

math/cumulative-std-normal-probability function source
(cumulative-std-normal-probability z)
+Returns numbers of columns of matrix `m`.

math/cumulative-std-normal-probability function source
(cumulative-std-normal-probability z)
 
-Computes standard normal probability for `y`.
Community Examples

math/det function source
(det m)
+Computes standard normal probability for `y`.

math/det function source
(det m)
 
-Computes determinant of matrix `m`.
Community Examples

math/dot function source
(dot mx my)
+Computes determinant of matrix `m`.

math/dot function source
(dot mx my)
 
-Computes dot product of matrices or vectors `x` and `y`.
Community Examples

math/epsilon number source
Epsilon constant
Community Examples

math/extent function source
(extent xs)
+Computes dot product of matrices or vectors `x` and `y`.

math/epsilon number source
Epsilon constant

math/extent function source
(extent xs)
 
-Returns the minimum & maximum number in an `xs` as tuple.
Community Examples

math/factorial function source
(factorial n)
+Returns the minimum & maximum number in an `xs` as tuple.

math/factorial function source
(factorial n)
 
-Returns factorial of `n`.
Community Examples

math/geometric-mean function source
(geometric-mean xs)
+Returns factorial of `n`.

math/geometric-mean function source
(geometric-mean xs)
 
-Gets the geometric mean from `xs`.
Community Examples

math/get-only-el macro source
(get-only-el m)
+Gets the geometric mean from `xs`.

math/get-only-el macro source
(get-only-el m)
 
 Convenience macro for geting first element
-from first row of the two dimensional array `m`.
Community Examples

math/harmonic-mean function source
(harmonic-mean xs)
+from first row of the two dimensional array `m`.

math/harmonic-mean function source
(harmonic-mean xs)
 
-Gets the harmonic mean from `xs`.
Community Examples

math/ident function source
(ident c)
+Gets the harmonic mean from `xs`.

math/ident function source
(ident c)
 
-Creates identity matrix with `c` x `c` size.
Community Examples

math/interquartile-range function source
(interquartile-range xs)
+Creates identity matrix with `c` x `c` size.

math/interquartile-range function source
(interquartile-range xs)
 
-Gets the interquartile range from `xs`.
Community Examples

math/linear-regression function source
(linear-regression coords)
+Gets the interquartile range from `xs`.

math/linear-regression function source
(linear-regression coords)
 
 Computes the slope `:m` and y-intercept `:b`
-of the function in the struct from set of coordinates.
Community Examples

math/linear-regression-line function source
(linear-regression-line {:m m :b b})
+of the function in the struct from set of coordinates.

math/linear-regression-line function source
(linear-regression-line {:m m :b b})
 
-Constructs function from struct returned by linear regression.
Community Examples

math/median function source
(median xs)
+Constructs function from struct returned by linear regression.

math/median function source
(median xs)
 
-Gets the median value from `xs`
Community Examples

math/median-absolute-deviation function source
(median-absolute-deviation xs)
+Gets the median value from `xs`

math/median-absolute-deviation function source
(median-absolute-deviation xs)
 
-Gets median absolute deviation from `xs`.
Community Examples

math/minor function source
(minor m x y)
+Gets median absolute deviation from `xs`.

math/minor function source
(minor m x y)
 
-Computes minor matrix of matrix `m` and `x`, `y`.
Community Examples

math/mode function source
(mode xs)
+Computes minor matrix of matrix `m` and `x`, `y`.

math/mode function source
(mode xs)
 
-Gets the mode value from `xs`.
Community Examples

math/mop function source
(mop m op a)
+Gets the mode value from `xs`.

math/mop function source
(mop m op a)
 
 Mutates every cell of the matrix `m` with `op`
-and corresponding cell from matrix arg `a`.
Community Examples

math/mul function source
(mul m a)
+and corresponding cell from matrix arg `a`.

math/mul function source
(mul m a)
 
 Multiply matrix `m` with `a` which can be matrix or vector.
-Matrix `m` is mutated.
Community Examples

math/perm function source
(perm m)
+Matrix `m` is mutated.

math/perm function source
(perm m)
 
-Computes permanent of the matrix `m`.
Community Examples

math/permutation-test function source
(permutation-test xs ys &opt a k)
+Computes permanent of the matrix `m`.

math/permutation-test function source
(permutation-test xs ys &opt a k)
 
 Conducts a permutation test to determine if two data sets
 `xs` and `ys` are *significantly* different from each other.
 You can use alternative hypotesis `a`, which defaults to `:two-side`,
 with `:greater` and `:lesser` being the other two options.
 The last optional argument is `k` number of values
-in permutation distribution
Community Examples

math/permutations function source
(permutations s &opt k)
+in permutation distribution

math/permutations function source
(permutations s &opt k)
 
-Returns permutations of length `k` from members of `s`
Community Examples

math/poisson-distribution function source
(poisson-distribution lambda)
+Returns permutations of length `k` from members of `s`

math/poisson-distribution function source
(poisson-distribution lambda)
 
-Creates Poisson distribution from `lambda` in tuple.
Community Examples

math/quantile function source
(quantile xs p)
+Creates Poisson distribution from `lambda` in tuple.

math/quantile function source
(quantile xs p)
 
-Gets the quantile value from `xs` at `p` from unsorted population.
Community Examples

math/quantile-rank function source
(quantile-rank xs p)
+Gets the quantile value from `xs` at `p` from unsorted population.

math/quantile-rank function source
(quantile-rank xs p)
 
-Gets the quantile rank of value `v` from unsorted `xs`.
Community Examples

math/quantile-rank-sorted function source
(quantile-rank-sorted xs v)
+Gets the quantile rank of value `v` from unsorted `xs`.

math/quantile-rank-sorted function source
(quantile-rank-sorted xs v)
 
-Gets the quantile rank of value `v` from sorted `xs`.
Community Examples

math/quantile-sorted function source
(quantile-sorted xs p)
+Gets the quantile rank of value `v` from sorted `xs`.

math/quantile-sorted function source
(quantile-sorted xs p)
 
-Gets the quantile value from `xs` at `p` from sorted population.
Community Examples

math/quickselect function source
(quickselect arr k &opt left right)
+Gets the quantile value from `xs` at `p` from sorted population.

math/quickselect function source
(quickselect arr k &opt left right)
 
 Rearrange items in `arr` so that all items in `[left, k]` range
 are the smallest.
 The `k`-th element will have the `(k - left + 1)`-th smallest value
 in `[left, right]`.
-Mutates `arr`.
Community Examples

math/relative-err function source
(relative-err a e)
+Mutates `arr`.

math/relative-err function source
(relative-err a e)
 
 Gets the relative err between actual number `a`
-and expected number `e`.
Community Examples

math/root-mean-square function source
(root-mean-square xs)
+and expected number `e`.

math/root-mean-square function source
(root-mean-square xs)
 
-Gets the root mean square from `xs`.
Community Examples

math/rows function source
(rows m)
+Gets the root mean square from `xs`.

math/rows function source
(rows m)
 
-Returns numbers of rows of matrix `m`.
Community Examples

math/sample-correlation function source
(sample-correlation xs ys)
+Returns numbers of rows of matrix `m`.

math/sample-correlation function source
(sample-correlation xs ys)
 
-Gets the sample correlation between `xs` and `ys`.
Community Examples

math/sample-covariance function source
(sample-covariance xs ys)
+Gets the sample correlation between `xs` and `ys`.

math/sample-covariance function source
(sample-covariance xs ys)
 
-Gets the sample covariance between `xs` and `ys`.
Community Examples

math/sample-skewness function source
(sample-skewness xs)
+Gets the sample covariance between `xs` and `ys`.

math/sample-skewness function source
(sample-skewness xs)
 
-Gets the sample skeweness from the `xs`.
Community Examples

math/sample-standard-deviation function source
(sample-standard-deviation xs)
+Gets the sample skeweness from the `xs`.

math/sample-standard-deviation function source
(sample-standard-deviation xs)
 
-Gets sample standard deviation from `xs`.
Community Examples

math/sample-variance function source
(sample-variance xs)
+Gets sample standard deviation from `xs`.

math/sample-variance function source
(sample-variance xs)
 
-Get the sample variance from `xs`.
Community Examples

math/scalar function source
(scalar c s)
+Get the sample variance from `xs`.

math/scalar function source
(scalar c s)
 
-Creates scalar `s` matrix with `c` x `c` size.
Community Examples

math/shuffle-in-place function source
(shuffle-in-place xs)
+Creates scalar `s` matrix with `c` x `c` size.

math/shuffle-in-place function source
(shuffle-in-place xs)
 
 Generate random permutation of the array `xs`
-which is shuffled in place.
Community Examples

math/size function source
(size m)
+which is shuffled in place.

math/size function source
(size m)
 
-Returns tuple with the matrix `m` size [rows cols].
Community Examples

math/sop function source
(sop m op & a)
+Returns tuple with the matrix `m` size [rows cols].

math/sop function source
(sop m op & a)
 
 Mutates every cell of the matrix `m` with `op`
-and variadic args `a`.
Community Examples

math/standard-deviation function source
(standard-deviation xs)
+and variadic args `a`.

math/standard-deviation function source
(standard-deviation xs)
 
-Gets the standard deviation from `ds`.
Community Examples

math/standard-normal-table tuple source
Computed standard normal table.
Community Examples

math/sum-compensated function source
(sum-compensated xs)
+Gets the standard deviation from `ds`.

math/standard-normal-table tuple source
Computed standard normal table.

math/sum-compensated function source
(sum-compensated xs)
 
-Returns sum of the members of `xs` with Kahan-Babushka algorithm.
Community Examples

math/sum-nth-power-deviations function source
(sum-nth-power-deviations xs n)
+Returns sum of the members of `xs` with Kahan-Babushka algorithm.

math/sum-nth-power-deviations function source
(sum-nth-power-deviations xs n)
 
-Get the sum of deviations to the n power.
Community Examples

math/swap function source
(swap arr i j)
+Get the sum of deviations to the n power.

math/swap function source
(swap arr i j)
 
 Swaps members with indices `i` and `j` of arr.
-Noop when `i` equals `j`.
Community Examples

math/t-test function source
(t-test xs expv)
+Noop when `i` equals `j`.

math/t-test function source
(t-test xs expv)
 
 Computes one sample t-test comparing the mean of `xs`
-to known value `expv`.
Community Examples

math/t-test-2 function source
(t-test-2 xs ys &opt d)
+to known value `expv`.

math/t-test-2 function source
(t-test-2 xs ys &opt d)
 
 Computes two sample t-test of two samples `xs` and `ys`
-with difference optional `d` which defaults to 0.
Community Examples

math/trans function source
(trans m)
+with difference optional `d` which defaults to 0.

math/trans function source
(trans m)
 
-Returns a new transposed matrix from `m`.
Community Examples

math/variance function source
(variance xs)
+Returns a new transposed matrix from `m`.

math/variance function source
(variance xs)
 
-Get the variance from the `xs`.
Community Examples

math/z-score function source
(z-score x m d)
+Get the variance from the `xs`.

math/z-score function source
(z-score x m d)
 
 Gets the standard score for number `x` from mean `m` 
-and standard deviation `d`.
Community Examples

math/zero function source
(zero c &opt r)
+and standard deviation `d`.

math/zero function source
(zero c &opt r)
 
 Creates vector of length `c`, or matrix if `r`
-is provided, and fills it with zeros.
Community Examples
+is provided, and fills it with zeros.

JSON Miscellaneous Functions diff --git a/static/1.29.1/api/spork/misc.html b/static/1.29.1/api/spork/misc.html index 1e285e7b..56761540 100644 --- a/static/1.29.1/api/spork/misc.html +++ b/static/1.29.1/api/spork/misc.html @@ -118,81 +118,81 @@

Index

misc/always misc/antepenultimate misc/caperr misc/capout misc/cond-> misc/cond->> misc/dedent misc/defs misc/dfs misc/do-def misc/do-var misc/format-table misc/gett misc/insert-sorted misc/insert-sorted-by misc/int->string misc/int/ misc/log misc/make misc/make-id misc/map-keys misc/map-vals misc/penultimate misc/print-table misc/randomize-array misc/second misc/select-keys misc/set* misc/string->int misc/table-filter misc/third misc/trim-prefix misc/trim-suffix misc/until misc/vars


misc/always function source
(always x)
 
-Return a function that discards any arguments and always returns `x`.
Community Examples

misc/antepenultimate function source
(antepenultimate xs)
+Return a function that discards any arguments and always returns `x`.

misc/antepenultimate function source
(antepenultimate xs)
 
-Get the third-to-last element from an indexed data structure.
Community Examples

misc/caperr macro source
(caperr & body)
+Get the third-to-last element from an indexed data structure.

misc/caperr macro source
(caperr & body)
 
 Captures the standart error output of the variadic `body` and returns it
-as a buffer.
Community Examples

misc/capout macro source
(capout & body)
+as a buffer.

misc/capout macro source
(capout & body)
 
 Captures the standart output of the variadic `body` and returns it as
-a buffer.
Community Examples

misc/cond-> macro source
(cond-> val & clauses)
+a buffer.

misc/cond-> macro source
(cond-> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs with condition and operation to which the `val`,
 is put as first argument. All conditions are tried and
 for truthy conditions the operation is executed.
-Returns the value mutated if any condition is truthy.
Community Examples

misc/cond->> macro source
(cond->> val & clauses)
+Returns the value mutated if any condition is truthy.

misc/cond->> macro source
(cond->> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs of condition and operation to which the `val`,
 is put as last argument. All conditions are tried and
 for truthy the operation is ran.
-Returns mutated value if any condition is truthy.
Community Examples

misc/dedent function source
(dedent & xs)
+Returns mutated value if any condition is truthy.

misc/dedent function source
(dedent & xs)
 
 Remove indentation after concatenating the arguments. Works by removing
 leading whitespace, and then removing that same pattern of whitepsace after
-new lines.
Community Examples

misc/defs macro source
(defs & bindings)
+new lines.

misc/defs macro source
(defs & bindings)
 
-Defines many constants as in let `bindings`, but without creating new scope.
Community Examples

misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
+Defines many constants as in let `bindings`, but without creating new scope.

misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
 
 Do a depth first, pre-order traversal over a data structure.
 Also allow for callbacks before and after visiting the children
 of a node. Also allow for a custom `get-children` function to
 change traversal as needed. Will detect cycles if an empty table
 is passed as the `seen` parameter, which is used to cached values
-that have been visited.
Community Examples

misc/do-def macro source
(do-def c d & body)
+that have been visited.

misc/do-def macro source
(do-def c d & body)
 
 Convenience macro for defining constant named `c` with value `d` before `body`
 and returning it after evaluating `body`, that presumably modifies 
-the `c` refered content. For example buffer, table or array.
Community Examples

misc/do-var macro source
(do-var v d & body)
+the `c` refered content. For example buffer, table or array.

misc/do-var macro source
(do-var v d & body)
 
 Convenience macro for defining varible named `v` with value `d` before `body`
-and returning it after evaluating `body`, that presumably modifies `v`.
Community Examples

misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
+and returning it after evaluating `body`, that presumably modifies `v`.

misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
 
-Same as print-table but pushes table into a buffer.
Community Examples

misc/gett macro source
(gett ds & keys)
+Same as print-table but pushes table into a buffer.

misc/gett macro source
(gett ds & keys)
 
-Recursive macro (get). Similar to get-in, but keys are variadic argument.
Community Examples

misc/insert-sorted function source
(insert-sorted arr <? & xs)
+Recursive macro (get). Similar to get-in, but keys are variadic argument.

misc/insert-sorted function source
(insert-sorted arr <? & xs)
 
 Insert elements in `arr` such that it remains sorted by the comparator. If
-`arr` is not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
+`arr` is not sorted beforehand, the results are undefined. Returns `arr`.

misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
 
 Insert elements in `arr` such that it remains sorted by the value returned
 when `f` is called with the element, comparing the values with <. If `arr` is
-not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

misc/int->string function source
(int->string int &opt base)
+not sorted beforehand, the results are undefined. Returns `arr`.

misc/int->string function source
(int->string int &opt base)
 
-Stringify an integer in a particular base. Defaults to decimal (base 10).
Community Examples

misc/int/ function source
(int/ & xs)
+Stringify an integer in a particular base. Defaults to decimal (base 10).

misc/int/ function source
(int/ & xs)
 
-Perform integer division.
Community Examples

misc/log macro source
(log level & args)
+Perform integer division.

misc/log macro source
(log level & args)
 
 Print to a dynamic binding stream if that stream is set, otherwise do
 nothing. Evaluate to nil. 
 For example, `(log :err "value error: %V" my-value)` will print 
-to `(dyn :err)` only if `(dyn :err)` has been set.
Community Examples

misc/make macro source
(make prototype & pairs)
+to `(dyn :err)` only if `(dyn :err)` has been set.

misc/make macro source
(make prototype & pairs)
 
 Convenience macro for creating new table from even number of kvs pairs in a variadic `table-or-pairs`
 arguments and setting its prototype to `prototype`.
-Factory function for creating new objects from prototypes.
Community Examples

misc/make-id function source
(make-id &opt prefix)
+Factory function for creating new objects from prototypes.

misc/make-id function source
(make-id &opt prefix)
 
 Create a random, printable keyword id with 10 bytes of entropy
-with an optional prefix.
Community Examples

misc/map-keys function source
(map-keys f data)
+with an optional prefix.

misc/map-keys function source
(map-keys f data)
 
 Returns new table with function `f` applied to `data`'s
-keys recursively.
Community Examples

misc/map-vals function source
(map-vals f data)
+keys recursively.

misc/map-vals function source
(map-vals f data)
 
-Returns new table with function `f` applied to `data`'s values.
Community Examples

misc/penultimate function source
(penultimate xs)
+Returns new table with function `f` applied to `data`'s values.

misc/penultimate function source
(penultimate xs)
 
-Get the second-to-last element from an indexed data structure.
Community Examples

misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
+Get the second-to-last element from an indexed data structure.

misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
 
 Iterate through the rows of a data structure and print a table in a human
 readable way, with padding and heading information. Can optionally provide
@@ -200,37 +200,37 @@ 

Index for each row. Lastly, a `header-mapping` dictionary can be provided that changes the printed header names by mapping column keys to the desired header name. If no mapping is found, then the column key will be used as -the header name. Returns nil.

Community Examples

misc/randomize-array function source
(randomize-array arr &opt rng)
+the header name. Returns nil.

misc/randomize-array function source
(randomize-array arr &opt rng)
 
 Randomizes array using the fisher-yates shuffle, takes an optional random
-number generator.
Community Examples

misc/second function source
(second xs)
+number generator.

misc/second function source
(second xs)
 
-Get the second element from an indexed data structure.
Community Examples

misc/select-keys function source
(select-keys data keyz)
+Get the second element from an indexed data structure.

misc/select-keys function source
(select-keys data keyz)
 
-Returns new table with selected `keyz` from dictionary `data`.
Community Examples

misc/set* macro source
(set* tgts exprs)
+Returns new table with selected `keyz` from dictionary `data`.

misc/set* macro source
(set* tgts exprs)
 
 Parallel `set` function. Takes a list of targets and
 expressions, evaluates all the expressions, and then
 assigns them to the targets. Each target can be a variable
-or a 2-tuple, just like in the normal `set` special form.
Community Examples

misc/string->int function source
(string->int str &opt base)
+or a 2-tuple, just like in the normal `set` special form.

misc/string->int function source
(string->int str &opt base)
 
 Parse an integer in the given base. Defaults to decimal (base 10). Differs
-from scan-number in that this does not recognize floating point notation.
Community Examples

misc/table-filter function source
(table-filter pred dict)
+from scan-number in that this does not recognize floating point notation.

misc/table-filter function source
(table-filter pred dict)
 
 Filter a key-value structure info a table. Semantics are the same as for
 built-in `filter`, except that `pred` takes two arguments (key and value.)
-Does not consider prototypes.
Community Examples

misc/third function source
(third xs)
+Does not consider prototypes.

misc/third function source
(third xs)
 
-Get the third element from an indexed data structure.
Community Examples

misc/trim-prefix function source
(trim-prefix prefix str)
+Get the third element from an indexed data structure.

misc/trim-prefix function source
(trim-prefix prefix str)
 
-Trim the specified prefix of a string if it has one
Community Examples

misc/trim-suffix function source
(trim-suffix suffix str)
+Trim the specified prefix of a string if it has one

misc/trim-suffix function source
(trim-suffix suffix str)
 
-Trim the specified suffix of a string if it has one
Community Examples

misc/until macro source
(until cnd & body)
+Trim the specified suffix of a string if it has one

misc/until macro source
(until cnd & body)
 
 Repeat `body` while the `cnd` is false.
-Equivalent to (while (not cnd) ;body).
Community Examples

misc/vars macro source
(vars & bindings)
+Equivalent to (while (not cnd) ;body).

misc/vars macro source
(vars & bindings)
 
-Defines many variables as in let `bindings`, but without creating new scope.
Community Examples
+Defines many variables as in let `bindings`, but without creating new scope.
Math extended NetREPL diff --git a/static/1.29.1/api/spork/msg.html b/static/1.29.1/api/spork/msg.html index 310aee4d..fa0abde6 100644 --- a/static/1.29.1/api/spork/msg.html +++ b/static/1.29.1/api/spork/msg.html @@ -118,11 +118,11 @@

Index

msg/make-proto msg/make-recv msg/make-send


msg/make-proto function source
(make-proto stream &opt pack unpack)
 
-Create both a send an recv function from a stream, as with `make-send` and `make-recv`.
Community Examples

msg/make-recv function source
(make-recv stream &opt unpack)
+Create both a send an recv function from a stream, as with `make-send` and `make-recv`.

msg/make-recv function source
(make-recv stream &opt unpack)
 
-Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.
Community Examples

msg/make-send function source
(make-send stream &opt pack)
+Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.

msg/make-send function source
(make-send stream &opt pack)
 
-Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Community Examples
+Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Shell Utilities Test diff --git a/static/1.29.1/api/spork/netrepl.html b/static/1.29.1/api/spork/netrepl.html index cce3bf68..acbb017d 100644 --- a/static/1.29.1/api/spork/netrepl.html +++ b/static/1.29.1/api/spork/netrepl.html @@ -118,11 +118,11 @@

Index

netrepl/client netrepl/default-host netrepl/default-port netrepl/server netrepl/server-single


netrepl/client function source
(client &opt host port name)
 
-Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".
Community Examples

netrepl/default-host string source
Default host to run server on and connect to.
Community Examples

netrepl/default-port string source
Default port to run the net repl.
Community Examples

netrepl/server function source
(server &opt host port env cleanup welcome-msg)
+Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".

netrepl/default-host string source
Default host to run server on and connect to.

netrepl/default-port string source
Default port to run the net repl.

netrepl/server function source
(server &opt host port env cleanup welcome-msg)
 
-Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.
Community Examples

netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
+Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.

netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
 
-Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Community Examples
+Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Miscellaneous Functions Path Utilities diff --git a/static/1.29.1/api/spork/path.html b/static/1.29.1/api/spork/path.html index c668df54..b1048991 100644 --- a/static/1.29.1/api/spork/path.html +++ b/static/1.29.1/api/spork/path.html @@ -118,59 +118,59 @@

Index

path/abspath path/abspath? path/basename path/delim path/dirname path/ext path/join path/normalize path/parts path/posix/abspath path/posix/abspath? path/posix/basename path/posix/delim path/posix/dirname path/posix/ext path/posix/join path/posix/normalize path/posix/parts path/posix/relpath path/posix/sep path/relpath path/sep path/win32/abspath path/win32/abspath? path/win32/basename path/win32/delim path/win32/dirname path/win32/ext path/win32/join path/win32/normalize path/win32/parts path/win32/relpath path/win32/sep


path/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

path/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/basename function source
(posix/basename path)
+Check if a path is absolute.

path/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

path/delim string source
Platform delimiter
Community Examples

path/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

path/delim string source
Platform delimiter

path/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/ext function source
(ext path)
+Gets the directory name of a path.

path/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/join function source
(posix/join & els)
+Get the file extension for a path.

path/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

path/normalize function source
(posix/normalize path)
+Join path elements together.

path/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

path/posix/abspath function source
(posix/abspath path)
+Split a path into its parts.

path/posix/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/posix/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

path/posix/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/posix/basename function source
(posix/basename path)
+Check if a path is absolute.

path/posix/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

path/posix/delim string source
Platform delimiter
Community Examples

path/posix/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

path/posix/delim string source
Platform delimiter

path/posix/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/posix/ext function source
(ext path)
+Gets the directory name of a path.

path/posix/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/posix/join function source
(posix/join & els)
+Get the file extension for a path.

path/posix/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

path/posix/normalize function source
(posix/normalize path)
+Join path elements together.

path/posix/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/posix/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/posix/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

path/posix/relpath function source
(posix/relpath source target)
+Split a path into its parts.

path/posix/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/posix/sep string source
Platform separator
Community Examples

path/relpath function source
(posix/relpath source target)
+Get the relative path between two subpaths.

path/posix/sep string source
Platform separator

path/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/sep string source
Platform separator
Community Examples

path/win32/abspath function source
(win32/abspath path)
+Get the relative path between two subpaths.

path/sep string source
Platform separator

path/win32/abspath function source
(win32/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/win32/abspath? function source
(win32/abspath? path)
+Coerce a path to be absolute.

path/win32/abspath? function source
(win32/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/win32/basename function source
(win32/basename path)
+Check if a path is absolute.

path/win32/basename function source
(win32/basename path)
 
-Gets the base file name of a path.
Community Examples

path/win32/delim string source
Platform delimiter
Community Examples

path/win32/dirname function source
(win32/dirname path)
+Gets the base file name of a path.

path/win32/delim string source
Platform delimiter

path/win32/dirname function source
(win32/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/win32/ext function source
(ext path)
+Gets the directory name of a path.

path/win32/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/win32/join function source
(win32/join & els)
+Get the file extension for a path.

path/win32/join function source
(win32/join & els)
 
-Join path elements together.
Community Examples

path/win32/normalize function source
(win32/normalize path)
+Join path elements together.

path/win32/normalize function source
(win32/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/win32/parts function source
(win32/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/win32/parts function source
(win32/parts path)
 
-Split a path into its parts.
Community Examples

path/win32/relpath function source
(win32/relpath source target)
+Split a path into its parts.

path/win32/relpath function source
(win32/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/win32/sep string source
Platform separator
Community Examples
+Get the relative path between two subpaths.

path/win32/sep string source
Platform separator
NetREPL Raw Terminal Functionality diff --git a/static/1.29.1/api/spork/rawterm.html b/static/1.29.1/api/spork/rawterm.html index cef83e09..7e37f7b6 100644 --- a/static/1.29.1/api/spork/rawterm.html +++ b/static/1.29.1/api/spork/rawterm.html @@ -118,25 +118,25 @@

Index

rawterm/begin rawterm/buffer-traverse rawterm/ctrl-z rawterm/end rawterm/getch rawterm/isatty rawterm/monowidth rawterm/rune-monowidth rawterm/size rawterm/slice-monowidth


rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
 
-Begin raw terminal functionality. Return a stream that can be read from to get input.
Community Examples

rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
+Begin raw terminal functionality. Return a stream that can be read from to get input.

rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
 
-Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.
Community Examples

rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
+Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.

rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
 
-A handler that a user can use to handle ctrl-z from input to suspend the current process.
Community Examples

rawterm/end cfunction source
(rawterm/end)
+A handler that a user can use to handle ctrl-z from input to suspend the current process.

rawterm/end cfunction source
(rawterm/end)
 
-End raw terminal functionality.
Community Examples

rawterm/getch cfunction source
(rawterm/getch &opt into)
+End raw terminal functionality.

rawterm/getch cfunction source
(rawterm/getch &opt into)
 
-Get a byte of input from stdin, without blocking if possible. Returns a buffer.
Community Examples

rawterm/isatty cfunction source
(rawterm/isatty)
+Get a byte of input from stdin, without blocking if possible. Returns a buffer.

rawterm/isatty cfunction source
(rawterm/isatty)
 
-Check if the current stdin is a tty.
Community Examples

rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
+Check if the current stdin is a tty.

rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
 
-Measure the monospace width of a string.
Community Examples

rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
+Measure the monospace width of a string.

rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
 
-Get the monospace width of a rune. Returns either 0, 1, or 2.
Community Examples

rawterm/size cfunction source
(rawterm/size)
+Get the monospace width of a rune. Returns either 0, 1, or 2.

rawterm/size cfunction source
(rawterm/size)
 
-Get the number of rows and columns visible in the terminal as tuple [rows cols]
Community Examples

rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
+Get the number of rows and columns visible in the terminal as tuple [rows cols]

rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
 
-Get a byte slice that will fit into a number of columns.
Community Examples
+Get a byte slice that will fit into a number of columns.
Path Utilities Regular Expression PEG Syntax diff --git a/static/1.29.1/api/spork/regex.html b/static/1.29.1/api/spork/regex.html index cc1dfc40..13afbea5 100644 --- a/static/1.29.1/api/spork/regex.html +++ b/static/1.29.1/api/spork/regex.html @@ -121,19 +121,19 @@

Index

regex/compile regex/find regex/find-all regex/match regex/peg regex/replace regex/replace-all regex/source


regex/compile function source
(compile pattern)
 
-Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.
Community Examples

regex/find function source
(find reg text &opt start)
+Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.

regex/find function source
(find reg text &opt start)
 
-Similar to peg/find, but for regexes.
Community Examples

regex/find-all function source
(find-all reg text &opt start)
+Similar to peg/find, but for regexes.

regex/find-all function source
(find-all reg text &opt start)
 
-Similar to peg/find-all, but for regexes.
Community Examples

regex/match function source
(match reg text &opt start)
+Similar to peg/find-all, but for regexes.

regex/match function source
(match reg text &opt start)
 
-Similar to peg/match, but for regexes.
Community Examples

regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.
Community Examples

regex/replace function source
(replace reg rep text &opt start)
+Similar to peg/match, but for regexes.

regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.

regex/replace function source
(replace reg rep text &opt start)
 
-Similar to peg/replace, but for regexes.
Community Examples

regex/replace-all function source
(replace-all reg rep text &opt start)
+Similar to peg/replace, but for regexes.

regex/replace-all function source
(replace-all reg rep text &opt start)
 
-Similar to peg/replace-all, but for regexes.
Community Examples

regex/source function source
(source pattern)
+Similar to peg/replace-all, but for regexes.

regex/source function source
(source pattern)
 
-Compile a subset of regex to PEG source code.
Community Examples
+Compile a subset of regex to PEG source code.
Raw Terminal Functionality Remote Procedure Calls diff --git a/static/1.29.1/api/spork/rpc.html b/static/1.29.1/api/spork/rpc.html index f4dae55b..a22331e5 100644 --- a/static/1.29.1/api/spork/rpc.html +++ b/static/1.29.1/api/spork/rpc.html @@ -118,9 +118,9 @@

Index

rpc/client rpc/default-host rpc/default-port rpc/server


rpc/client function source
(client &opt host port name)
 
-Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.
Community Examples

rpc/default-host string source
Default host to run server on and connect to.
Community Examples

rpc/default-port string source
Default port to run the net repl.
Community Examples

rpc/server function source
(server functions &opt host port workers-per-connection)
+Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.

rpc/default-host string source
Default host to run server on and connect to.

rpc/default-port string source
Default port to run the net repl.

rpc/server function source
(server functions &opt host port workers-per-connection)
 
-Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Community Examples
+Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Regular Expression PEG Syntax Schema diff --git a/static/1.29.1/api/spork/schema.html b/static/1.29.1/api/spork/schema.html index be6a1d5f..5f239ff8 100644 --- a/static/1.29.1/api/spork/schema.html +++ b/static/1.29.1/api/spork/schema.html @@ -118,13 +118,13 @@

Index

schema/make-predicate schema/make-validator schema/predicate schema/validator


schema/make-predicate function source
(make-predicate schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `predicate`.
Community Examples

schema/make-validator function source
(make-validator schema)
+Generate a function that can be used to validate a data structure. This is the function form of `predicate`.

schema/make-validator function source
(make-validator schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `validator`.
Community Examples

schema/predicate macro source
(predicate pattern)
+Generate a function that can be used to validate a data structure. This is the function form of `validator`.

schema/predicate macro source
(predicate pattern)
 
-Make a validation predicate given a certain schema.
Community Examples

schema/validator macro source
(validator pattern)
+Make a validation predicate given a certain schema.

schema/validator macro source
(validator pattern)
 
-Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Community Examples
+Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Remote Procedure Calls Shell Utilities diff --git a/static/1.29.1/api/spork/sh.html b/static/1.29.1/api/spork/sh.html index 947ccaae..4f81b5c5 100644 --- a/static/1.29.1/api/spork/sh.html +++ b/static/1.29.1/api/spork/sh.html @@ -119,36 +119,36 @@

Index

sh/copy sh/copy-file sh/create-dirs sh/devnull sh/escape sh/exec sh/exec-fail sh/exec-slurp sh/exec-slurp-all sh/exists? sh/list-all-files sh/make-new-file sh/rm sh/scan-directory sh/split


sh/copy function source
(copy src dest)
 
 Copy a file or directory recursively from one location to another.
-Expects input to be unix style paths
Community Examples

sh/copy-file function source
(copy-file src-path dst-path)
+Expects input to be unix style paths

sh/copy-file function source
(copy-file src-path dst-path)
 
-Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.
Community Examples

sh/create-dirs function source
(create-dirs dir-path)
+Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.

sh/create-dirs function source
(create-dirs dir-path)
 
-Create all directories in path specified as string including itself.
Community Examples

sh/devnull function source
(devnull)
+Create all directories in path specified as string including itself.

sh/devnull function source
(devnull)
 
-get the /dev/null equivalent of the current platform as an open file
Community Examples

sh/escape function source
(escape & args)
+get the /dev/null equivalent of the current platform as an open file

sh/escape function source
(escape & args)
 
-Output a string with all arguments correctly quoted
Community Examples

sh/exec function source
(exec & args)
+Output a string with all arguments correctly quoted

sh/exec function source
(exec & args)
 
-Execute command specified by args returning it's exit code
Community Examples

sh/exec-fail function source
(exec-fail & args)
+Execute command specified by args returning it's exit code

sh/exec-fail function source
(exec-fail & args)
 
-Execute command specified by args, fails when command exits with non-zero exit code
Community Examples

sh/exec-slurp function source
(exec-slurp & args)
+Execute command specified by args, fails when command exits with non-zero exit code

sh/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of command specified by args and return it trimmed in a string.
Community Examples

sh/exec-slurp-all function source
(exec-slurp-all & args)
+Read stdout of command specified by args and return it trimmed in a string.

sh/exec-slurp-all function source
(exec-slurp-all & args)
 
 Read stdout and stderr of subprocess and return it trimmed in a struct with :err and :out containing the output as string.
-This will also return the exit code under the :status key.
Community Examples

sh/exists? function source
(exists? path)
+This will also return the exit code under the :status key.

sh/exists? function source
(exists? path)
 
-Check if the given file or directory exists. (Follows symlinks)
Community Examples

sh/list-all-files function source
(list-all-files dir &opt into)
+Check if the given file or directory exists. (Follows symlinks)

sh/list-all-files function source
(list-all-files dir &opt into)
 
-List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.
Community Examples

sh/make-new-file function source
(make-new-file file-path &opt mode)
+List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.

sh/make-new-file function source
(make-new-file file-path &opt mode)
 
-Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).
Community Examples

sh/rm function source
(rm path)
+Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).

sh/rm function source
(rm path)
 
-Remove a directory and all sub directories recursively.
Community Examples

sh/scan-directory function source
(scan-directory dir func)
+Remove a directory and all sub directories recursively.

sh/scan-directory function source
(scan-directory dir func)
 
-Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.
Community Examples

sh/split function source
(split s)
+Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.

sh/split function source
(split s)
 
-Split a string into 'sh like' tokens, returns nil if unable to parse the string.
Community Examples
+Split a string into 'sh like' tokens, returns nil if unable to parse the string.

Schema Simple Messaging Protocol diff --git a/static/1.29.1/api/spork/tarray.html b/static/1.29.1/api/spork/tarray.html index 22616af3..11ddcbff 100644 --- a/static/1.29.1/api/spork/tarray.html +++ b/static/1.29.1/api/spork/tarray.html @@ -118,19 +118,19 @@

Index

tarray/buffer tarray/copy-bytes tarray/length tarray/new tarray/properties tarray/slice tarray/swap-bytes


tarray/buffer cfunction
(tarray/buffer array|size)
 
-Return typed array buffer or create a new buffer.
Community Examples

tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
+Return typed array buffer or create a new buffer.

tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
 
-Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.
Community Examples

tarray/length cfunction
(tarray/length array|buffer)
+Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.

tarray/length cfunction
(tarray/length array|buffer)
 
-Return typed array or buffer size.
Community Examples

tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
+Return typed array or buffer size.

tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
 
-Create new typed array.
Community Examples

tarray/properties cfunction
(tarray/properties array)
+Create new typed array.

tarray/properties cfunction
(tarray/properties array)
 
-Return typed array properties as a struct.
Community Examples

tarray/slice cfunction
(tarray/slice tarr &opt start end)
+Return typed array properties as a struct.

tarray/slice cfunction
(tarray/slice tarr &opt start end)
 
-Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.
Community Examples

tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
+Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.

tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
 
-Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Community Examples
+Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Test Zip Files diff --git a/static/1.29.1/api/spork/test.html b/static/1.29.1/api/spork/test.html index f252b0d4..50d980e1 100644 --- a/static/1.29.1/api/spork/test.html +++ b/static/1.29.1/api/spork/test.html @@ -118,39 +118,39 @@

Index

test/assert test/assert-docs test/assert-error test/assert-no-error test/assert-not test/capture-stderr test/capture-stdout test/end-suite test/start-suite test/suppress-stderr test/suppress-stdout test/timeit test/timeit-loop


test/assert macro source
(assert x &opt e)
 
-Override's the default assert with some nice error handling.
Community Examples

test/assert-docs function source
(assert-docs path)
+Override's the default assert with some nice error handling.

test/assert-docs function source
(assert-docs path)
 
 Assert that all symbols, when module on the path is required,
-have proper doc string
Community Examples

test/assert-error macro source
(assert-error msg & forms)
+have proper doc string

test/assert-error macro source
(assert-error msg & forms)
 
-Test passes if forms error.
Community Examples

test/assert-no-error macro source
(assert-no-error msg & forms)
+Test passes if forms error.

test/assert-no-error macro source
(assert-no-error msg & forms)
 
-Test passes if forms do not error.
Community Examples

test/assert-not macro source
(assert-not x &opt e)
+Test passes if forms do not error.

test/assert-not macro source
(assert-not x &opt e)
 
-Invert assert.
Community Examples

test/capture-stderr macro source
(capture-stderr & body)
+Invert assert.

test/capture-stderr macro source
(capture-stderr & body)
 
 Runs the form and captures stderr. Returns tuple with result of the form
-and a string with captured stderr.
Community Examples

test/capture-stdout macro source
(capture-stdout & body)
+and a string with captured stderr.

test/capture-stdout macro source
(capture-stdout & body)
 
 Runs the form and captures stdout. Returns tuple with result of the form
-and a string with captured stdout.
Community Examples

test/end-suite function source
(end-suite)
+and a string with captured stdout.

test/end-suite function source
(end-suite)
 
-Ends test suite, prints summary and exits if any have failed.
Community Examples

test/start-suite function source
(start-suite &opt name)
+Ends test suite, prints summary and exits if any have failed.

test/start-suite function source
(start-suite &opt name)
 
-Starts test suite.
Community Examples

test/suppress-stderr macro source
(suppress-stderr & body)
+Starts test suite.

test/suppress-stderr macro source
(suppress-stderr & body)
 
-Suppreses stdout from the body
Community Examples

test/suppress-stdout macro source
(suppress-stdout & body)
+Suppreses stdout from the body

test/suppress-stdout macro source
(suppress-stdout & body)
 
-Suppreses stdout from the body
Community Examples

test/timeit macro source
(timeit form &opt tag)
+Suppreses stdout from the body

test/timeit macro source
(timeit form &opt tag)
 
 Time the execution of `form` using `os/clock` before and after,
 and print the result to stdout. returns: result of executing `form`.
-Uses `tag` (default "Elapsed time:") to tag the printout.
Community Examples

test/timeit-loop macro source
(timeit-loop head & body)
+Uses `tag` (default "Elapsed time:") to tag the printout.

test/timeit-loop macro source
(timeit-loop head & body)
 
 Similar to `loop`, but outputs performance statistics after completion.
 Additionally defines a `:timeout` verb to iterate continuously for a given
 number of seconds. If the first form of `body` is a bytes, it will be taken
-as a custom tag.
Community Examples
+as a custom tag.
Simple Messaging Protocol Typed Arrays diff --git a/static/1.29.1/api/spork/zip.html b/static/1.29.1/api/spork/zip.html index 552e57d3..887d640f 100644 --- a/static/1.29.1/api/spork/zip.html +++ b/static/1.29.1/api/spork/zip.html @@ -118,33 +118,33 @@

Index

zip/add-bytes zip/add-file zip/compress zip/decompress zip/extract zip/file-directory? zip/file-encrypted? zip/file-supported? zip/get-filename zip/locate-file zip/read-bytes zip/read-file zip/reader-close zip/reader-count zip/stat zip/version zip/write-buffer zip/write-file zip/writer-close zip/writer-finalize


zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
 
-Add a byte sequence to the zip writer.
Community Examples

zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
+Add a byte sequence to the zip writer.

zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
 
-Add a file to the zip writer.
Community Examples

zip/compress cfunction source
(zip/compress bytes &opt level into)
+Add a file to the zip writer.

zip/compress cfunction source
(zip/compress bytes &opt level into)
 
-Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.
Community Examples

zip/decompress cfunction source
(zip/decompress bytes &opt into)
+Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.

zip/decompress cfunction source
(zip/decompress bytes &opt into)
 
-Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.
Community Examples

zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
+Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.

zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
 
-Extract a file from the zip archive, either to memory or to a file on disk.
Community Examples

zip/file-directory? cfunction source
(zip/file-directory? reader idx)
+Extract a file from the zip archive, either to memory or to a file on disk.

zip/file-directory? cfunction source
(zip/file-directory? reader idx)
 
-Check if a file index is a directory.
Community Examples

zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
+Check if a file index is a directory.

zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
 
-Check if a file is encrypted inside an archive.
Community Examples

zip/file-supported? cfunction source
(zip/file-supported? reader idx)
+Check if a file is encrypted inside an archive.

zip/file-supported? cfunction source
(zip/file-supported? reader idx)
 
-Check if a file is supported with this verstion of miniz.
Community Examples

zip/get-filename cfunction source
(zip/get-filename reader idx)
+Check if a file is supported with this verstion of miniz.

zip/get-filename cfunction source
(zip/get-filename reader idx)
 
-Convert a file index index in the archive to a filename.
Community Examples

zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
+Convert a file index index in the archive to a filename.

zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
 
-Get the index of a particular filename in the archive.
Community Examples

zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
+Get the index of a particular filename in the archive.

zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
 
-Read a byte sequence as a zip archive. Returns a new zip reader.
Community Examples

zip/read-file cfunction source
(zip/read-file filename &opt flags)
+Read a byte sequence as a zip archive. Returns a new zip reader.

zip/read-file cfunction source
(zip/read-file filename &opt flags)
 
-Read a file as a zip archive. Returns a new zip reader.
Community Examples

zip/reader-close cfunction source
(zip/reader-close reader)
+Read a file as a zip archive. Returns a new zip reader.

zip/reader-close cfunction source
(zip/reader-close reader)
 
-Close a reader and free related memory.
Community Examples

zip/reader-count cfunction source
(zip/reader-count reader)
+Close a reader and free related memory.

zip/reader-count cfunction source
(zip/reader-count reader)
 
-Get the number of files inside the zip archive. The files can be indexed 
Community Examples

zip/stat cfunction source
(zip/stat reader idx)
+Get the number of files inside the zip archive. The files can be indexed 

zip/stat cfunction source
(zip/stat reader idx)
 
 Get stat information of file. Returns a new struct with the following fields:
 
@@ -161,17 +161,17 @@ 

Index * :comment * :internal-attr * :external-attr -

Community Examples

zip/version cfunction source
(zip/version)
+

zip/version cfunction source
(zip/version)
 
-Get the version string of the underlying miniz library.
Community Examples

zip/write-buffer cfunction source
(zip/write-buffer)
+Get the version string of the underlying miniz library.

zip/write-buffer cfunction source
(zip/write-buffer)
 
-Create a new zip archive writer that write to memory.
Community Examples

zip/write-file cfunction source
(zip/write-file dest-path)
+Create a new zip archive writer that write to memory.

zip/write-file cfunction source
(zip/write-file dest-path)
 
-Create a new zip archive writer that will write into an archive file.
Community Examples

zip/writer-close cfunction source
(zip/writer-close writer)
+Create a new zip archive writer that will write into an archive file.

zip/writer-close cfunction source
(zip/writer-close writer)
 
-Close a ZipWriter.
Community Examples

zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
+Close a ZipWriter.

zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
 
-Finalize a writer, writing any zip files to disk. Return the writer.
Community Examples
+Finalize a writer, writing any zip files to disk. Return the writer.
Typed Arrays String Module diff --git a/static/1.31.0/api/jpm/cc.html b/static/1.31.0/api/jpm/cc.html index b98b3501..37be88c9 100644 --- a/static/1.31.0/api/jpm/cc.html +++ b/static/1.31.0/api/jpm/cc.html @@ -120,35 +120,35 @@

Index

cc/archive-c cc/compile-c cc/create-buffer-c cc/create-buffer-c-impl cc/create-executable cc/embed-name cc/entry-name cc/entry-replace cc/link-c cc/make-bin-source cc/make-define cc/make-defines cc/modpath-to-meta cc/modpath-to-static cc/out-path


cc/archive-c function source
(archive-c opts target & objects)
 
-Link object files together to make a static library.
Community Examples

cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
+Link object files together to make a static library.

cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
 
-Compile a C file into an object file.
Community Examples

cc/create-buffer-c function source
(create-buffer-c source dest name)
+Compile a C file into an object file.

cc/create-buffer-c function source
(create-buffer-c source dest name)
 
-Inline raw byte file as a c file.
Community Examples

cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
+Inline raw byte file as a c file.

cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
 
-
Community Examples

cc/create-executable function source
(create-executable opts source dest no-core)
+

cc/create-executable function source
(create-executable opts source dest no-core)
 
-Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.
Community Examples

cc/embed-name function source
(embed-name path)
+Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.

cc/embed-name function source
(embed-name path)
 
-Rename a janet symbol for embedding.
Community Examples

cc/entry-name function source
(entry-name name)
+Rename a janet symbol for embedding.

cc/entry-name function source
(entry-name name)
 
-Name of symbol that enters static compilation of a module.
Community Examples

cc/entry-replace function source
(entry-replace name)
+Name of symbol that enters static compilation of a module.

cc/entry-replace function source
(entry-replace name)
 
-Escape special characters in the entry-name
Community Examples

cc/link-c function source
(link-c has-cpp opts target & objects)
+Escape special characters in the entry-name

cc/link-c function source
(link-c has-cpp opts target & objects)
 
-Link C or C++ object files together to make a native module.
Community Examples

cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
+Link C or C++ object files together to make a native module.

cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
 
-
Community Examples

cc/make-define function source
(make-define define value)
+

cc/make-define function source
(make-define define value)
 
-Generate strings for adding custom defines to the compiler.
Community Examples

cc/make-defines function source
(make-defines defines)
+Generate strings for adding custom defines to the compiler.

cc/make-defines function source
(make-defines defines)
 
-Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.
Community Examples

cc/modpath-to-meta function source
(modpath-to-meta path)
+Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.

cc/modpath-to-meta function source
(modpath-to-meta path)
 
-Get the meta file path (.meta.janet) corresponding to a native module path (.so).
Community Examples

cc/modpath-to-static function source
(modpath-to-static path)
+Get the meta file path (.meta.janet) corresponding to a native module path (.so).

cc/modpath-to-static function source
(modpath-to-static path)
 
-Get the static library (.a) path corresponding to a native module path (.so).
Community Examples

cc/out-path function source
(out-path path from-ext to-ext)
+Get the static library (.a) path corresponding to a native module path (.so).

cc/out-path function source
(out-path path from-ext to-ext)
 
-Take a source file path and convert it to an output path.
Community Examples
+Take a source file path and convert it to an output path.
Build Rules C Source Generation diff --git a/static/1.31.0/api/jpm/cgen.html b/static/1.31.0/api/jpm/cgen.html index d2c5b5ef..5d33312c 100644 --- a/static/1.31.0/api/jpm/cgen.html +++ b/static/1.31.0/api/jpm/cgen.html @@ -120,13 +120,13 @@

Index

cgen/add-loader cgen/ir cgen/mangle cgen/print-ir


cgen/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

cgen/ir macro source
(ir & body)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

cgen/ir macro source
(ir & body)
 
-Macro that automatically quotes the body provided and calls (print-ir ...) on the body.
Community Examples

cgen/mangle function source
(mangle token)
+Macro that automatically quotes the body provided and calls (print-ir ...) on the body.

cgen/mangle function source
(mangle token)
 
-Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.
Community Examples

cgen/print-ir function source
(print-ir ir)
+Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.

cgen/print-ir function source
(print-ir ir)
 
-Compile the CGEN IR to C and print it to (dyn :out).
Community Examples
+Compile the CGEN IR to C and print it to (dyn :out).
C Compiler Command Line Interface diff --git a/static/1.31.0/api/jpm/cli.html b/static/1.31.0/api/jpm/cli.html index 135362bb..86bd4696 100644 --- a/static/1.31.0/api/jpm/cli.html +++ b/static/1.31.0/api/jpm/cli.html @@ -120,11 +120,11 @@

Index

cli/jpm cli/main cli/run cli/setup


cli/jpm macro source
(jpm & argv)
 
-A Macro User Interface for jpm to be used from a repl in a way similar to the command line.
Community Examples

cli/main function source
(main & argv)
+A Macro User Interface for jpm to be used from a repl in a way similar to the command line.

cli/main function source
(main & argv)
 
-Script entry.
Community Examples

cli/run function source
(run & args)
+Script entry.

cli/run function source
(run & args)
 
-Run CLI commands.
Community Examples

cli/setup function source
(setup args)
+Run CLI commands.

cli/setup function source
(setup args)
 
 Load configuration from the command line, environment variables, and
 configuration files. Returns array of non-configuration arguments as well.
@@ -132,7 +132,7 @@ 

Index 1. Commmand line settings 2. The value of `(dyn :jpm-config)` 3. Environment variables - 4. Config file settings (default-config if non specified)

Community Examples
+ 4. Config file settings (default-config if non specified)
C Source Generation Commands diff --git a/static/1.31.0/api/jpm/commands.html b/static/1.31.0/api/jpm/commands.html index 931a411b..dc0ff217 100644 --- a/static/1.31.0/api/jpm/commands.html +++ b/static/1.31.0/api/jpm/commands.html @@ -120,47 +120,47 @@

Index

commands/build commands/clean commands/configure commands/deps commands/enable-local-mode commands/help commands/install commands/jpm-debug-repl commands/list-installed commands/list-pkgs commands/list-rules commands/list-tasks commands/new-c-project commands/new-exe-project commands/new-project commands/quickbin commands/set-tree commands/show-paths commands/show-rule-tree commands/test commands/update-pkgs


commands/build function source
(build)
 
-
Community Examples

commands/clean function source
(clean)
+

commands/clean function source
(clean)
 
-
Community Examples

commands/configure function source
(configure &opt path)
+

commands/configure function source
(configure &opt path)
 
-Setup an out-of-tree build with certain configuration options.
Community Examples

commands/deps function source
(deps)
+Setup an out-of-tree build with certain configuration options.

commands/deps function source
(deps)
 
-
Community Examples

commands/enable-local-mode function source
(enable-local-mode)
+

commands/enable-local-mode function source
(enable-local-mode)
 
-Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/
Community Examples

commands/help function source
(help)
+Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/

commands/help function source
(help)
 
-
Community Examples

commands/install function source
(install & repo)
+

commands/install function source
(install & repo)
 
-
Community Examples

commands/jpm-debug-repl function source
(jpm-debug-repl)
+

commands/jpm-debug-repl function source
(jpm-debug-repl)
 
-
Community Examples

commands/list-installed function source
(list-installed)
+

commands/list-installed function source
(list-installed)
 
-
Community Examples

commands/list-pkgs function source
(list-pkgs &opt search)
+

commands/list-pkgs function source
(list-pkgs &opt search)
 
-
Community Examples

commands/list-rules function source
(list-rules &opt ctx)
+

commands/list-rules function source
(list-rules &opt ctx)
 
-
Community Examples

commands/list-tasks function source
(list-tasks &opt ctx)
+

commands/list-tasks function source
(list-tasks &opt ctx)
 
-
Community Examples

commands/new-c-project function source
(new-c-project name)
+

commands/new-c-project function source
(new-c-project name)
 
-Create a new C project
Community Examples

commands/new-exe-project function source
(new-exe-project name)
+Create a new C project

commands/new-exe-project function source
(new-exe-project name)
 
-Create a new executable project
Community Examples

commands/new-project function source
(new-project name)
+Create a new executable project

commands/new-project function source
(new-project name)
 
-Create a new project
Community Examples

commands/quickbin function source
(quickbin input output)
+Create a new project

commands/quickbin function source
(quickbin input output)
 
-
Community Examples

commands/set-tree function source
(set-tree tree)
+

commands/set-tree function source
(set-tree tree)
 
-Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.
Community Examples

commands/show-paths function source
(show-paths)
+Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.

commands/show-paths function source
(show-paths)
 
-
Community Examples

commands/show-rule-tree function source
(show-rule-tree &opt root depth)
+

commands/show-rule-tree function source
(show-rule-tree &opt root depth)
 
-
Community Examples

commands/test function source
(test)
+

commands/test function source
(test)
 
-
Community Examples

commands/update-pkgs function source
(update-pkgs)
+

commands/update-pkgs function source
(update-pkgs)
 
-
Community Examples
+
Command Line Interface Config diff --git a/static/1.31.0/api/jpm/config.html b/static/1.31.0/api/jpm/config.html index 508a8586..acdf4bfc 100644 --- a/static/1.31.0/api/jpm/config.html +++ b/static/1.31.0/api/jpm/config.html @@ -118,111 +118,111 @@

Config

Index

-

config/builtin-configs config/config-checkers config/config-docs config/config-options config/config-parsers config/config-set config/defconf config/dyn:ar config/dyn:auto-shebang config/dyn:binpath config/dyn:build-type config/dyn:buildpath config/dyn:c++ config/dyn:c++-link config/dyn:cc config/dyn:cc-link config/dyn:cflags config/dyn:cflags-verbose config/dyn:config-file config/dyn:cppflags config/dyn:curlpath config/dyn:dest-dir config/dyn:dynamic-cflags config/dyn:dynamic-lflags config/dyn:gitpath config/dyn:headerpath config/dyn:is-msvc config/dyn:janet config/dyn:janet-cflags config/dyn:janet-importlib config/dyn:janet-lflags config/dyn:ldflags config/dyn:lflags config/dyn:libpath config/dyn:local config/dyn:manpath config/dyn:modext config/dyn:modpath config/dyn:nocolor config/dyn:offline config/dyn:optimize config/dyn:pkglist config/dyn:silent config/dyn:statext config/dyn:tarpath config/dyn:test config/dyn:tree config/dyn:update-pkgs config/dyn:use-batch-shell config/dyn:verbose config/dyn:workers config/load-config config/load-config-file config/load-default config/load-options config/opt config/read-env-variables config/save-config config/shorthand-mapping


config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.
Community Examples

config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).
Community Examples

config/config-docs table source
Table of all of the help text for each config option.
Community Examples

config/config-options table source
A table of possible options for enum option types.
Community Examples

config/config-parsers table source
A table of all of the dynamic config bindings to parsers.
Community Examples

config/config-set table source
Listing of all config dyns.
Community Examples

config/defconf macro source
(defconf kw &opt parser docs options)
+

config/builtin-configs config/config-checkers config/config-docs config/config-options config/config-parsers config/config-set config/defconf config/dyn:ar config/dyn:auto-shebang config/dyn:binpath config/dyn:build-type config/dyn:buildpath config/dyn:c++ config/dyn:c++-link config/dyn:cc config/dyn:cc-link config/dyn:cflags config/dyn:cflags-verbose config/dyn:config-file config/dyn:cppflags config/dyn:curlpath config/dyn:dest-dir config/dyn:dynamic-cflags config/dyn:dynamic-lflags config/dyn:gitpath config/dyn:headerpath config/dyn:is-msvc config/dyn:janet config/dyn:janet-cflags config/dyn:janet-importlib config/dyn:janet-lflags config/dyn:ldflags config/dyn:lflags config/dyn:libpath config/dyn:local config/dyn:manpath config/dyn:modext config/dyn:modpath config/dyn:nocolor config/dyn:offline config/dyn:optimize config/dyn:pkglist config/dyn:silent config/dyn:statext config/dyn:tarpath config/dyn:test config/dyn:tree config/dyn:update-pkgs config/dyn:use-batch-shell config/dyn:verbose config/dyn:workers config/load-config config/load-config-file config/load-default config/load-options config/opt config/read-env-variables config/save-config config/shorthand-mapping


config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.

config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).

config/config-docs table source
Table of all of the help text for each config option.

config/config-options table source
A table of possible options for enum option types.

config/config-parsers table source
A table of all of the dynamic config bindings to parsers.

config/config-set table source
Listing of all config dyns.

config/defconf macro source
(defconf kw &opt parser docs options)
 
-Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.
Community Examples

config/dyn:ar function source
(dyn:ar &opt dflt)
+Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.

config/dyn:ar function source
(dyn:ar &opt dflt)
 
-
Community Examples

config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
+

config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
 
-
Community Examples

config/dyn:binpath function source
(dyn:binpath &opt dflt)
+

config/dyn:binpath function source
(dyn:binpath &opt dflt)
 
-
Community Examples

config/dyn:build-type function source
(dyn:build-type &opt dflt)
+

config/dyn:build-type function source
(dyn:build-type &opt dflt)
 
-
Community Examples

config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
+

config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
 
-
Community Examples

config/dyn:c++ function source
(dyn:c++ &opt dflt)
+

config/dyn:c++ function source
(dyn:c++ &opt dflt)
 
-
Community Examples

config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
+

config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
 
-
Community Examples

config/dyn:cc function source
(dyn:cc &opt dflt)
+

config/dyn:cc function source
(dyn:cc &opt dflt)
 
-
Community Examples

config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
+

config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
 
-
Community Examples

config/dyn:cflags function source
(dyn:cflags &opt dflt)
+

config/dyn:cflags function source
(dyn:cflags &opt dflt)
 
-
Community Examples

config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
+

config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
 
-
Community Examples

config/dyn:config-file function source
(dyn:config-file &opt dflt)
+

config/dyn:config-file function source
(dyn:config-file &opt dflt)
 
-
Community Examples

config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
+

config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
 
-
Community Examples

config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
+

config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
 
-
Community Examples

config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
+

config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
 
-
Community Examples

config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
+

config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
 
-
Community Examples

config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
+

config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
 
-
Community Examples

config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
+

config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
 
-
Community Examples

config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
+

config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
 
-
Community Examples

config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
+

config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
 
-
Community Examples

config/dyn:janet function source
(dyn:janet &opt dflt)
+

config/dyn:janet function source
(dyn:janet &opt dflt)
 
-
Community Examples

config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
+

config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
 
-
Community Examples

config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
+

config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
 
-
Community Examples

config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
+

config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
 
-
Community Examples

config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
+

config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
 
-
Community Examples

config/dyn:lflags function source
(dyn:lflags &opt dflt)
+

config/dyn:lflags function source
(dyn:lflags &opt dflt)
 
-
Community Examples

config/dyn:libpath function source
(dyn:libpath &opt dflt)
+

config/dyn:libpath function source
(dyn:libpath &opt dflt)
 
-
Community Examples

config/dyn:local function source
(dyn:local &opt dflt)
+

config/dyn:local function source
(dyn:local &opt dflt)
 
-
Community Examples

config/dyn:manpath function source
(dyn:manpath &opt dflt)
+

config/dyn:manpath function source
(dyn:manpath &opt dflt)
 
-
Community Examples

config/dyn:modext function source
(dyn:modext &opt dflt)
+

config/dyn:modext function source
(dyn:modext &opt dflt)
 
-
Community Examples

config/dyn:modpath function source
(dyn:modpath &opt dflt)
+

config/dyn:modpath function source
(dyn:modpath &opt dflt)
 
-
Community Examples

config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
+

config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
 
-
Community Examples

config/dyn:offline function source
(dyn:offline &opt dflt)
+

config/dyn:offline function source
(dyn:offline &opt dflt)
 
-
Community Examples

config/dyn:optimize function source
(dyn:optimize &opt dflt)
+

config/dyn:optimize function source
(dyn:optimize &opt dflt)
 
-
Community Examples

config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
+

config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
 
-
Community Examples

config/dyn:silent function source
(dyn:silent &opt dflt)
+

config/dyn:silent function source
(dyn:silent &opt dflt)
 
-
Community Examples

config/dyn:statext function source
(dyn:statext &opt dflt)
+

config/dyn:statext function source
(dyn:statext &opt dflt)
 
-
Community Examples

config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
+

config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
 
-
Community Examples

config/dyn:test function source
(dyn:test &opt dflt)
+

config/dyn:test function source
(dyn:test &opt dflt)
 
-
Community Examples

config/dyn:tree function source
(dyn:tree &opt dflt)
+

config/dyn:tree function source
(dyn:tree &opt dflt)
 
-
Community Examples

config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
+

config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
 
-
Community Examples

config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
+

config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
 
-
Community Examples

config/dyn:verbose function source
(dyn:verbose &opt dflt)
+

config/dyn:verbose function source
(dyn:verbose &opt dflt)
 
-
Community Examples

config/dyn:workers function source
(dyn:workers &opt dflt)
+

config/dyn:workers function source
(dyn:workers &opt dflt)
 
-
Community Examples

config/load-config function source
(load-config settings &opt override)
+

config/load-config function source
(load-config settings &opt override)
 
-Load a configuration from a table or struct.
Community Examples

config/load-config-file function source
(load-config-file path &opt override)
+Load a configuration from a table or struct.

config/load-config-file function source
(load-config-file path &opt override)
 
-Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.
Community Examples

config/load-default function source
(load-default &opt override)
+Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.

config/load-default function source
(load-default &opt override)
 
-Load the default configuration.
Community Examples

config/load-options function source
(load-options &opt path)
+Load the default configuration.

config/load-options function source
(load-options &opt path)
 
-Load a file that contains config options that can be set. If no such file exists, then do nothing.
Community Examples

config/opt function source
(opt opts key &opt dflt)
+Load a file that contains config options that can be set. If no such file exists, then do nothing.

config/opt function source
(opt opts key &opt dflt)
 
-Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.
Community Examples

config/read-env-variables function source
(read-env-variables)
+Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.

config/read-env-variables function source
(read-env-variables)
 
-Read environment variables that correspond to config variables into dyns.
Community Examples

config/save-config function source
(save-config path)
+Read environment variables that correspond to config variables into dyns.

config/save-config function source
(save-config path)
 
-Write the current configuration information to a file.
Community Examples

config/shorthand-mapping struct source
Map some single characters to long options.
Community Examples
+Write the current configuration information to a file.

config/shorthand-mapping struct source
Map some single characters to long options.
Commands Configuration Generation diff --git a/static/1.31.0/api/jpm/dagbuild.html b/static/1.31.0/api/jpm/dagbuild.html index 84fc77ab..be636c1a 100644 --- a/static/1.31.0/api/jpm/dagbuild.html +++ b/static/1.31.0/api/jpm/dagbuild.html @@ -120,9 +120,9 @@

Index

dagbuild/pdag dagbuild/pmap


dagbuild/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.
Community Examples

dagbuild/pmap function source
(pmap f data)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.

dagbuild/pmap function source
(pmap f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Community Examples
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Configuration Generation Project Management diff --git a/static/1.31.0/api/jpm/index.html b/static/1.31.0/api/jpm/index.html index a9f37c10..82f41fba 100644 --- a/static/1.31.0/api/jpm/index.html +++ b/static/1.31.0/api/jpm/index.html @@ -120,321 +120,321 @@

Index

jpm/cc/archive-c jpm/cc/compile-c jpm/cc/create-buffer-c jpm/cc/create-buffer-c-impl jpm/cc/create-executable jpm/cc/embed-name jpm/cc/entry-name jpm/cc/entry-replace jpm/cc/link-c jpm/cc/make-bin-source jpm/cc/make-define jpm/cc/make-defines jpm/cc/modpath-to-meta jpm/cc/modpath-to-static jpm/cc/out-path jpm/cgen/add-loader jpm/cgen/ir jpm/cgen/mangle jpm/cgen/print-ir jpm/commands/build jpm/commands/clean jpm/commands/configure jpm/commands/deps jpm/commands/enable-local-mode jpm/commands/help jpm/commands/install jpm/commands/jpm-debug-repl jpm/commands/list-installed jpm/commands/list-pkgs jpm/commands/list-rules jpm/commands/list-tasks jpm/commands/new-c-project jpm/commands/new-exe-project jpm/commands/new-project jpm/commands/quickbin jpm/commands/set-tree jpm/commands/show-paths jpm/commands/show-rule-tree jpm/commands/test jpm/commands/update-pkgs jpm/config/builtin-configs jpm/config/config-checkers jpm/config/config-docs jpm/config/config-options jpm/config/config-parsers jpm/config/config-set jpm/config/defconf jpm/config/dyn:ar jpm/config/dyn:auto-shebang jpm/config/dyn:binpath jpm/config/dyn:build-type jpm/config/dyn:buildpath jpm/config/dyn:c++ jpm/config/dyn:c++-link jpm/config/dyn:cc jpm/config/dyn:cc-link jpm/config/dyn:cflags jpm/config/dyn:cflags-verbose jpm/config/dyn:config-file jpm/config/dyn:cppflags jpm/config/dyn:curlpath jpm/config/dyn:dest-dir jpm/config/dyn:dynamic-cflags jpm/config/dyn:dynamic-lflags jpm/config/dyn:gitpath jpm/config/dyn:headerpath jpm/config/dyn:is-msvc jpm/config/dyn:janet jpm/config/dyn:janet-cflags jpm/config/dyn:janet-importlib jpm/config/dyn:janet-lflags jpm/config/dyn:ldflags jpm/config/dyn:lflags jpm/config/dyn:libpath jpm/config/dyn:local jpm/config/dyn:manpath jpm/config/dyn:modext jpm/config/dyn:modpath jpm/config/dyn:nocolor jpm/config/dyn:offline jpm/config/dyn:optimize jpm/config/dyn:pkglist jpm/config/dyn:silent jpm/config/dyn:statext jpm/config/dyn:tarpath jpm/config/dyn:test jpm/config/dyn:tree jpm/config/dyn:update-pkgs jpm/config/dyn:use-batch-shell jpm/config/dyn:verbose jpm/config/dyn:workers jpm/config/load-config jpm/config/load-config-file jpm/config/load-default jpm/config/load-options jpm/config/opt jpm/config/read-env-variables jpm/config/save-config jpm/config/shorthand-mapping jpm/dagbuild/pdag jpm/dagbuild/pmap jpm/make-config/auto jpm/make-config/generate-config jpm/pm/bundle-install jpm/pm/curl jpm/pm/do-rule jpm/pm/download-bundle jpm/pm/download-git-bundle jpm/pm/download-tar-bundle jpm/pm/git jpm/pm/import-rules jpm/pm/load-lockfile jpm/pm/load-project-meta jpm/pm/make-jpm-env jpm/pm/make-lockfile jpm/pm/out-of-tree-config jpm/pm/post-deps jpm/pm/require-jpm jpm/pm/resolve-bundle jpm/pm/tar jpm/pm/update-git-bundle jpm/pm/update-installed jpm/rules/add-body jpm/rules/add-dep jpm/rules/add-input jpm/rules/add-output jpm/rules/add-thunk jpm/rules/build-rules jpm/rules/getrules jpm/rules/phony jpm/rules/rule jpm/rules/sh-phony jpm/rules/sh-rule jpm/rules/sh-task jpm/rules/task jpm/scaffold/scaffold-project jpm/shutil/abspath jpm/shutil/basename jpm/shutil/clear-cache jpm/shutil/clear-manifest jpm/shutil/clexe-shell jpm/shutil/color jpm/shutil/copy jpm/shutil/copyfile jpm/shutil/create-dirs jpm/shutil/devnull jpm/shutil/dirname jpm/shutil/do-monkeypatch jpm/shutil/drop1-shell jpm/shutil/exec-slurp jpm/shutil/filepath-replace jpm/shutil/find-build-dir jpm/shutil/find-cache jpm/shutil/find-manifest jpm/shutil/find-manifest-dir jpm/shutil/is-mingw jpm/shutil/is-win jpm/shutil/is-win-or-mingw jpm/shutil/path-splitter jpm/shutil/rimraf jpm/shutil/rm jpm/shutil/run-patched jpm/shutil/run-repl jpm/shutil/run-script jpm/shutil/shell jpm/shutil/undo-monkeypatch


jpm/cc/archive-c function source
(archive-c opts target & objects)
 
-Link object files together to make a static library.
Community Examples

jpm/cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
+Link object files together to make a static library.

jpm/cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
 
-Compile a C file into an object file.
Community Examples

jpm/cc/create-buffer-c function source
(create-buffer-c source dest name)
+Compile a C file into an object file.

jpm/cc/create-buffer-c function source
(create-buffer-c source dest name)
 
-Inline raw byte file as a c file.
Community Examples

jpm/cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
+Inline raw byte file as a c file.

jpm/cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
 
-
Community Examples

jpm/cc/create-executable function source
(create-executable opts source dest no-core)
+

jpm/cc/create-executable function source
(create-executable opts source dest no-core)
 
-Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.
Community Examples

jpm/cc/embed-name function source
(embed-name path)
+Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.

jpm/cc/embed-name function source
(embed-name path)
 
-Rename a janet symbol for embedding.
Community Examples

jpm/cc/entry-name function source
(entry-name name)
+Rename a janet symbol for embedding.

jpm/cc/entry-name function source
(entry-name name)
 
-Name of symbol that enters static compilation of a module.
Community Examples

jpm/cc/entry-replace function source
(entry-replace name)
+Name of symbol that enters static compilation of a module.

jpm/cc/entry-replace function source
(entry-replace name)
 
-Escape special characters in the entry-name
Community Examples

jpm/cc/link-c function source
(link-c has-cpp opts target & objects)
+Escape special characters in the entry-name

jpm/cc/link-c function source
(link-c has-cpp opts target & objects)
 
-Link C or C++ object files together to make a native module.
Community Examples

jpm/cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
+Link C or C++ object files together to make a native module.

jpm/cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
 
-
Community Examples

jpm/cc/make-define function source
(make-define define value)
+

jpm/cc/make-define function source
(make-define define value)
 
-Generate strings for adding custom defines to the compiler.
Community Examples

jpm/cc/make-defines function source
(make-defines defines)
+Generate strings for adding custom defines to the compiler.

jpm/cc/make-defines function source
(make-defines defines)
 
-Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.
Community Examples

jpm/cc/modpath-to-meta function source
(modpath-to-meta path)
+Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.

jpm/cc/modpath-to-meta function source
(modpath-to-meta path)
 
-Get the meta file path (.meta.janet) corresponding to a native module path (.so).
Community Examples

jpm/cc/modpath-to-static function source
(modpath-to-static path)
+Get the meta file path (.meta.janet) corresponding to a native module path (.so).

jpm/cc/modpath-to-static function source
(modpath-to-static path)
 
-Get the static library (.a) path corresponding to a native module path (.so).
Community Examples

jpm/cc/out-path function source
(out-path path from-ext to-ext)
+Get the static library (.a) path corresponding to a native module path (.so).

jpm/cc/out-path function source
(out-path path from-ext to-ext)
 
-Take a source file path and convert it to an output path.
Community Examples

jpm/cgen/add-loader function source
(add-loader)
+Take a source file path and convert it to an output path.

jpm/cgen/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

jpm/cgen/ir macro source
(ir & body)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

jpm/cgen/ir macro source
(ir & body)
 
-Macro that automatically quotes the body provided and calls (print-ir ...) on the body.
Community Examples

jpm/cgen/mangle function source
(mangle token)
+Macro that automatically quotes the body provided and calls (print-ir ...) on the body.

jpm/cgen/mangle function source
(mangle token)
 
-Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.
Community Examples

jpm/cgen/print-ir function source
(print-ir ir)
+Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.

jpm/cgen/print-ir function source
(print-ir ir)
 
-Compile the CGEN IR to C and print it to (dyn :out).
Community Examples

jpm/commands/build function source
(build)
+Compile the CGEN IR to C and print it to (dyn :out).

jpm/commands/build function source
(build)
 
-
Community Examples

jpm/commands/clean function source
(clean)
+

jpm/commands/clean function source
(clean)
 
-
Community Examples

jpm/commands/configure function source
(configure &opt path)
+

jpm/commands/configure function source
(configure &opt path)
 
-Setup an out-of-tree build with certain configuration options.
Community Examples

jpm/commands/deps function source
(deps)
+Setup an out-of-tree build with certain configuration options.

jpm/commands/deps function source
(deps)
 
-
Community Examples

jpm/commands/enable-local-mode function source
(enable-local-mode)
+

jpm/commands/enable-local-mode function source
(enable-local-mode)
 
-Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/
Community Examples

jpm/commands/help function source
(help)
+Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/

jpm/commands/help function source
(help)
 
-
Community Examples

jpm/commands/install function source
(install & repo)
+

jpm/commands/install function source
(install & repo)
 
-
Community Examples

jpm/commands/jpm-debug-repl function source
(jpm-debug-repl)
+

jpm/commands/jpm-debug-repl function source
(jpm-debug-repl)
 
-
Community Examples

jpm/commands/list-installed function source
(list-installed)
+

jpm/commands/list-installed function source
(list-installed)
 
-
Community Examples

jpm/commands/list-pkgs function source
(list-pkgs &opt search)
+

jpm/commands/list-pkgs function source
(list-pkgs &opt search)
 
-
Community Examples

jpm/commands/list-rules function source
(list-rules &opt ctx)
+

jpm/commands/list-rules function source
(list-rules &opt ctx)
 
-
Community Examples

jpm/commands/list-tasks function source
(list-tasks &opt ctx)
+

jpm/commands/list-tasks function source
(list-tasks &opt ctx)
 
-
Community Examples

jpm/commands/new-c-project function source
(new-c-project name)
+

jpm/commands/new-c-project function source
(new-c-project name)
 
-Create a new C project
Community Examples

jpm/commands/new-exe-project function source
(new-exe-project name)
+Create a new C project

jpm/commands/new-exe-project function source
(new-exe-project name)
 
-Create a new executable project
Community Examples

jpm/commands/new-project function source
(new-project name)
+Create a new executable project

jpm/commands/new-project function source
(new-project name)
 
-Create a new project
Community Examples

jpm/commands/quickbin function source
(quickbin input output)
+Create a new project

jpm/commands/quickbin function source
(quickbin input output)
 
-
Community Examples

jpm/commands/set-tree function source
(set-tree tree)
+

jpm/commands/set-tree function source
(set-tree tree)
 
-Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.
Community Examples

jpm/commands/show-paths function source
(show-paths)
+Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.

jpm/commands/show-paths function source
(show-paths)
 
-
Community Examples

jpm/commands/show-rule-tree function source
(show-rule-tree &opt root depth)
+

jpm/commands/show-rule-tree function source
(show-rule-tree &opt root depth)
 
-
Community Examples

jpm/commands/test function source
(test)
+

jpm/commands/test function source
(test)
 
-
Community Examples

jpm/commands/update-pkgs function source
(update-pkgs)
+

jpm/commands/update-pkgs function source
(update-pkgs)
 
-
Community Examples

jpm/config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.
Community Examples

jpm/config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).
Community Examples

jpm/config/config-docs table source
Table of all of the help text for each config option.
Community Examples

jpm/config/config-options table source
A table of possible options for enum option types.
Community Examples

jpm/config/config-parsers table source
A table of all of the dynamic config bindings to parsers.
Community Examples

jpm/config/config-set table source
Listing of all config dyns.
Community Examples

jpm/config/defconf macro source
(defconf kw &opt parser docs options)
+

jpm/config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.

jpm/config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).

jpm/config/config-docs table source
Table of all of the help text for each config option.

jpm/config/config-options table source
A table of possible options for enum option types.

jpm/config/config-parsers table source
A table of all of the dynamic config bindings to parsers.

jpm/config/config-set table source
Listing of all config dyns.

jpm/config/defconf macro source
(defconf kw &opt parser docs options)
 
-Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.
Community Examples

jpm/config/dyn:ar function source
(dyn:ar &opt dflt)
+Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.

jpm/config/dyn:ar function source
(dyn:ar &opt dflt)
 
-
Community Examples

jpm/config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
+

jpm/config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
 
-
Community Examples

jpm/config/dyn:binpath function source
(dyn:binpath &opt dflt)
+

jpm/config/dyn:binpath function source
(dyn:binpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:build-type function source
(dyn:build-type &opt dflt)
+

jpm/config/dyn:build-type function source
(dyn:build-type &opt dflt)
 
-
Community Examples

jpm/config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
+

jpm/config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:c++ function source
(dyn:c++ &opt dflt)
+

jpm/config/dyn:c++ function source
(dyn:c++ &opt dflt)
 
-
Community Examples

jpm/config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
+

jpm/config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
 
-
Community Examples

jpm/config/dyn:cc function source
(dyn:cc &opt dflt)
+

jpm/config/dyn:cc function source
(dyn:cc &opt dflt)
 
-
Community Examples

jpm/config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
+

jpm/config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
 
-
Community Examples

jpm/config/dyn:cflags function source
(dyn:cflags &opt dflt)
+

jpm/config/dyn:cflags function source
(dyn:cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
+

jpm/config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
 
-
Community Examples

jpm/config/dyn:config-file function source
(dyn:config-file &opt dflt)
+

jpm/config/dyn:config-file function source
(dyn:config-file &opt dflt)
 
-
Community Examples

jpm/config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
+

jpm/config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
+

jpm/config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
+

jpm/config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
 
-
Community Examples

jpm/config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
+

jpm/config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
+

jpm/config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
+

jpm/config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
+

jpm/config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
+

jpm/config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet function source
(dyn:janet &opt dflt)
+

jpm/config/dyn:janet function source
(dyn:janet &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
+

jpm/config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
+

jpm/config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
+

jpm/config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
+

jpm/config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:lflags function source
(dyn:lflags &opt dflt)
+

jpm/config/dyn:lflags function source
(dyn:lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:libpath function source
(dyn:libpath &opt dflt)
+

jpm/config/dyn:libpath function source
(dyn:libpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:local function source
(dyn:local &opt dflt)
+

jpm/config/dyn:local function source
(dyn:local &opt dflt)
 
-
Community Examples

jpm/config/dyn:manpath function source
(dyn:manpath &opt dflt)
+

jpm/config/dyn:manpath function source
(dyn:manpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:modext function source
(dyn:modext &opt dflt)
+

jpm/config/dyn:modext function source
(dyn:modext &opt dflt)
 
-
Community Examples

jpm/config/dyn:modpath function source
(dyn:modpath &opt dflt)
+

jpm/config/dyn:modpath function source
(dyn:modpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
+

jpm/config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
 
-
Community Examples

jpm/config/dyn:offline function source
(dyn:offline &opt dflt)
+

jpm/config/dyn:offline function source
(dyn:offline &opt dflt)
 
-
Community Examples

jpm/config/dyn:optimize function source
(dyn:optimize &opt dflt)
+

jpm/config/dyn:optimize function source
(dyn:optimize &opt dflt)
 
-
Community Examples

jpm/config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
+

jpm/config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
 
-
Community Examples

jpm/config/dyn:silent function source
(dyn:silent &opt dflt)
+

jpm/config/dyn:silent function source
(dyn:silent &opt dflt)
 
-
Community Examples

jpm/config/dyn:statext function source
(dyn:statext &opt dflt)
+

jpm/config/dyn:statext function source
(dyn:statext &opt dflt)
 
-
Community Examples

jpm/config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
+

jpm/config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:test function source
(dyn:test &opt dflt)
+

jpm/config/dyn:test function source
(dyn:test &opt dflt)
 
-
Community Examples

jpm/config/dyn:tree function source
(dyn:tree &opt dflt)
+

jpm/config/dyn:tree function source
(dyn:tree &opt dflt)
 
-
Community Examples

jpm/config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
+

jpm/config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
 
-
Community Examples

jpm/config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
+

jpm/config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
 
-
Community Examples

jpm/config/dyn:verbose function source
(dyn:verbose &opt dflt)
+

jpm/config/dyn:verbose function source
(dyn:verbose &opt dflt)
 
-
Community Examples

jpm/config/dyn:workers function source
(dyn:workers &opt dflt)
+

jpm/config/dyn:workers function source
(dyn:workers &opt dflt)
 
-
Community Examples

jpm/config/load-config function source
(load-config settings &opt override)
+

jpm/config/load-config function source
(load-config settings &opt override)
 
-Load a configuration from a table or struct.
Community Examples

jpm/config/load-config-file function source
(load-config-file path &opt override)
+Load a configuration from a table or struct.

jpm/config/load-config-file function source
(load-config-file path &opt override)
 
-Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.
Community Examples

jpm/config/load-default function source
(load-default &opt override)
+Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.

jpm/config/load-default function source
(load-default &opt override)
 
-Load the default configuration.
Community Examples

jpm/config/load-options function source
(load-options &opt path)
+Load the default configuration.

jpm/config/load-options function source
(load-options &opt path)
 
-Load a file that contains config options that can be set. If no such file exists, then do nothing.
Community Examples

jpm/config/opt function source
(opt opts key &opt dflt)
+Load a file that contains config options that can be set. If no such file exists, then do nothing.

jpm/config/opt function source
(opt opts key &opt dflt)
 
-Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.
Community Examples

jpm/config/read-env-variables function source
(read-env-variables)
+Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.

jpm/config/read-env-variables function source
(read-env-variables)
 
-Read environment variables that correspond to config variables into dyns.
Community Examples

jpm/config/save-config function source
(save-config path)
+Read environment variables that correspond to config variables into dyns.

jpm/config/save-config function source
(save-config path)
 
-Write the current configuration information to a file.
Community Examples

jpm/config/shorthand-mapping struct source
Map some single characters to long options.
Community Examples

jpm/dagbuild/pdag function source
(pdag f dag &opt n-workers)
+Write the current configuration information to a file.

jpm/config/shorthand-mapping struct source
Map some single characters to long options.

jpm/dagbuild/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.
Community Examples

jpm/dagbuild/pmap function source
(pmap f data)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.

jpm/dagbuild/pmap function source
(pmap f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Community Examples

jpm/make-config/auto function source
(auto)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.

jpm/make-config/auto function source
(auto)
 
-Get an autodetected config.
Community Examples

jpm/make-config/generate-config function source
(generate-config &opt destdir silent as-data)
+Get an autodetected config.

jpm/make-config/generate-config function source
(generate-config &opt destdir silent as-data)
 
-Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Community Examples

jpm/pm/bundle-install function source
(bundle-install bundle &opt no-deps)
+Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.

jpm/pm/bundle-install function source
(bundle-install bundle &opt no-deps)
 
-Install a bundle from a git repository.
Community Examples

jpm/pm/curl function source
(curl & args)
+Install a bundle from a git repository.

jpm/pm/curl function source
(curl & args)
 
-Make a call to curl
Community Examples

jpm/pm/do-rule function source
(do-rule target)
+Make a call to curl

jpm/pm/do-rule function source
(do-rule target)
 
-Evaluate a given rule in a one-off manner.
Community Examples

jpm/pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
+Evaluate a given rule in a one-off manner.

jpm/pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
 
-Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.
Community Examples

jpm/pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
+Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.

jpm/pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
 
-Download a git bundle from a remote respository
Community Examples

jpm/pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
+Download a git bundle from a remote respository

jpm/pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
 
-Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.
Community Examples

jpm/pm/git function source
(git & args)
+Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.

jpm/pm/git function source
(git & args)
 
-Make a call to git.
Community Examples

jpm/pm/import-rules function source
(import-rules path &opt base-env)
+Make a call to git.

jpm/pm/import-rules function source
(import-rules path &opt base-env)
 
-Import another file that defines more rules. This ruleset is merged into the current ruleset.
Community Examples

jpm/pm/load-lockfile function source
(load-lockfile &opt filename)
+Import another file that defines more rules. This ruleset is merged into the current ruleset.

jpm/pm/load-lockfile function source
(load-lockfile &opt filename)
 
-Load packages from a lockfile.
Community Examples

jpm/pm/load-project-meta function source
(load-project-meta &opt path)
+Load packages from a lockfile.

jpm/pm/load-project-meta function source
(load-project-meta &opt path)
 
-Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.
Community Examples

jpm/pm/make-jpm-env function source
(make-jpm-env &opt base-env)
+Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.

jpm/pm/make-jpm-env function source
(make-jpm-env &opt base-env)
 
-Create an environment that is preloaded with jpm symbols.
Community Examples

jpm/pm/make-lockfile function source
(make-lockfile &opt filename)
+Create an environment that is preloaded with jpm symbols.

jpm/pm/make-lockfile function source
(make-lockfile &opt filename)
 
-
Community Examples

jpm/pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
+

jpm/pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
 
-Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.
Community Examples

jpm/pm/post-deps macro source
(post-deps & body)
+Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.

jpm/pm/post-deps macro source
(post-deps & body)
 
-Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.
Community Examples

jpm/pm/require-jpm function source
(require-jpm path &opt base-env)
+Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.

jpm/pm/require-jpm function source
(require-jpm path &opt base-env)
 
-Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.
Community Examples

jpm/pm/resolve-bundle function source
(resolve-bundle bundle)
+Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.

jpm/pm/resolve-bundle function source
(resolve-bundle bundle)
 
-Convert any bundle string/table to the normalized table form.
Community Examples

jpm/pm/tar function source
(tar & args)
+Convert any bundle string/table to the normalized table form.

jpm/pm/tar function source
(tar & args)
 
-Make a call to tar.
Community Examples

jpm/pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
+Make a call to tar.

jpm/pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
 
-Fetch latest tag version from remote repository
Community Examples

jpm/pm/update-installed function source
(update-installed)
+Fetch latest tag version from remote repository

jpm/pm/update-installed function source
(update-installed)
 
-Update all previously installed packages to their latest versions.
Community Examples

jpm/rules/add-body macro source
(add-body target & body)
+Update all previously installed packages to their latest versions.

jpm/rules/add-body macro source
(add-body target & body)
 
-Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.
Community Examples

jpm/rules/add-dep function source
(add-dep target dep)
+Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.

jpm/rules/add-dep function source
(add-dep target dep)
 
-Alias for `add-input`
Community Examples

jpm/rules/add-input function source
(add-input target input)
+Alias for `add-input`

jpm/rules/add-input function source
(add-input target input)
 
-Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.
Community Examples

jpm/rules/add-output function source
(add-output target output)
+Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.

jpm/rules/add-output function source
(add-output target output)
 
-Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.
Community Examples

jpm/rules/add-thunk function source
(add-thunk target thunk)
+Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.

jpm/rules/add-thunk function source
(add-thunk target thunk)
 
-Append a thunk to a target's recipe.
Community Examples

jpm/rules/build-rules function source
(build-rules rules targets &opt n-workers)
+Append a thunk to a target's recipe.

jpm/rules/build-rules function source
(build-rules rules targets &opt n-workers)
 
-Given a graph of all rules, extract a work graph that will build out-of-date files.
Community Examples

jpm/rules/getrules function source
(getrules)
+Given a graph of all rules, extract a work graph that will build out-of-date files.

jpm/rules/getrules function source
(getrules)
 
-
Community Examples

jpm/rules/phony macro source
(phony target deps & body)
+

jpm/rules/phony macro source
(phony target deps & body)
 
-Alias for `task`.
Community Examples

jpm/rules/rule macro source
(rule target deps & body)
+Alias for `task`.

jpm/rules/rule macro source
(rule target deps & body)
 
-Add a rule to the rule graph.
Community Examples

jpm/rules/sh-phony macro source
(sh-phony target deps & body)
+Add a rule to the rule graph.

jpm/rules/sh-phony macro source
(sh-phony target deps & body)
 
-Alias for `sh-task`.
Community Examples

jpm/rules/sh-rule macro source
(sh-rule target deps & body)
+Alias for `sh-task`.

jpm/rules/sh-rule macro source
(sh-rule target deps & body)
 
-Add a rule that invokes a shell command, and fails if the command returns non-zero.
Community Examples

jpm/rules/sh-task macro source
(sh-task target deps & body)
+Add a rule that invokes a shell command, and fails if the command returns non-zero.

jpm/rules/sh-task macro source
(sh-task target deps & body)
 
-Add a task that invokes a shell command, and fails if the command returns non-zero.
Community Examples

jpm/rules/task macro source
(task target deps & body)
+Add a task that invokes a shell command, and fails if the command returns non-zero.

jpm/rules/task macro source
(task target deps & body)
 
-Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
Community Examples

jpm/scaffold/scaffold-project function source
(scaffold-project name &opt options)
+Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).

jpm/scaffold/scaffold-project function source
(scaffold-project name &opt options)
 
-Generate a standardized project scaffold.
Community Examples

jpm/shutil/abspath function source
(abspath path)
+Generate a standardized project scaffold.

jpm/shutil/abspath function source
(abspath path)
 
-Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).
Community Examples

jpm/shutil/basename function source
(basename path)
+Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).

jpm/shutil/basename function source
(basename path)
 
-Get the filename of a path without any leading directory components.
Community Examples

jpm/shutil/clear-cache function source
(clear-cache)
+Get the filename of a path without any leading directory components.

jpm/shutil/clear-cache function source
(clear-cache)
 
-Clear the global git cache.
Community Examples

jpm/shutil/clear-manifest function source
(clear-manifest)
+Clear the global git cache.

jpm/shutil/clear-manifest function source
(clear-manifest)
 
-Clear the global installation manifest.
Community Examples

jpm/shutil/clexe-shell function source
(clexe-shell & args)
+Clear the global installation manifest.

jpm/shutil/clexe-shell function source
(clexe-shell & args)
 
-
Community Examples

jpm/shutil/color function source
(color input-color text)
+

jpm/shutil/color function source
(color input-color text)
 
-Color text with ascii escape sequences if (os/isatty)
Community Examples

jpm/shutil/copy function source
(copy src dest)
+Color text with ascii escape sequences if (os/isatty)

jpm/shutil/copy function source
(copy src dest)
 
-Copy a file or directory recursively from one location to another.
Community Examples

jpm/shutil/copyfile function source
(copyfile src dest)
+Copy a file or directory recursively from one location to another.

jpm/shutil/copyfile function source
(copyfile src dest)
 
-Copy a file one location to another.
Community Examples

jpm/shutil/create-dirs function source
(create-dirs dest)
+Copy a file one location to another.

jpm/shutil/create-dirs function source
(create-dirs dest)
 
-Create all directories needed for a file (mkdir -p).
Community Examples

jpm/shutil/devnull function source
(devnull)
+Create all directories needed for a file (mkdir -p).

jpm/shutil/devnull function source
(devnull)
 
-
Community Examples

jpm/shutil/dirname function source
(dirname path)
+

jpm/shutil/dirname function source
(dirname path)
 
-Get the directory of a file without the filename.
Community Examples

jpm/shutil/do-monkeypatch function source
(do-monkeypatch build-dir)
+Get the directory of a file without the filename.

jpm/shutil/do-monkeypatch function source
(do-monkeypatch build-dir)
 
-Modify the existing environment to have the same paths as the test environment.
Community Examples

jpm/shutil/drop1-shell function source
(drop1-shell std args)
+Modify the existing environment to have the same paths as the test environment.

jpm/shutil/drop1-shell function source
(drop1-shell std args)
 
-Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.
Community Examples

jpm/shutil/exec-slurp function source
(exec-slurp & args)
+Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.

jpm/shutil/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

jpm/shutil/filepath-replace function source
(filepath-replace repo)
+Read stdout of subprocess and return it trimmed in a string.

jpm/shutil/filepath-replace function source
(filepath-replace repo)
 
-Remove special characters from a string or path to make it into a path segment.
Community Examples

jpm/shutil/find-build-dir function source
(find-build-dir)
+Remove special characters from a string or path to make it into a path segment.

jpm/shutil/find-build-dir function source
(find-build-dir)
 
-Gets the build directory to output files to.
Community Examples

jpm/shutil/find-cache function source
(find-cache)
+Gets the build directory to output files to.

jpm/shutil/find-cache function source
(find-cache)
 
-Return the path to the global cache.
Community Examples

jpm/shutil/find-manifest function source
(find-manifest name)
+Return the path to the global cache.

jpm/shutil/find-manifest function source
(find-manifest name)
 
-Get the full path of a manifest file given a package name.
Community Examples

jpm/shutil/find-manifest-dir function source
(find-manifest-dir)
+Get the full path of a manifest file given a package name.

jpm/shutil/find-manifest-dir function source
(find-manifest-dir)
 
-Get the path to the directory containing manifests for installed packages.
Community Examples

jpm/shutil/is-mingw function source
(is-mingw)
+Get the path to the directory containing manifests for installed packages.

jpm/shutil/is-mingw function source
(is-mingw)
 
-Check if built with mingw
Community Examples

jpm/shutil/is-win function source
(is-win)
+Check if built with mingw

jpm/shutil/is-win function source
(is-win)
 
-Check if we should assume a DOS-like shell or default to posix shell.
Community Examples

jpm/shutil/is-win-or-mingw function source
(is-win-or-mingw)
+Check if we should assume a DOS-like shell or default to posix shell.

jpm/shutil/is-win-or-mingw function source
(is-win-or-mingw)
 
-Check if built with mingw
Community Examples

jpm/shutil/path-splitter core/peg source
split paths on / and \.
Community Examples

jpm/shutil/rimraf function source
(rimraf path)
+Check if built with mingw

jpm/shutil/path-splitter core/peg source
split paths on / and \.

jpm/shutil/rimraf function source
(rimraf path)
 
-Hard delete directory tree
Community Examples

jpm/shutil/rm function source
(rm path)
+Hard delete directory tree

jpm/shutil/rm function source
(rm path)
 
-Remove a directory and all sub directories.
Community Examples

jpm/shutil/run-patched function source
(run-patched & extra-args)
+Remove a directory and all sub directories.

jpm/shutil/run-patched function source
(run-patched & extra-args)
 
-Run a subprocess Janet repl that has the same environment as the test environment.
Community Examples

jpm/shutil/run-repl function source
(run-repl)
+Run a subprocess Janet repl that has the same environment as the test environment.

jpm/shutil/run-repl function source
(run-repl)
 
-Run a repl in the monkey patched test environment
Community Examples

jpm/shutil/run-script function source
(run-script path)
+Run a repl in the monkey patched test environment

jpm/shutil/run-script function source
(run-script path)
 
-Run a local script in the monkey patched environment.
Community Examples

jpm/shutil/shell function source
(shell & args)
+Run a local script in the monkey patched environment.

jpm/shutil/shell function source
(shell & args)
 
-Do a shell command
Community Examples

jpm/shutil/undo-monkeypatch function source
(undo-monkeypatch old-builddir)
+Do a shell command

jpm/shutil/undo-monkeypatch function source
(undo-monkeypatch old-builddir)
 
-
Community Examples
+
Integer Types Module Build Rules diff --git a/static/1.31.0/api/jpm/make-config.html b/static/1.31.0/api/jpm/make-config.html index 689e1d32..4479614f 100644 --- a/static/1.31.0/api/jpm/make-config.html +++ b/static/1.31.0/api/jpm/make-config.html @@ -120,9 +120,9 @@

Index

make-config/auto make-config/generate-config


make-config/auto function source
(auto)
 
-Get an autodetected config.
Community Examples

make-config/generate-config function source
(generate-config &opt destdir silent as-data)
+Get an autodetected config.

make-config/generate-config function source
(generate-config &opt destdir silent as-data)
 
-Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Community Examples
+Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Config DAG Build diff --git a/static/1.31.0/api/jpm/pm.html b/static/1.31.0/api/jpm/pm.html index 8db2177c..122532c1 100644 --- a/static/1.31.0/api/jpm/pm.html +++ b/static/1.31.0/api/jpm/pm.html @@ -120,43 +120,43 @@

Index

pm/bundle-install pm/curl pm/do-rule pm/download-bundle pm/download-git-bundle pm/download-tar-bundle pm/git pm/import-rules pm/load-lockfile pm/load-project-meta pm/make-jpm-env pm/make-lockfile pm/out-of-tree-config pm/post-deps pm/require-jpm pm/resolve-bundle pm/tar pm/update-git-bundle pm/update-installed


pm/bundle-install function source
(bundle-install bundle &opt no-deps)
 
-Install a bundle from a git repository.
Community Examples

pm/curl function source
(curl & args)
+Install a bundle from a git repository.

pm/curl function source
(curl & args)
 
-Make a call to curl
Community Examples

pm/do-rule function source
(do-rule target)
+Make a call to curl

pm/do-rule function source
(do-rule target)
 
-Evaluate a given rule in a one-off manner.
Community Examples

pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
+Evaluate a given rule in a one-off manner.

pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
 
-Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.
Community Examples

pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
+Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.

pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
 
-Download a git bundle from a remote respository
Community Examples

pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
+Download a git bundle from a remote respository

pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
 
-Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.
Community Examples

pm/git function source
(git & args)
+Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.

pm/git function source
(git & args)
 
-Make a call to git.
Community Examples

pm/import-rules function source
(import-rules path &opt base-env)
+Make a call to git.

pm/import-rules function source
(import-rules path &opt base-env)
 
-Import another file that defines more rules. This ruleset is merged into the current ruleset.
Community Examples

pm/load-lockfile function source
(load-lockfile &opt filename)
+Import another file that defines more rules. This ruleset is merged into the current ruleset.

pm/load-lockfile function source
(load-lockfile &opt filename)
 
-Load packages from a lockfile.
Community Examples

pm/load-project-meta function source
(load-project-meta &opt path)
+Load packages from a lockfile.

pm/load-project-meta function source
(load-project-meta &opt path)
 
-Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.
Community Examples

pm/make-jpm-env function source
(make-jpm-env &opt base-env)
+Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.

pm/make-jpm-env function source
(make-jpm-env &opt base-env)
 
-Create an environment that is preloaded with jpm symbols.
Community Examples

pm/make-lockfile function source
(make-lockfile &opt filename)
+Create an environment that is preloaded with jpm symbols.

pm/make-lockfile function source
(make-lockfile &opt filename)
 
-
Community Examples

pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
+

pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
 
-Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.
Community Examples

pm/post-deps macro source
(post-deps & body)
+Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.

pm/post-deps macro source
(post-deps & body)
 
-Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.
Community Examples

pm/require-jpm function source
(require-jpm path &opt base-env)
+Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.

pm/require-jpm function source
(require-jpm path &opt base-env)
 
-Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.
Community Examples

pm/resolve-bundle function source
(resolve-bundle bundle)
+Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.

pm/resolve-bundle function source
(resolve-bundle bundle)
 
-Convert any bundle string/table to the normalized table form.
Community Examples

pm/tar function source
(tar & args)
+Convert any bundle string/table to the normalized table form.

pm/tar function source
(tar & args)
 
-Make a call to tar.
Community Examples

pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
+Make a call to tar.

pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
 
-Fetch latest tag version from remote repository
Community Examples

pm/update-installed function source
(update-installed)
+Fetch latest tag version from remote repository

pm/update-installed function source
(update-installed)
 
-Update all previously installed packages to their latest versions.
Community Examples
+Update all previously installed packages to their latest versions.
DAG Build Project Scaffolding diff --git a/static/1.31.0/api/jpm/rules.html b/static/1.31.0/api/jpm/rules.html index 4c5cf15a..85ba5405 100644 --- a/static/1.31.0/api/jpm/rules.html +++ b/static/1.31.0/api/jpm/rules.html @@ -120,31 +120,31 @@

Index

rules/add-body rules/add-dep rules/add-input rules/add-output rules/add-thunk rules/build-rules rules/getrules rules/phony rules/rule rules/sh-phony rules/sh-rule rules/sh-task rules/task


rules/add-body macro source
(add-body target & body)
 
-Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.
Community Examples

rules/add-dep function source
(add-dep target dep)
+Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.

rules/add-dep function source
(add-dep target dep)
 
-Alias for `add-input`
Community Examples

rules/add-input function source
(add-input target input)
+Alias for `add-input`

rules/add-input function source
(add-input target input)
 
-Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.
Community Examples

rules/add-output function source
(add-output target output)
+Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.

rules/add-output function source
(add-output target output)
 
-Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.
Community Examples

rules/add-thunk function source
(add-thunk target thunk)
+Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.

rules/add-thunk function source
(add-thunk target thunk)
 
-Append a thunk to a target's recipe.
Community Examples

rules/build-rules function source
(build-rules rules targets &opt n-workers)
+Append a thunk to a target's recipe.

rules/build-rules function source
(build-rules rules targets &opt n-workers)
 
-Given a graph of all rules, extract a work graph that will build out-of-date files.
Community Examples

rules/getrules function source
(getrules)
+Given a graph of all rules, extract a work graph that will build out-of-date files.

rules/getrules function source
(getrules)
 
-
Community Examples

rules/phony macro source
(phony target deps & body)
+

rules/phony macro source
(phony target deps & body)
 
-Alias for `task`.
Community Examples

rules/rule macro source
(rule target deps & body)
+Alias for `task`.

rules/rule macro source
(rule target deps & body)
 
-Add a rule to the rule graph.
Community Examples

rules/sh-phony macro source
(sh-phony target deps & body)
+Add a rule to the rule graph.

rules/sh-phony macro source
(sh-phony target deps & body)
 
-Alias for `sh-task`.
Community Examples

rules/sh-rule macro source
(sh-rule target deps & body)
+Alias for `sh-task`.

rules/sh-rule macro source
(sh-rule target deps & body)
 
-Add a rule that invokes a shell command, and fails if the command returns non-zero.
Community Examples

rules/sh-task macro source
(sh-task target deps & body)
+Add a rule that invokes a shell command, and fails if the command returns non-zero.

rules/sh-task macro source
(sh-task target deps & body)
 
-Add a task that invokes a shell command, and fails if the command returns non-zero.
Community Examples

rules/task macro source
(task target deps & body)
+Add a task that invokes a shell command, and fails if the command returns non-zero.

rules/task macro source
(task target deps & body)
 
-Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
Community Examples
+Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
JPM C Compiler diff --git a/static/1.31.0/api/jpm/scaffold.html b/static/1.31.0/api/jpm/scaffold.html index b52f6a26..bb2f7b98 100644 --- a/static/1.31.0/api/jpm/scaffold.html +++ b/static/1.31.0/api/jpm/scaffold.html @@ -120,7 +120,7 @@

Index

scaffold/scaffold-project


scaffold/scaffold-project function source
(scaffold-project name &opt options)
 
-Generate a standardized project scaffold.
Community Examples
+Generate a standardized project scaffold.
Project Management Shell Utilities diff --git a/static/1.31.0/api/jpm/shutil.html b/static/1.31.0/api/jpm/shutil.html index 0819ce5c..f1eabaae 100644 --- a/static/1.31.0/api/jpm/shutil.html +++ b/static/1.31.0/api/jpm/shutil.html @@ -120,63 +120,63 @@

Index

shutil/abspath shutil/basename shutil/clear-cache shutil/clear-manifest shutil/clexe-shell shutil/color shutil/copy shutil/copyfile shutil/create-dirs shutil/devnull shutil/dirname shutil/do-monkeypatch shutil/drop1-shell shutil/exec-slurp shutil/filepath-replace shutil/find-build-dir shutil/find-cache shutil/find-manifest shutil/find-manifest-dir shutil/is-mingw shutil/is-win shutil/is-win-or-mingw shutil/path-splitter shutil/rimraf shutil/rm shutil/run-patched shutil/run-repl shutil/run-script shutil/shell shutil/undo-monkeypatch


shutil/abspath function source
(abspath path)
 
-Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).
Community Examples

shutil/basename function source
(basename path)
+Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).

shutil/basename function source
(basename path)
 
-Get the filename of a path without any leading directory components.
Community Examples

shutil/clear-cache function source
(clear-cache)
+Get the filename of a path without any leading directory components.

shutil/clear-cache function source
(clear-cache)
 
-Clear the global git cache.
Community Examples

shutil/clear-manifest function source
(clear-manifest)
+Clear the global git cache.

shutil/clear-manifest function source
(clear-manifest)
 
-Clear the global installation manifest.
Community Examples

shutil/clexe-shell function source
(clexe-shell & args)
+Clear the global installation manifest.

shutil/clexe-shell function source
(clexe-shell & args)
 
-
Community Examples

shutil/color function source
(color input-color text)
+

shutil/color function source
(color input-color text)
 
-Color text with ascii escape sequences if (os/isatty)
Community Examples

shutil/copy function source
(copy src dest)
+Color text with ascii escape sequences if (os/isatty)

shutil/copy function source
(copy src dest)
 
-Copy a file or directory recursively from one location to another.
Community Examples

shutil/copyfile function source
(copyfile src dest)
+Copy a file or directory recursively from one location to another.

shutil/copyfile function source
(copyfile src dest)
 
-Copy a file one location to another.
Community Examples

shutil/create-dirs function source
(create-dirs dest)
+Copy a file one location to another.

shutil/create-dirs function source
(create-dirs dest)
 
-Create all directories needed for a file (mkdir -p).
Community Examples

shutil/devnull function source
(devnull)
+Create all directories needed for a file (mkdir -p).

shutil/devnull function source
(devnull)
 
-
Community Examples

shutil/dirname function source
(dirname path)
+

shutil/dirname function source
(dirname path)
 
-Get the directory of a file without the filename.
Community Examples

shutil/do-monkeypatch function source
(do-monkeypatch build-dir)
+Get the directory of a file without the filename.

shutil/do-monkeypatch function source
(do-monkeypatch build-dir)
 
-Modify the existing environment to have the same paths as the test environment.
Community Examples

shutil/drop1-shell function source
(drop1-shell std args)
+Modify the existing environment to have the same paths as the test environment.

shutil/drop1-shell function source
(drop1-shell std args)
 
-Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.
Community Examples

shutil/exec-slurp function source
(exec-slurp & args)
+Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.

shutil/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

shutil/filepath-replace function source
(filepath-replace repo)
+Read stdout of subprocess and return it trimmed in a string.

shutil/filepath-replace function source
(filepath-replace repo)
 
-Remove special characters from a string or path to make it into a path segment.
Community Examples

shutil/find-build-dir function source
(find-build-dir)
+Remove special characters from a string or path to make it into a path segment.

shutil/find-build-dir function source
(find-build-dir)
 
-Gets the build directory to output files to.
Community Examples

shutil/find-cache function source
(find-cache)
+Gets the build directory to output files to.

shutil/find-cache function source
(find-cache)
 
-Return the path to the global cache.
Community Examples

shutil/find-manifest function source
(find-manifest name)
+Return the path to the global cache.

shutil/find-manifest function source
(find-manifest name)
 
-Get the full path of a manifest file given a package name.
Community Examples

shutil/find-manifest-dir function source
(find-manifest-dir)
+Get the full path of a manifest file given a package name.

shutil/find-manifest-dir function source
(find-manifest-dir)
 
-Get the path to the directory containing manifests for installed packages.
Community Examples

shutil/is-mingw function source
(is-mingw)
+Get the path to the directory containing manifests for installed packages.

shutil/is-mingw function source
(is-mingw)
 
-Check if built with mingw
Community Examples

shutil/is-win function source
(is-win)
+Check if built with mingw

shutil/is-win function source
(is-win)
 
-Check if we should assume a DOS-like shell or default to posix shell.
Community Examples

shutil/is-win-or-mingw function source
(is-win-or-mingw)
+Check if we should assume a DOS-like shell or default to posix shell.

shutil/is-win-or-mingw function source
(is-win-or-mingw)
 
-Check if built with mingw
Community Examples

shutil/path-splitter core/peg source
split paths on / and \.
Community Examples

shutil/rimraf function source
(rimraf path)
+Check if built with mingw

shutil/path-splitter core/peg source
split paths on / and \.

shutil/rimraf function source
(rimraf path)
 
-Hard delete directory tree
Community Examples

shutil/rm function source
(rm path)
+Hard delete directory tree

shutil/rm function source
(rm path)
 
-Remove a directory and all sub directories.
Community Examples

shutil/run-patched function source
(run-patched & extra-args)
+Remove a directory and all sub directories.

shutil/run-patched function source
(run-patched & extra-args)
 
-Run a subprocess Janet repl that has the same environment as the test environment.
Community Examples

shutil/run-repl function source
(run-repl)
+Run a subprocess Janet repl that has the same environment as the test environment.

shutil/run-repl function source
(run-repl)
 
-Run a repl in the monkey patched test environment
Community Examples

shutil/run-script function source
(run-script path)
+Run a repl in the monkey patched test environment

shutil/run-script function source
(run-script path)
 
-Run a local script in the monkey patched environment.
Community Examples

shutil/shell function source
(shell & args)
+Run a local script in the monkey patched environment.

shutil/shell function source
(shell & args)
 
-Do a shell command
Community Examples

shutil/undo-monkeypatch function source
(undo-monkeypatch old-builddir)
+Do a shell command

shutil/undo-monkeypatch function source
(undo-monkeypatch old-builddir)
 
-
Community Examples
+
Project Scaffolding Math Module diff --git a/static/1.31.0/api/spork/argparse.html b/static/1.31.0/api/spork/argparse.html index 6a9e9df1..d0337764 100644 --- a/static/1.31.0/api/spork/argparse.html +++ b/static/1.31.0/api/spork/argparse.html @@ -153,7 +153,7 @@

Index Once parsed, values are accessible in the returned table by the name of the option. For example `(result "verbose")` will check if the verbose flag is enabled. -You may also use a custom args array when specified via the special option `:args`.Community Examples

+You may also use a custom args array when specified via the special option `:args`.
Spork Base64 diff --git a/static/1.31.0/api/spork/base64.html b/static/1.31.0/api/spork/base64.html index ec1cab1e..554785e4 100644 --- a/static/1.31.0/api/spork/base64.html +++ b/static/1.31.0/api/spork/base64.html @@ -121,9 +121,9 @@

Index

base64/decode base64/encode


base64/decode function source
(decode s)
 
 Converts a base64 encoded string to its binary representation of any format
-(UTF-8, binary, ..).
Community Examples

base64/encode function source
(encode s)
+(UTF-8, binary, ..).

base64/encode function source
(encode s)
 
-Converts a string of any format (UTF-8, binary, ..) to base64 encoding.
Community Examples
+Converts a string of any format (UTF-8, binary, ..) to base64 encoding.

Argument Parsing CRC diff --git a/static/1.31.0/api/spork/crc.html b/static/1.31.0/api/spork/crc.html index ab10021b..ae2b310b 100644 --- a/static/1.31.0/api/spork/crc.html +++ b/static/1.31.0/api/spork/crc.html @@ -120,9 +120,9 @@

Index

crc/make-variant crc/named-variant


crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
 
-Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.
Community Examples

crc/named-variant cfunction source
(crc/named-variant name)
+Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.

crc/named-variant cfunction source
(crc/named-variant name)
 
-Get a named CRC variant.
Community Examples
+Get a named CRC variant.
Base64 Cron diff --git a/static/1.31.0/api/spork/cron.html b/static/1.31.0/api/spork/cron.html index 53f420a7..a4cc4cf9 100644 --- a/static/1.31.0/api/spork/cron.html +++ b/static/1.31.0/api/spork/cron.html @@ -120,11 +120,11 @@

Index

cron/check cron/next-timestamp cron/parse-cron


cron/check function source
(check cron &opt time local)
 
-Check if a given time matches a cron specifier.
Community Examples

cron/next-timestamp function source
(next-timestamp cron &opt time local)
+Check if a given time matches a cron specifier.

cron/next-timestamp function source
(next-timestamp cron &opt time local)
 
-Given a cron schedule, get the next instance on the cron tab after time
Community Examples

cron/parse-cron function source
(parse-cron str)
+Given a cron schedule, get the next instance on the cron tab after time

cron/parse-cron function source
(parse-cron str)
 
-Parse a cron string into a valid cron schedule object
Community Examples
+Parse a cron string into a valid cron schedule object
CRC EV Utilities diff --git a/static/1.31.0/api/spork/ev-utils.html b/static/1.31.0/api/spork/ev-utils.html index 70f7095f..a3ea3e01 100644 --- a/static/1.31.0/api/spork/ev-utils.html +++ b/static/1.31.0/api/spork/ev-utils.html @@ -120,27 +120,27 @@

Index

ev-utils/go-nursery ev-utils/join-nursery ev-utils/multithread-service ev-utils/nursery ev-utils/pcall ev-utils/pdag ev-utils/pmap ev-utils/pmap-full ev-utils/pmap-limited ev-utils/spawn-nursery ev-utils/wait-cancel


ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
 
-Spawn a fiber into a nursery, similar to ev/go.
Community Examples

ev-utils/join-nursery function source
(join-nursery nurse)
+Spawn a fiber into a nursery, similar to ev/go.

ev-utils/join-nursery function source
(join-nursery nurse)
 
-Suspend the current fiber until the nursery is emptied.
Community Examples

ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
+Suspend the current fiber until the nursery is emptied.

ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
 
-Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.
Community Examples

ev-utils/nursery function source
(nursery)
+Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.

ev-utils/nursery function source
(nursery)
 
-Group a number of fibers into a single object for structured concurrency
Community Examples

ev-utils/pcall function source
(pcall f n)
+Group a number of fibers into a single object for structured concurrency

ev-utils/pcall function source
(pcall f n)
 
-Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.
Community Examples

ev-utils/pdag function source
(pdag f dag &opt n-workers)
+Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.

ev-utils/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.
Community Examples

ev-utils/pmap function source
(pmap f data &opt n-workers)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.

ev-utils/pmap function source
(pmap f data &opt n-workers)
 
-Map `f` over data in parallel, optionally limiting parallelism to `n` workers.
Community Examples

ev-utils/pmap-full function source
(pmap-full f data)
+Map `f` over data in parallel, optionally limiting parallelism to `n` workers.

ev-utils/pmap-full function source
(pmap-full f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.
Community Examples

ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.

ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
 
-Similar to pmap-full, but only runs work n-ways parallel.
Community Examples

ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
+Similar to pmap-full, but only runs work n-ways parallel.

ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
 
-Similar to ev/spawn but associate spawned fibers with a nursery
Community Examples

ev-utils/wait-cancel macro source
(wait-cancel & body)
+Similar to ev/spawn but associate spawned fibers with a nursery

ev-utils/wait-cancel macro source
(wait-cancel & body)
 
-Wait forever until the current fiber is canceled, and then run some cleanup code.
Community Examples
+Wait forever until the current fiber is canceled, and then run some cleanup code.
Cron Format diff --git a/static/1.31.0/api/spork/fmt.html b/static/1.31.0/api/spork/fmt.html index 0a9df392..32061517 100644 --- a/static/1.31.0/api/spork/fmt.html +++ b/static/1.31.0/api/spork/fmt.html @@ -118,13 +118,13 @@

Format

Index

-

fmt/*user-indent-2-forms* fmt/format fmt/format-file fmt/format-print


fmt/*user-indent-2-forms* keyword source
A user list of forms that are control forms and should be indented two spaces.
Community Examples

fmt/format function source
(format source)
+

fmt/*user-indent-2-forms* fmt/format fmt/format-file fmt/format-print


fmt/*user-indent-2-forms* keyword source
A user list of forms that are control forms and should be indented two spaces.

fmt/format function source
(format source)
 
-Format a string of source code to a buffer.
Community Examples

fmt/format-file function source
(format-file file)
+Format a string of source code to a buffer.

fmt/format-file function source
(format-file file)
 
-Format a file
Community Examples

fmt/format-print function source
(format-print source)
+Format a file

fmt/format-print function source
(format-print source)
 
-Format a string of source code and print the result.
Community Examples
+Format a string of source code and print the result.
EV Utilities Generators diff --git a/static/1.31.0/api/spork/generators.html b/static/1.31.0/api/spork/generators.html index 20c19eb4..200df357 100644 --- a/static/1.31.0/api/spork/generators.html +++ b/static/1.31.0/api/spork/generators.html @@ -120,35 +120,35 @@

Index

generators/concat generators/cycle generators/drop generators/drop-until generators/drop-while generators/filter generators/from-iterable generators/map generators/mapcat generators/range generators/run generators/take generators/take-until generators/take-while generators/to-array


generators/concat function source
(concat & xs)
 
-Concatenate one or more generators or iterables into a single generator.
Community Examples

generators/cycle function source
(cycle ds)
+Concatenate one or more generators or iterables into a single generator.

generators/cycle function source
(cycle ds)
 
-Repeatedly yield the elements of `ds`, looping back to the beginning when finished.
Community Examples

generators/drop function source
(drop n ds)
+Repeatedly yield the elements of `ds`, looping back to the beginning when finished.

generators/drop function source
(drop n ds)
 
-Drop `n` elements from `ds`.
Community Examples

generators/drop-until function source
(drop-until p ds)
+Drop `n` elements from `ds`.

generators/drop-until function source
(drop-until p ds)
 
-Drop elements from `ds` until `p` is true.
Community Examples

generators/drop-while function source
(drop-while p ds)
+Drop elements from `ds` until `p` is true.

generators/drop-while function source
(drop-while p ds)
 
-Drop elements from `ds` while `p` is true.
Community Examples

generators/filter function source
(filter p ds)
+Drop elements from `ds` while `p` is true.

generators/filter function source
(filter p ds)
 
-Create a generator that filters `ds` with `p`.
Community Examples

generators/from-iterable function source
(from-iterable ds)
+Create a generator that filters `ds` with `p`.

generators/from-iterable function source
(from-iterable ds)
 
-Create a new generator around any iterable data structure.
Community Examples

generators/map function source
(map f ds)
+Create a new generator around any iterable data structure.

generators/map function source
(map f ds)
 
-Create a generator that maps `f` over `ds`.
Community Examples

generators/mapcat function source
(mapcat f ds)
+Create a generator that maps `f` over `ds`.

generators/mapcat function source
(mapcat f ds)
 
-Map `f` over `ds`, concatenating the results into a new generator.
Community Examples

generators/range function source
(range from to)
+Map `f` over `ds`, concatenating the results into a new generator.

generators/range function source
(range from to)
 
-Create a lazy range.
Community Examples

generators/run function source
(run s)
+Create a lazy range.

generators/run function source
(run s)
 
-Evaluate `s` for side effects.
Community Examples

generators/take function source
(take n ds)
+Evaluate `s` for side effects.

generators/take function source
(take n ds)
 
-Take `n` elements from iterable `ds`.
Community Examples

generators/take-until function source
(take-until p ds)
+Take `n` elements from iterable `ds`.

generators/take-until function source
(take-until p ds)
 
-Return elements from `ds` until `p` is true.
Community Examples

generators/take-while function source
(take-while p ds)
+Return elements from `ds` until `p` is true.

generators/take-while function source
(take-while p ds)
 
-Return elements from `ds` while `p` is true.
Community Examples

generators/to-array function source
(to-array s)
+Return elements from `ds` while `p` is true.

generators/to-array function source
(to-array s)
 
-Consume `s` into a new array.
Community Examples
+Consume `s` into a new array.
Format Getline diff --git a/static/1.31.0/api/spork/getline.html b/static/1.31.0/api/spork/getline.html index dbb1fdd8..0005d22a 100644 --- a/static/1.31.0/api/spork/getline.html +++ b/static/1.31.0/api/spork/getline.html @@ -120,13 +120,13 @@

Index

getline/default-autocomplete-context getline/default-autocomplete-options getline/default-doc-fetch getline/make-getline getline/max-history


getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
 
-Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.
Community Examples

getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
+Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.

getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
 
-Default handler to get available autocomplete options for a given substring.
Community Examples

getline/default-doc-fetch function source
(default-doc-fetch sym w &)
+Default handler to get available autocomplete options for a given substring.

getline/default-doc-fetch function source
(default-doc-fetch sym w &)
 
-Default handler for Ctrl-G to lookup docstrings in the current environment.
Community Examples

getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
+Default handler for Ctrl-G to lookup docstrings in the current environment.

getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
 
-Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.
Community Examples

getline/max-history number source
Maximal amount of items in the history
Community Examples
+Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.

getline/max-history number source
Maximal amount of items in the history
Generators HTML Generation diff --git a/static/1.31.0/api/spork/htmlgen.html b/static/1.31.0/api/spork/htmlgen.html index 4bdf06db..3cd65322 100644 --- a/static/1.31.0/api/spork/htmlgen.html +++ b/static/1.31.0/api/spork/htmlgen.html @@ -118,13 +118,13 @@

HTML Generation

Index

-

htmlgen/doctype-html htmlgen/escape htmlgen/html htmlgen/raw


htmlgen/doctype-html function source
The html5 doctype header
Community Examples

htmlgen/escape function source
(escape x)
+

htmlgen/doctype-html htmlgen/escape htmlgen/html htmlgen/raw


htmlgen/doctype-html function source
The html5 doctype header

htmlgen/escape function source
(escape x)
 
-Escape characters in a string for HTML
Community Examples

htmlgen/html function source
(html data &opt buf)
+Escape characters in a string for HTML

htmlgen/html function source
(html data &opt buf)
 
-Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.
Community Examples

htmlgen/raw function source
(raw text)
+Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.

htmlgen/raw function source
(raw text)
 
-Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Community Examples
+Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Getline HTTP diff --git a/static/1.31.0/api/spork/http.html b/static/1.31.0/api/spork/http.html index a301524c..1a8f8b24 100644 --- a/static/1.31.0/api/spork/http.html +++ b/static/1.31.0/api/spork/http.html @@ -118,29 +118,29 @@

HTTP

Index

-

http/cookie-grammar http/cookies http/logger http/middleware http/query-string-grammar http/read-body http/read-request http/read-response http/request http/request-peg http/response-peg http/router http/send-response http/server http/server-handler http/status-messages http/url-grammar


http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.
Community Examples

http/cookies function source
(cookies nextmw)
+

http/cookie-grammar http/cookies http/logger http/middleware http/query-string-grammar http/read-body http/read-request http/read-response http/request http/request-peg http/response-peg http/router http/send-response http/server http/server-handler http/status-messages http/url-grammar


http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.

http/cookies function source
(cookies nextmw)
 
-Parses cookies into the table under :cookies key
Community Examples

http/logger function source
(logger nextmw)
+Parses cookies into the table under :cookies key

http/logger function source
(logger nextmw)
 
-Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.
Community Examples

http/middleware function source
(middleware x)
+Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.

http/middleware function source
(middleware x)
 
-Coerce any type to http middleware
Community Examples

http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.
Community Examples

http/read-body function source
(read-body req)
+Coerce any type to http middleware

http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.

http/read-body function source
(read-body req)
 
-Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.
Community Examples

http/read-request function source
(read-request conn buf &opt no-query)
+Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.

http/read-request function source
(read-request conn buf &opt no-query)
 
-Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`
Community Examples

http/read-response function source
(read-response conn buf)
+Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`

http/read-response function source
(read-response conn buf)
 
-Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`
Community Examples

http/request function source
(request method url &keys {:headers headers :body body})
+Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`

http/request function source
(request method url &keys {:headers headers :body body})
 
-Make an HTTP request to a server. Returns a table containing response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.
Community Examples

http/request-peg core/peg source
PEG for parsing HTTP requests
Community Examples

http/response-peg core/peg source
PEG for parsing HTTP responses
Community Examples

http/router function source
(router routes)
+Make an HTTP request to a server. Returns a table containing response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.

http/request-peg core/peg source
PEG for parsing HTTP requests

http/response-peg core/peg source
PEG for parsing HTTP responses

http/router function source
(router routes)
 
-Creates a router middleware. A router will dispatch to different routes based on the URL path.
Community Examples

http/send-response function source
(send-response conn response &opt buf)
+Creates a router middleware. A router will dispatch to different routes based on the URL path.

http/send-response function source
(send-response conn response &opt buf)
 
-Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.
Community Examples

http/server function source
(server handler &opt host port)
+Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.

http/server function source
(server handler &opt host port)
 
-Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.
Community Examples

http/server-handler function source
(server-handler conn handler)
+Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.

http/server-handler function source
(server-handler conn handler)
 
-A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.
Community Examples

http/status-messages struct source
Mapping of HTTP status codes to their status message.
Community Examples

http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
Community Examples
+A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.

http/status-messages struct source
Mapping of HTTP status codes to their status message.

http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
HTML Generation HTTP Framework diff --git a/static/1.31.0/api/spork/httpf.html b/static/1.31.0/api/spork/httpf.html index 4c9f47d7..cde34493 100644 --- a/static/1.31.0/api/spork/httpf.html +++ b/static/1.31.0/api/spork/httpf.html @@ -120,15 +120,15 @@

Index

httpf/add-bindings-as-routes httpf/add-route httpf/default-payload-wrapper httpf/listen httpf/server


httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
 
-Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.
Community Examples

httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
+Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.

httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
 
-Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.
Community Examples

httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
+Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.

httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
 
-Add some metadata to all responses
Community Examples

httpf/listen function source
(listen server &opt host port n-workers)
+Add some metadata to all responses

httpf/listen function source
(listen server &opt host port n-workers)
 
-Start server
Community Examples

httpf/server function source
(server &opt parent)
+Start server

httpf/server function source
(server &opt parent)
 
-Create a new server.
Community Examples
+Create a new server.
HTTP JSON diff --git a/static/1.31.0/api/spork/index.html b/static/1.31.0/api/spork/index.html index 9a493a7c..793200a6 100644 --- a/static/1.31.0/api/spork/index.html +++ b/static/1.31.0/api/spork/index.html @@ -158,256 +158,256 @@

Spork

Once parsed, values are accessible in the returned table by the name of the option. For example `(result "verbose")` will check if the verbose flag is enabled. -You may also use a custom args array when specified via the special option `:args`.Community Examples

spork/base64/decode function source
(decode s)
+You may also use a custom args array when specified via the special option `:args`.

spork/base64/decode function source
(decode s)
 
 Converts a base64 encoded string to its binary representation of any format
-(UTF-8, binary, ..).
Community Examples

spork/base64/encode function source
(encode s)
+(UTF-8, binary, ..).

spork/base64/encode function source
(encode s)
 
-Converts a string of any format (UTF-8, binary, ..) to base64 encoding.
Community Examples

spork/crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
+Converts a string of any format (UTF-8, binary, ..) to base64 encoding.

spork/crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
 
-Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.
Community Examples

spork/crc/named-variant cfunction source
(crc/named-variant name)
+Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.

spork/crc/named-variant cfunction source
(crc/named-variant name)
 
-Get a named CRC variant.
Community Examples

spork/cron/check function source
(check cron &opt time local)
+Get a named CRC variant.

spork/cron/check function source
(check cron &opt time local)
 
-Check if a given time matches a cron specifier.
Community Examples

spork/cron/next-timestamp function source
(next-timestamp cron &opt time local)
+Check if a given time matches a cron specifier.

spork/cron/next-timestamp function source
(next-timestamp cron &opt time local)
 
-Given a cron schedule, get the next instance on the cron tab after time
Community Examples

spork/cron/parse-cron function source
(parse-cron str)
+Given a cron schedule, get the next instance on the cron tab after time

spork/cron/parse-cron function source
(parse-cron str)
 
-Parse a cron string into a valid cron schedule object
Community Examples

spork/ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
+Parse a cron string into a valid cron schedule object

spork/ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
 
-Spawn a fiber into a nursery, similar to ev/go.
Community Examples

spork/ev-utils/join-nursery function source
(join-nursery nurse)
+Spawn a fiber into a nursery, similar to ev/go.

spork/ev-utils/join-nursery function source
(join-nursery nurse)
 
-Suspend the current fiber until the nursery is emptied.
Community Examples

spork/ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
+Suspend the current fiber until the nursery is emptied.

spork/ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
 
-Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.
Community Examples

spork/ev-utils/nursery function source
(nursery)
+Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.

spork/ev-utils/nursery function source
(nursery)
 
-Group a number of fibers into a single object for structured concurrency
Community Examples

spork/ev-utils/pcall function source
(pcall f n)
+Group a number of fibers into a single object for structured concurrency

spork/ev-utils/pcall function source
(pcall f n)
 
-Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.
Community Examples

spork/ev-utils/pdag function source
(pdag f dag &opt n-workers)
+Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.

spork/ev-utils/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.
Community Examples

spork/ev-utils/pmap function source
(pmap f data &opt n-workers)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.

spork/ev-utils/pmap function source
(pmap f data &opt n-workers)
 
-Map `f` over data in parallel, optionally limiting parallelism to `n` workers.
Community Examples

spork/ev-utils/pmap-full function source
(pmap-full f data)
+Map `f` over data in parallel, optionally limiting parallelism to `n` workers.

spork/ev-utils/pmap-full function source
(pmap-full f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.
Community Examples

spork/ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.

spork/ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
 
-Similar to pmap-full, but only runs work n-ways parallel.
Community Examples

spork/ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
+Similar to pmap-full, but only runs work n-ways parallel.

spork/ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
 
-Similar to ev/spawn but associate spawned fibers with a nursery
Community Examples

spork/ev-utils/wait-cancel macro source
(wait-cancel & body)
+Similar to ev/spawn but associate spawned fibers with a nursery

spork/ev-utils/wait-cancel macro source
(wait-cancel & body)
 
-Wait forever until the current fiber is canceled, and then run some cleanup code.
Community Examples

spork/fmt/*user-indent-2-forms* keyword source
A user list of forms that are control forms and should be indented two spaces.
Community Examples

spork/fmt/format function source
(format source)
+Wait forever until the current fiber is canceled, and then run some cleanup code.

spork/fmt/*user-indent-2-forms* keyword source
A user list of forms that are control forms and should be indented two spaces.

spork/fmt/format function source
(format source)
 
-Format a string of source code to a buffer.
Community Examples

spork/fmt/format-file function source
(format-file file)
+Format a string of source code to a buffer.

spork/fmt/format-file function source
(format-file file)
 
-Format a file
Community Examples

spork/fmt/format-print function source
(format-print source)
+Format a file

spork/fmt/format-print function source
(format-print source)
 
-Format a string of source code and print the result.
Community Examples

spork/generators/concat function source
(concat & xs)
+Format a string of source code and print the result.

spork/generators/concat function source
(concat & xs)
 
-Concatenate one or more generators or iterables into a single generator.
Community Examples

spork/generators/cycle function source
(cycle ds)
+Concatenate one or more generators or iterables into a single generator.

spork/generators/cycle function source
(cycle ds)
 
-Repeatedly yield the elements of `ds`, looping back to the beginning when finished.
Community Examples

spork/generators/drop function source
(drop n ds)
+Repeatedly yield the elements of `ds`, looping back to the beginning when finished.

spork/generators/drop function source
(drop n ds)
 
-Drop `n` elements from `ds`.
Community Examples

spork/generators/drop-until function source
(drop-until p ds)
+Drop `n` elements from `ds`.

spork/generators/drop-until function source
(drop-until p ds)
 
-Drop elements from `ds` until `p` is true.
Community Examples

spork/generators/drop-while function source
(drop-while p ds)
+Drop elements from `ds` until `p` is true.

spork/generators/drop-while function source
(drop-while p ds)
 
-Drop elements from `ds` while `p` is true.
Community Examples

spork/generators/filter function source
(filter p ds)
+Drop elements from `ds` while `p` is true.

spork/generators/filter function source
(filter p ds)
 
-Create a generator that filters `ds` with `p`.
Community Examples

spork/generators/from-iterable function source
(from-iterable ds)
+Create a generator that filters `ds` with `p`.

spork/generators/from-iterable function source
(from-iterable ds)
 
-Create a new generator around any iterable data structure.
Community Examples

spork/generators/map function source
(map f ds)
+Create a new generator around any iterable data structure.

spork/generators/map function source
(map f ds)
 
-Create a generator that maps `f` over `ds`.
Community Examples

spork/generators/mapcat function source
(mapcat f ds)
+Create a generator that maps `f` over `ds`.

spork/generators/mapcat function source
(mapcat f ds)
 
-Map `f` over `ds`, concatenating the results into a new generator.
Community Examples

spork/generators/range function source
(range from to)
+Map `f` over `ds`, concatenating the results into a new generator.

spork/generators/range function source
(range from to)
 
-Create a lazy range.
Community Examples

spork/generators/run function source
(run s)
+Create a lazy range.

spork/generators/run function source
(run s)
 
-Evaluate `s` for side effects.
Community Examples

spork/generators/take function source
(take n ds)
+Evaluate `s` for side effects.

spork/generators/take function source
(take n ds)
 
-Take `n` elements from iterable `ds`.
Community Examples

spork/generators/take-until function source
(take-until p ds)
+Take `n` elements from iterable `ds`.

spork/generators/take-until function source
(take-until p ds)
 
-Return elements from `ds` until `p` is true.
Community Examples

spork/generators/take-while function source
(take-while p ds)
+Return elements from `ds` until `p` is true.

spork/generators/take-while function source
(take-while p ds)
 
-Return elements from `ds` while `p` is true.
Community Examples

spork/generators/to-array function source
(to-array s)
+Return elements from `ds` while `p` is true.

spork/generators/to-array function source
(to-array s)
 
-Consume `s` into a new array.
Community Examples

spork/getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
+Consume `s` into a new array.

spork/getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
 
-Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.
Community Examples

spork/getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
+Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.

spork/getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
 
-Default handler to get available autocomplete options for a given substring.
Community Examples

spork/getline/default-doc-fetch function source
(default-doc-fetch sym w &)
+Default handler to get available autocomplete options for a given substring.

spork/getline/default-doc-fetch function source
(default-doc-fetch sym w &)
 
-Default handler for Ctrl-G to lookup docstrings in the current environment.
Community Examples

spork/getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
+Default handler for Ctrl-G to lookup docstrings in the current environment.

spork/getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
 
-Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.
Community Examples

spork/getline/max-history number source
Maximal amount of items in the history
Community Examples

spork/htmlgen/doctype-html function source
The html5 doctype header
Community Examples

spork/htmlgen/escape function source
(escape x)
+Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.

spork/getline/max-history number source
Maximal amount of items in the history

spork/htmlgen/doctype-html function source
The html5 doctype header

spork/htmlgen/escape function source
(escape x)
 
-Escape characters in a string for HTML
Community Examples

spork/htmlgen/html function source
(html data &opt buf)
+Escape characters in a string for HTML

spork/htmlgen/html function source
(html data &opt buf)
 
-Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.
Community Examples

spork/htmlgen/raw function source
(raw text)
+Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.

spork/htmlgen/raw function source
(raw text)
 
-Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Community Examples

spork/http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.
Community Examples

spork/http/cookies function source
(cookies nextmw)
+Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.

spork/http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.

spork/http/cookies function source
(cookies nextmw)
 
-Parses cookies into the table under :cookies key
Community Examples

spork/http/logger function source
(logger nextmw)
+Parses cookies into the table under :cookies key

spork/http/logger function source
(logger nextmw)
 
-Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.
Community Examples

spork/http/middleware function source
(middleware x)
+Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.

spork/http/middleware function source
(middleware x)
 
-Coerce any type to http middleware
Community Examples

spork/http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.
Community Examples

spork/http/read-body function source
(read-body req)
+Coerce any type to http middleware

spork/http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.

spork/http/read-body function source
(read-body req)
 
-Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.
Community Examples

spork/http/read-request function source
(read-request conn buf &opt no-query)
+Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.

spork/http/read-request function source
(read-request conn buf &opt no-query)
 
-Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`
Community Examples

spork/http/read-response function source
(read-response conn buf)
+Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`

spork/http/read-response function source
(read-response conn buf)
 
-Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`
Community Examples

spork/http/request function source
(request method url &keys {:headers headers :body body})
+Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`

spork/http/request function source
(request method url &keys {:headers headers :body body})
 
-Make an HTTP request to a server. Returns a table containing response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.
Community Examples

spork/http/request-peg core/peg source
PEG for parsing HTTP requests
Community Examples

spork/http/response-peg core/peg source
PEG for parsing HTTP responses
Community Examples

spork/http/router function source
(router routes)
+Make an HTTP request to a server. Returns a table containing response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.

spork/http/request-peg core/peg source
PEG for parsing HTTP requests

spork/http/response-peg core/peg source
PEG for parsing HTTP responses

spork/http/router function source
(router routes)
 
-Creates a router middleware. A router will dispatch to different routes based on the URL path.
Community Examples

spork/http/send-response function source
(send-response conn response &opt buf)
+Creates a router middleware. A router will dispatch to different routes based on the URL path.

spork/http/send-response function source
(send-response conn response &opt buf)
 
-Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.
Community Examples

spork/http/server function source
(server handler &opt host port)
+Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.

spork/http/server function source
(server handler &opt host port)
 
-Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.
Community Examples

spork/http/server-handler function source
(server-handler conn handler)
+Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.

spork/http/server-handler function source
(server-handler conn handler)
 
-A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.
Community Examples

spork/http/status-messages struct source
Mapping of HTTP status codes to their status message.
Community Examples

spork/http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
Community Examples

spork/httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
+A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.

spork/http/status-messages struct source
Mapping of HTTP status codes to their status message.

spork/http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.

spork/httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
 
-Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.
Community Examples

spork/httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
+Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.

spork/httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
 
-Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.
Community Examples

spork/httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
+Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.

spork/httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
 
-Add some metadata to all responses
Community Examples

spork/httpf/listen function source
(listen server &opt host port n-workers)
+Add some metadata to all responses

spork/httpf/listen function source
(listen server &opt host port n-workers)
 
-Start server
Community Examples

spork/httpf/server function source
(server &opt parent)
+Start server

spork/httpf/server function source
(server &opt parent)
 
-Create a new server.
Community Examples

spork/json/decode cfunction
(json/decode json-source &opt keywords nils)
+Create a new server.

spork/json/decode cfunction
(json/decode json-source &opt keywords nils)
 
-Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.
Community Examples

spork/json/encode cfunction
(json/encode x &opt tab newline buf)
+Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.

spork/json/encode cfunction
(json/encode x &opt tab newline buf)
 
-Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
Community Examples

spork/mdz/*front-matter* keyword source
Dynamic binding to front matter after parsing, compilation, and evaluation, of markup completes.
Community Examples

spork/mdz/*markup-dom* keyword source
The htmlgen source that can be used to generate a document with htmlgen/html.
Community Examples

spork/mdz/add-loader function source
(add-loader)
+Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.

spork/mdz/*front-matter* keyword source
Dynamic binding to front matter after parsing, compilation, and evaluation, of markup completes.

spork/mdz/*markup-dom* keyword source
The htmlgen source that can be used to generate a document with htmlgen/html.

spork/mdz/add-loader function source
(add-loader)
 
-Allow importing and requiring markup as a module
Community Examples

spork/mdz/anchor function source
(anchor name & content)
+Allow importing and requiring markup as a module

spork/mdz/anchor function source
(anchor name & content)
 
-Create an in-page anchor for a local link.
Community Examples

spork/mdz/bigger function source
(bigger content)
+Create an in-page anchor for a local link.

spork/mdz/bigger function source
(bigger content)
 
-Make span element with bigger font
Community Examples

spork/mdz/blockquote function source
(blockquote content)
+Make span element with bigger font

spork/mdz/blockquote function source
(blockquote content)
 
-Make a block quote element
Community Examples

spork/mdz/center function source
(center content)
+Make a block quote element

spork/mdz/center function source
(center content)
 
-Center some content
Community Examples

spork/mdz/code function source
(code content)
+Center some content

spork/mdz/code function source
(code content)
 
-Make code element with class mendoza-code
Community Examples

spork/mdz/codeblock function source
(codeblock lang &opt source)
+Make code element with class mendoza-code

spork/mdz/codeblock function source
(codeblock lang &opt source)
 
-Inline code or codeblock
Community Examples

spork/mdz/div function
Make a div element
Community Examples

spork/mdz/em function
Make a em element
Community Examples

spork/mdz/hr function source
(hr)
+Inline code or codeblock

spork/mdz/div function
Make a div element

spork/mdz/em function
Make a em element

spork/mdz/hr function source
(hr)
 
-Add a horizontal rule
Community Examples

spork/mdz/html function source
(html source)
+Add a horizontal rule

spork/mdz/html function source
(html source)
 
-Embed some raw html
Community Examples

spork/mdz/image function source
(image src alt)
+Embed some raw html

spork/mdz/image function source
(image src alt)
 
-Make an image element
Community Examples

spork/mdz/li function
Make a li element
Community Examples

spork/mdz/link function source
(link url &opt content)
+Make an image element

spork/mdz/li function
Make a li element

spork/mdz/link function source
(link url &opt content)
 
-Create an anchor link
Community Examples

spork/mdz/markup function source
(markup source &opt env where)
+Create an anchor link

spork/mdz/markup function source
(markup source &opt env where)
 
-Parse mendoza markup and evaluate it returning an htmlgen document tree.
Community Examples

spork/mdz/mdz-loader function source
(mdz-loader path &)
+Parse mendoza markup and evaluate it returning an htmlgen document tree.

spork/mdz/mdz-loader function source
(mdz-loader path &)
 
-Loader for the mdz format
Community Examples

spork/mdz/ol function
Make a ol element
Community Examples

spork/mdz/p function
Make a p element
Community Examples

spork/mdz/pre function
Make a pre element
Community Examples

spork/mdz/section function source
(section name content)
+Loader for the mdz format

spork/mdz/ol function
Make a ol element

spork/mdz/p function
Make a p element

spork/mdz/pre function
Make a pre element

spork/mdz/section function source
(section name content)
 
-Create a section. Usually used to embed different parts of the content document into different parts of the main page.
Community Examples

spork/mdz/smaller function source
(smaller content)
+Create a section. Usually used to embed different parts of the content document into different parts of the main page.

spork/mdz/smaller function source
(smaller content)
 
-Make span element with smaller font
Community Examples

spork/mdz/strong function
Make a strong element
Community Examples

spork/mdz/sub function
Make a sub element
Community Examples

spork/mdz/sup function
Make a sup element
Community Examples

spork/mdz/tag function source
(tag name content)
+Make span element with smaller font

spork/mdz/strong function
Make a strong element

spork/mdz/sub function
Make a sub element

spork/mdz/sup function
Make a sup element

spork/mdz/tag function source
(tag name content)
 
-Wrap some content in an html tag. If you need attributes or other properties, you may want to use raw HTML via the html function.
Community Examples

spork/mdz/td function
Make a td element
Community Examples

spork/mdz/th function
Make a th element
Community Examples

spork/mdz/tr function
Make a tr element
Community Examples

spork/mdz/u function
Make a u element
Community Examples

spork/mdz/ul function
Make a ul element
Community Examples

spork/misc/always function source
(always x)
+Wrap some content in an html tag. If you need attributes or other properties, you may want to use raw HTML via the html function.

spork/mdz/td function
Make a td element

spork/mdz/th function
Make a th element

spork/mdz/tr function
Make a tr element

spork/mdz/u function
Make a u element

spork/mdz/ul function
Make a ul element

spork/misc/always function source
(always x)
 
-Return a function that discards any arguments and always returns `x`.
Community Examples

spork/misc/antepenultimate function source
(antepenultimate xs)
+Return a function that discards any arguments and always returns `x`.

spork/misc/antepenultimate function source
(antepenultimate xs)
 
-Get the third-to-last element from an indexed data structure.
Community Examples

spork/misc/binary-search macro source
(binary-search x arr &opt <?)
+Get the third-to-last element from an indexed data structure.

spork/misc/binary-search macro source
(binary-search x arr &opt <?)
 
 Returns the index of `x` in a sorted array or tuple or the index of
 the next item if `x` is not present. This is the correct insert index
 for `x` within `arr`. If a `<?` comparator is given, the search uses
-that to compare elements, otherwise uses `<`.
Community Examples

spork/misc/binary-search-by macro source
(binary-search-by x arr f)
+that to compare elements, otherwise uses `<`.

spork/misc/binary-search-by macro source
(binary-search-by x arr f)
 
 Returns the index of `x` in an array or tuple which has been sorted
 by a mapping function `f`, or the index of the next item if `x` is not
-present. This is the correct insert index for `x` within `arr`.
Community Examples

spork/misc/caperr macro source
(caperr & body)
+present. This is the correct insert index for `x` within `arr`.

spork/misc/caperr macro source
(caperr & body)
 
 Captures the standart error output of the variadic `body` and returns it
-as a buffer.
Community Examples

spork/misc/capout macro source
(capout & body)
+as a buffer.

spork/misc/capout macro source
(capout & body)
 
 Captures the standart output of the variadic `body` and returns it as
-a buffer.
Community Examples

spork/misc/cond-> macro source
(cond-> val & clauses)
+a buffer.

spork/misc/cond-> macro source
(cond-> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs with condition and operation to which the `val`,
 is put as first argument. All conditions are tried and
 for truthy conditions the operation is executed.
-Returns the value mutated if any condition is truthy.
Community Examples

spork/misc/cond->> macro source
(cond->> val & clauses)
+Returns the value mutated if any condition is truthy.

spork/misc/cond->> macro source
(cond->> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs of condition and operation to which the `val`,
 is put as last argument. All conditions are tried and
 for truthy the operation is ran.
-Returns mutated value if any condition is truthy.
Community Examples

spork/misc/dedent function source
(dedent & xs)
+Returns mutated value if any condition is truthy.

spork/misc/dedent function source
(dedent & xs)
 
 Remove indentation after concatenating the arguments. Works by removing
 leading whitespace, and then removing that same pattern of whitepsace after
-new lines.
Community Examples

spork/misc/defs macro source
(defs & bindings)
+new lines.

spork/misc/defs macro source
(defs & bindings)
 
-Defines many constants as in let `bindings`, but without creating new scope.
Community Examples

spork/misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
+Defines many constants as in let `bindings`, but without creating new scope.

spork/misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
 
 Do a depth first, pre-order traversal over a data structure.
 Also allow for callbacks before and after visiting the children
 of a node. Also allow for a custom `get-children` function to
 change traversal as needed. Will detect cycles if an empty table
 is passed as the `seen` parameter, which is used to cached values
-that have been visited.
Community Examples

spork/misc/do-def macro source
(do-def c d & body)
+that have been visited.

spork/misc/do-def macro source
(do-def c d & body)
 
 Convenience macro for defining constant named `c` with value `d` before `body`
 and returning it after evaluating `body`, that presumably modifies
-the `c` refered content. For example buffer, table or array.
Community Examples

spork/misc/do-var macro source
(do-var v d & body)
+the `c` refered content. For example buffer, table or array.

spork/misc/do-var macro source
(do-var v d & body)
 
 Convenience macro for defining varible named `v` with value `d` before `body`
-and returning it after evaluating `body`, that presumably modifies `v`.
Community Examples

spork/misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
+and returning it after evaluating `body`, that presumably modifies `v`.

spork/misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
 
-Same as print-table but pushes table into a buffer.
Community Examples

spork/misc/gett macro source
(gett ds & keys)
+Same as print-table but pushes table into a buffer.

spork/misc/gett macro source
(gett ds & keys)
 
-Recursive macro (get). Similar to get-in, but keys are variadic argument.
Community Examples

spork/misc/insert-sorted function source
(insert-sorted arr <? & xs)
+Recursive macro (get). Similar to get-in, but keys are variadic argument.

spork/misc/insert-sorted function source
(insert-sorted arr <? & xs)
 
 Insert elements in `arr` such that it remains sorted by the comparator. If
-`arr` is not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

spork/misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
+`arr` is not sorted beforehand, the results are undefined. Returns `arr`.

spork/misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
 
 Insert elements in `arr` such that it remains sorted by the value returned
 when `f` is called with the element, comparing the values with `<`. If `arr` is
-not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

spork/misc/int->string function source
(int->string int &opt base)
+not sorted beforehand, the results are undefined. Returns `arr`.

spork/misc/int->string function source
(int->string int &opt base)
 
-Stringify an integer in a particular base. Defaults to decimal (base 10).
Community Examples

spork/misc/int/ function source
(int/ & xs)
+Stringify an integer in a particular base. Defaults to decimal (base 10).

spork/misc/int/ function source
(int/ & xs)
 
-Perform integer division.
Community Examples

spork/misc/log macro source
(log level & args)
+Perform integer division.

spork/misc/log macro source
(log level & args)
 
 Print to a dynamic binding stream if that stream is set, otherwise do
 nothing. Evaluate to nil.
 For example, `(log :err "value error: %V" my-value)` will print
-to `(dyn :err)` only if `(dyn :err)` has been set.
Community Examples

spork/misc/make macro source
(make prototype & pairs)
+to `(dyn :err)` only if `(dyn :err)` has been set.

spork/misc/make macro source
(make prototype & pairs)
 
 Convenience macro for creating new table from even number of kvs pairs in a variadic `table-or-pairs`
 arguments and setting its prototype to `prototype`.
-Factory function for creating new objects from prototypes.
Community Examples

spork/misc/make-id function source
(make-id &opt prefix)
+Factory function for creating new objects from prototypes.

spork/misc/make-id function source
(make-id &opt prefix)
 
 Create a random, printable keyword id with 10 bytes of entropy
-with an optional prefix.
Community Examples

spork/misc/map-keys function source
(map-keys f data)
+with an optional prefix.

spork/misc/map-keys function source
(map-keys f data)
 
 Returns new table with function `f` applied to `data`'s
-keys recursively.
Community Examples

spork/misc/map-keys-flat function source
(map-keys-flat f data)
+keys recursively.

spork/misc/map-keys-flat function source
(map-keys-flat f data)
 
 Returns new table with function `f` applied to `data`'s
-keys without recursing.
Community Examples

spork/misc/map-vals function source
(map-vals f data)
+keys without recursing.

spork/misc/map-vals function source
(map-vals f data)
 
-Returns new table with function `f` applied to `data`'s values.
Community Examples

spork/misc/merge-sorted function source
(merge-sorted a b &opt <?)
+Returns new table with function `f` applied to `data`'s values.

spork/misc/merge-sorted function source
(merge-sorted a b &opt <?)
 
 Merges two sorted arrays so that the result remains sorted, using an optional comparator.
-If no comparator is given, `<` is used.
Community Examples

spork/misc/merge-sorted-by function source
(merge-sorted-by a b f)
+If no comparator is given, `<` is used.

spork/misc/merge-sorted-by function source
(merge-sorted-by a b f)
 
 Merges two sorted arrays so that result remains sorted when `f` is called on each element,
-comparing the values with `<`.
Community Examples

spork/misc/penultimate function source
(penultimate xs)
+comparing the values with `<`.

spork/misc/penultimate function source
(penultimate xs)
 
-Get the second-to-last element from an indexed data structure.
Community Examples

spork/misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
+Get the second-to-last element from an indexed data structure.

spork/misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
 
 Iterate through the rows of a data structure and print a table in a human
 readable way, with padding and heading information. Can optionally provide
@@ -415,315 +415,315 @@ 

Spork

for each row. Lastly, a `header-mapping` dictionary can be provided that changes the printed header names by mapping column keys to the desired header name. If no mapping is found, then the column key will be used as -the header name. Returns nil.
Community Examples

spork/misc/randomize-array function source
(randomize-array arr &opt rng)
+the header name. Returns nil.

spork/misc/randomize-array function source
(randomize-array arr &opt rng)
 
 Randomizes array using the fisher-yates shuffle, takes an optional random
-number generator.
Community Examples

spork/misc/second function source
(second xs)
+number generator.

spork/misc/second function source
(second xs)
 
-Get the second element from an indexed data structure.
Community Examples

spork/misc/select-keys function source
(select-keys data keyz)
+Get the second element from an indexed data structure.

spork/misc/select-keys function source
(select-keys data keyz)
 
-Returns new table with selected `keyz` from dictionary `data`.
Community Examples

spork/misc/set* macro source
(set* tgts exprs)
+Returns new table with selected `keyz` from dictionary `data`.

spork/misc/set* macro source
(set* tgts exprs)
 
 Parallel `set` function. Takes a list of targets and
 expressions, evaluates all the expressions, and then
 assigns them to the targets. Each target can be a variable
-or a 2-tuple, just like in the normal `set` special form.
Community Examples

spork/misc/string->int function source
(string->int str &opt base)
+or a 2-tuple, just like in the normal `set` special form.

spork/misc/string->int function source
(string->int str &opt base)
 
 Parse an integer in the given base. Defaults to decimal (base 10). Differs
-from scan-number in that this does not recognize floating point notation.
Community Examples

spork/misc/table-filter function source
(table-filter pred dict)
+from scan-number in that this does not recognize floating point notation.

spork/misc/table-filter function source
(table-filter pred dict)
 
 Filter a key-value structure info a table. Semantics are the same as for
 built-in `filter`, except that `pred` takes two arguments (key and value.)
-Does not consider prototypes.
Community Examples

spork/misc/third function source
(third xs)
+Does not consider prototypes.

spork/misc/third function source
(third xs)
 
-Get the third element from an indexed data structure.
Community Examples

spork/misc/trim-prefix function source
(trim-prefix prefix str)
+Get the third element from an indexed data structure.

spork/misc/trim-prefix function source
(trim-prefix prefix str)
 
-Trim the specified prefix of a string if it has one
Community Examples

spork/misc/trim-suffix function source
(trim-suffix suffix str)
+Trim the specified prefix of a string if it has one

spork/misc/trim-suffix function source
(trim-suffix suffix str)
 
-Trim the specified suffix of a string if it has one
Community Examples

spork/misc/until macro source
(until cnd & body)
+Trim the specified suffix of a string if it has one

spork/misc/until macro source
(until cnd & body)
 
 Repeat `body` while the `cnd` is false.
-Equivalent to (while (not cnd) ;body).
Community Examples

spork/misc/vars macro source
(vars & bindings)
+Equivalent to (while (not cnd) ;body).

spork/misc/vars macro source
(vars & bindings)
 
-Defines many variables as in let `bindings`, but without creating new scope.
Community Examples

spork/msg/make-proto function source
(make-proto stream &opt pack unpack)
+Defines many variables as in let `bindings`, but without creating new scope.

spork/msg/make-proto function source
(make-proto stream &opt pack unpack)
 
-Create both a send an recv function from a stream, as with `make-send` and `make-recv`.
Community Examples

spork/msg/make-recv function source
(make-recv stream &opt unpack)
+Create both a send an recv function from a stream, as with `make-send` and `make-recv`.

spork/msg/make-recv function source
(make-recv stream &opt unpack)
 
-Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.
Community Examples

spork/msg/make-send function source
(make-send stream &opt pack)
+Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.

spork/msg/make-send function source
(make-send stream &opt pack)
 
-Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Community Examples

spork/netrepl/client function source
(client &opt host port name)
+Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.

spork/netrepl/client function source
(client &opt host port name)
 
-Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".
Community Examples

spork/netrepl/default-host string source
Default host to run server on and connect to.
Community Examples

spork/netrepl/default-port string source
Default port to run the net repl.
Community Examples

spork/netrepl/server function source
(server &opt host port env cleanup welcome-msg)
+Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".

spork/netrepl/default-host string source
Default host to run server on and connect to.

spork/netrepl/default-port string source
Default port to run the net repl.

spork/netrepl/server function source
(server &opt host port env cleanup welcome-msg)
 
-Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.
Community Examples

spork/netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
+Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.

spork/netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
 
-Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Community Examples

spork/path/abspath function source
(posix/abspath path)
+Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.

spork/path/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

spork/path/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/basename function source
(posix/basename path)
+Check if a path is absolute.

spork/path/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/delim string source
Platform delimiter
Community Examples

spork/path/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

spork/path/delim string source
Platform delimiter

spork/path/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/join function source
(posix/join & els)
+Get the file extension for a path.

spork/path/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

spork/path/normalize function source
(posix/normalize path)
+Join path elements together.

spork/path/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/posix/abspath function source
(posix/abspath path)
+Split a path into its parts.

spork/path/posix/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/posix/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

spork/path/posix/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/posix/basename function source
(posix/basename path)
+Check if a path is absolute.

spork/path/posix/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/posix/delim string source
Platform delimiter
Community Examples

spork/path/posix/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

spork/path/posix/delim string source
Platform delimiter

spork/path/posix/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/posix/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/posix/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/posix/join function source
(posix/join & els)
+Get the file extension for a path.

spork/path/posix/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

spork/path/posix/normalize function source
(posix/normalize path)
+Join path elements together.

spork/path/posix/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/posix/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/posix/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/posix/relpath function source
(posix/relpath source target)
+Split a path into its parts.

spork/path/posix/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/posix/sep string source
Platform separator
Community Examples

spork/path/relpath function source
(posix/relpath source target)
+Get the relative path between two subpaths.

spork/path/posix/sep string source
Platform separator

spork/path/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/sep string source
Platform separator
Community Examples

spork/path/win32/abspath function source
(win32/abspath path)
+Get the relative path between two subpaths.

spork/path/sep string source
Platform separator

spork/path/win32/abspath function source
(win32/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/win32/abspath? function source
(win32/abspath? path)
+Coerce a path to be absolute.

spork/path/win32/abspath? function source
(win32/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/win32/basename function source
(win32/basename path)
+Check if a path is absolute.

spork/path/win32/basename function source
(win32/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/win32/delim string source
Platform delimiter
Community Examples

spork/path/win32/dirname function source
(win32/dirname path)
+Gets the base file name of a path.

spork/path/win32/delim string source
Platform delimiter

spork/path/win32/dirname function source
(win32/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/win32/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/win32/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/win32/join function source
(win32/join & els)
+Get the file extension for a path.

spork/path/win32/join function source
(win32/join & els)
 
-Join path elements together.
Community Examples

spork/path/win32/normalize function source
(win32/normalize path)
+Join path elements together.

spork/path/win32/normalize function source
(win32/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/win32/parts function source
(win32/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/win32/parts function source
(win32/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/win32/relpath function source
(win32/relpath source target)
+Split a path into its parts.

spork/path/win32/relpath function source
(win32/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/win32/sep string source
Platform separator
Community Examples

spork/rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
+Get the relative path between two subpaths.

spork/path/win32/sep string source
Platform separator

spork/rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
 
-Begin raw terminal functionality. Return a stream that can be read from to get input.
Community Examples

spork/rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
+Begin raw terminal functionality. Return a stream that can be read from to get input.

spork/rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
 
-Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.
Community Examples

spork/rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
+Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.

spork/rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
 
-A handler that a user can use to handle ctrl-z from input to suspend the current process.
Community Examples

spork/rawterm/end cfunction source
(rawterm/end)
+A handler that a user can use to handle ctrl-z from input to suspend the current process.

spork/rawterm/end cfunction source
(rawterm/end)
 
-End raw terminal functionality.
Community Examples

spork/rawterm/getch cfunction source
(rawterm/getch &opt into)
+End raw terminal functionality.

spork/rawterm/getch cfunction source
(rawterm/getch &opt into)
 
-Get a byte of input from stdin, without blocking if possible. Returns a buffer.
Community Examples

spork/rawterm/isatty cfunction source
(rawterm/isatty)
+Get a byte of input from stdin, without blocking if possible. Returns a buffer.

spork/rawterm/isatty cfunction source
(rawterm/isatty)
 
-Check if the current stdin is a tty.
Community Examples

spork/rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
+Check if the current stdin is a tty.

spork/rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
 
-Measure the monospace width of a string.
Community Examples

spork/rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
+Measure the monospace width of a string.

spork/rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
 
-Get the monospace width of a rune. Returns either 0, 1, or 2.
Community Examples

spork/rawterm/size cfunction source
(rawterm/size)
+Get the monospace width of a rune. Returns either 0, 1, or 2.

spork/rawterm/size cfunction source
(rawterm/size)
 
-Get the number of rows and columns visible in the terminal as tuple [rows cols]
Community Examples

spork/rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
+Get the number of rows and columns visible in the terminal as tuple [rows cols]

spork/rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
 
-Get a byte slice that will fit into a number of columns.
Community Examples

spork/regex/compile function source
(compile pattern)
+Get a byte slice that will fit into a number of columns.

spork/regex/compile function source
(compile pattern)
 
-Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.
Community Examples

spork/regex/find function source
(find reg text &opt start)
+Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.

spork/regex/find function source
(find reg text &opt start)
 
-Similar to peg/find, but for regexes.
Community Examples

spork/regex/find-all function source
(find-all reg text &opt start)
+Similar to peg/find, but for regexes.

spork/regex/find-all function source
(find-all reg text &opt start)
 
-Similar to peg/find-all, but for regexes.
Community Examples

spork/regex/match function source
(match reg text &opt start)
+Similar to peg/find-all, but for regexes.

spork/regex/match function source
(match reg text &opt start)
 
-Similar to peg/match, but for regexes.
Community Examples

spork/regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.
Community Examples

spork/regex/replace function source
(replace reg rep text &opt start)
+Similar to peg/match, but for regexes.

spork/regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.

spork/regex/replace function source
(replace reg rep text &opt start)
 
-Similar to peg/replace, but for regexes.
Community Examples

spork/regex/replace-all function source
(replace-all reg rep text &opt start)
+Similar to peg/replace, but for regexes.

spork/regex/replace-all function source
(replace-all reg rep text &opt start)
 
-Similar to peg/replace-all, but for regexes.
Community Examples

spork/regex/source function source
(source pattern)
+Similar to peg/replace-all, but for regexes.

spork/regex/source function source
(source pattern)
 
-Compile a subset of regex to PEG source code.
Community Examples

spork/rpc/client function source
(client &opt host port name)
+Compile a subset of regex to PEG source code.

spork/rpc/client function source
(client &opt host port name)
 
-Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.
Community Examples

spork/rpc/default-host string source
Default host to run server on and connect to.
Community Examples

spork/rpc/default-port string source
Default port to run the net repl.
Community Examples

spork/rpc/server function source
(server functions &opt host port workers-per-connection)
+Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.

spork/rpc/default-host string source
Default host to run server on and connect to.

spork/rpc/default-port string source
Default port to run the net repl.

spork/rpc/server function source
(server functions &opt host port workers-per-connection)
 
-Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Community Examples

spork/schema/make-predicate function source
(make-predicate schema)
+Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.

spork/schema/make-predicate function source
(make-predicate schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `predicate`.
Community Examples

spork/schema/make-validator function source
(make-validator schema)
+Generate a function that can be used to validate a data structure. This is the function form of `predicate`.

spork/schema/make-validator function source
(make-validator schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `validator`.
Community Examples

spork/schema/predicate macro source
(predicate pattern)
+Generate a function that can be used to validate a data structure. This is the function form of `validator`.

spork/schema/predicate macro source
(predicate pattern)
 
-Make a validation predicate given a certain schema.
Community Examples

spork/schema/validator macro source
(validator pattern)
+Make a validation predicate given a certain schema.

spork/schema/validator macro source
(validator pattern)
 
-Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Community Examples

spork/services/*current-manager* keyword source
The currently running service manager, if there is one
Community Examples

spork/services/*current-service* keyword source
The currently running service, if there is one
Community Examples

spork/services/add-service function source
(add-service service-name main-function & args)
+Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.

spork/services/*current-manager* keyword source
The currently running service manager, if there is one

spork/services/*current-service* keyword source
The currently running service, if there is one

spork/services/add-service function source
(add-service service-name main-function & args)
 
-Spawn a service
Community Examples

spork/services/all-services function source
(all-services)
+Spawn a service

spork/services/all-services function source
(all-services)
 
-Get a list of running services
Community Examples

spork/services/get-manager function source
(get-manager)
+Get a list of running services

spork/services/get-manager function source
(get-manager)
 
-Get the current manager. If no manager exists, create one.
Community Examples

spork/services/get-service function source
(get-service)
+Get the current manager. If no manager exists, create one.

spork/services/get-service function source
(get-service)
 
-Get the current service. If not in a service, raise an error
Community Examples

spork/services/make-manager function source
(make-manager &opt log-dir)
+Get the current service. If not in a service, raise an error

spork/services/make-manager function source
(make-manager &opt log-dir)
 
-Group a number of fibers into a single object for structured concurrency. Also includes utilities for running services like servers in the background.
Community Examples

spork/services/print-all function source
(print-all &opt filter-fn)
+Group a number of fibers into a single object for structured concurrency. Also includes utilities for running services like servers in the background.

spork/services/print-all function source
(print-all &opt filter-fn)
 
-Print a table of all running services.
Community Examples

spork/services/remove-service function source
(remove-service service-name)
+Print a table of all running services.

spork/services/remove-service function source
(remove-service service-name)
 
-Remove a service
Community Examples

spork/services/set-title function source
(set-title title)
+Remove a service

spork/services/set-title function source
(set-title title)
 
-Set a textual description of the service to describe what it is doing currently
Community Examples

spork/services/start-service function source
(start-service service-name)
+Set a textual description of the service to describe what it is doing currently

spork/services/start-service function source
(start-service service-name)
 
-Start or restart a service
Community Examples

spork/services/stop-service function source
(stop-service service-name &opt reason)
+Start or restart a service

spork/services/stop-service function source
(stop-service service-name &opt reason)
 
-Stop a running service
Community Examples

spork/services/wait function source
(wait)
+Stop a running service

spork/services/wait function source
(wait)
 
-Once a number of services have been spawned, call `wait` to block the fiber until the manager is canceled. This lets a manager fiber behave as a service itself.
Community Examples

spork/sh/copy function source
(copy src dest)
+Once a number of services have been spawned, call `wait` to block the fiber until the manager is canceled. This lets a manager fiber behave as a service itself.

spork/sh/copy function source
(copy src dest)
 
 Copy a file or directory recursively from one location to another.
-Expects input to be unix style paths
Community Examples

spork/sh/copy-file function source
(copy-file src-path dst-path)
+Expects input to be unix style paths

spork/sh/copy-file function source
(copy-file src-path dst-path)
 
-Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.
Community Examples

spork/sh/create-dirs function source
(create-dirs dir-path)
+Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.

spork/sh/create-dirs function source
(create-dirs dir-path)
 
-Create all directories in path specified as string including itself.
Community Examples

spork/sh/devnull function source
(devnull)
+Create all directories in path specified as string including itself.

spork/sh/devnull function source
(devnull)
 
-get the /dev/null equivalent of the current platform as an open file
Community Examples

spork/sh/escape function source
(escape & args)
+get the /dev/null equivalent of the current platform as an open file

spork/sh/escape function source
(escape & args)
 
-Output a string with all arguments correctly quoted
Community Examples

spork/sh/exec function source
(exec & args)
+Output a string with all arguments correctly quoted

spork/sh/exec function source
(exec & args)
 
-Execute command specified by args returning it's exit code
Community Examples

spork/sh/exec-fail function source
(exec-fail & args)
+Execute command specified by args returning it's exit code

spork/sh/exec-fail function source
(exec-fail & args)
 
-Execute command specified by args, fails when command exits with non-zero exit code
Community Examples

spork/sh/exec-slurp function source
(exec-slurp & args)
+Execute command specified by args, fails when command exits with non-zero exit code

spork/sh/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of command specified by args and return it trimmed in a string.
Community Examples

spork/sh/exec-slurp-all function source
(exec-slurp-all & args)
+Read stdout of command specified by args and return it trimmed in a string.

spork/sh/exec-slurp-all function source
(exec-slurp-all & args)
 
 Read stdout and stderr of subprocess and return it trimmed in a struct with :err and :out containing the output as string.
-This will also return the exit code under the :status key.
Community Examples

spork/sh/exists? function source
(exists? path)
+This will also return the exit code under the :status key.

spork/sh/exists? function source
(exists? path)
 
-Check if the given file or directory exists. (Follows symlinks)
Community Examples

spork/sh/list-all-files function source
(list-all-files dir &opt into)
+Check if the given file or directory exists. (Follows symlinks)

spork/sh/list-all-files function source
(list-all-files dir &opt into)
 
-List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.
Community Examples

spork/sh/make-new-file function source
(make-new-file file-path &opt mode)
+List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.

spork/sh/make-new-file function source
(make-new-file file-path &opt mode)
 
-Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).
Community Examples

spork/sh/rm function source
(rm path)
+Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).

spork/sh/rm function source
(rm path)
 
-Remove a directory and all sub directories recursively.
Community Examples

spork/sh/scan-directory function source
(scan-directory dir func)
+Remove a directory and all sub directories recursively.

spork/sh/scan-directory function source
(scan-directory dir func)
 
-Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.
Community Examples

spork/sh/split function source
(split s)
+Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.

spork/sh/split function source
(split s)
 
-Split a string into 'sh like' tokens, returns nil if unable to parse the string.
Community Examples

spork/tarray/buffer cfunction
(tarray/buffer array|size)
+Split a string into 'sh like' tokens, returns nil if unable to parse the string.

spork/tarray/buffer cfunction
(tarray/buffer array|size)
 
-Return typed array buffer or create a new buffer.
Community Examples

spork/tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
+Return typed array buffer or create a new buffer.

spork/tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
 
-Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.
Community Examples

spork/tarray/length cfunction
(tarray/length array|buffer)
+Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.

spork/tarray/length cfunction
(tarray/length array|buffer)
 
-Return typed array or buffer size.
Community Examples

spork/tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
+Return typed array or buffer size.

spork/tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
 
-Create new typed array.
Community Examples

spork/tarray/properties cfunction
(tarray/properties array)
+Create new typed array.

spork/tarray/properties cfunction
(tarray/properties array)
 
-Return typed array properties as a struct.
Community Examples

spork/tarray/slice cfunction
(tarray/slice tarr &opt start end)
+Return typed array properties as a struct.

spork/tarray/slice cfunction
(tarray/slice tarr &opt start end)
 
-Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.
Community Examples

spork/tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
+Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.

spork/tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
 
-Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Community Examples

spork/tasker/all-tasks function source
(all-tasks tasker &opt detailed)
+Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.

spork/tasker/all-tasks function source
(all-tasks tasker &opt detailed)
 
-Get an array of all task ids for which there is still data on disk. If `detailed` is truthy, return full task metadata instead of ids.
Community Examples

spork/tasker/cancel-task function source
(cancel-task tasker task-id)
+Get an array of all task ids for which there is still data on disk. If `detailed` is truthy, return full task metadata instead of ids.

spork/tasker/cancel-task function source
(cancel-task tasker task-id)
 
-Cancel a queued or running task.
Community Examples

spork/tasker/close-queues function source
(close-queues tasker)
+Cancel a queued or running task.

spork/tasker/close-queues function source
(close-queues tasker)
 
-Prevent any tasks from being added to queues. When an executor finishes it's current job, if there are any, it will terminate. When all executors complete, the call to `run-executors` will complete.
Community Examples

spork/tasker/default-expiration number source
Default expiration time (1 day)
Community Examples

spork/tasker/default-priority number source
Default task priority
Community Examples

spork/tasker/default-task-directory string source
Default location of task records
Community Examples

spork/tasker/err-file-name string source
Name of the file for logging errors
Community Examples

spork/tasker/max-priority number source
Maximum allowed priority (lower priority tasks will execute first)
Community Examples

spork/tasker/min-priority number source
Minimum allowed priority (lower priority tasks will execute first)
Community Examples

spork/tasker/new-tasker function source
(new-tasker &opt task-directory queues queue-size)
+Prevent any tasks from being added to queues. When an executor finishes it's current job, if there are any, it will terminate. When all executors complete, the call to `run-executors` will complete.

spork/tasker/default-expiration number source
Default expiration time (1 day)

spork/tasker/default-priority number source
Default task priority

spork/tasker/default-task-directory string source
Default location of task records

spork/tasker/err-file-name string source
Name of the file for logging errors

spork/tasker/max-priority number source
Maximum allowed priority (lower priority tasks will execute first)

spork/tasker/min-priority number source
Minimum allowed priority (lower priority tasks will execute first)

spork/tasker/new-tasker function source
(new-tasker &opt task-directory queues queue-size)
 
-Create queues and various settings to run tasks. Create a new tasker table.
Community Examples

spork/tasker/out-file-name string source
Name of the file for general logging
Community Examples

spork/tasker/queue-task function source
(queue-task tasker argv &opt note priority qname timeout expiration input)
+Create queues and various settings to run tasks. Create a new tasker table.

spork/tasker/out-file-name string source
Name of the file for general logging

spork/tasker/queue-task function source
(queue-task tasker argv &opt note priority qname timeout expiration input)
 
-Add a task specification to a queue. Supply an argv string array that will be used to invoke s a subprocess. The optional `note` parameter is just a textual note for task trackingv. The `priority` parameter should be an integer between 0 and 9 inclusive, default is 4. Lower priority jobs in the same queue will be executed by higher priority. Use input to pass in generic, unstructured input to a task.
Community Examples

spork/tasker/run-cleanup function source
(run-cleanup tasker)
+Add a task specification to a queue. Supply an argv string array that will be used to invoke s a subprocess. The optional `note` parameter is just a textual note for task trackingv. The `priority` parameter should be an integer between 0 and 9 inclusive, default is 4. Lower priority jobs in the same queue will be executed by higher priority. Use input to pass in generic, unstructured input to a task.

spork/tasker/run-cleanup function source
(run-cleanup tasker)
 
-Delete old expired jobs saved on disk
Community Examples

spork/tasker/run-executors function source
(run-executors tasker &opt workers-per-queue pre-task post-task)
+Delete old expired jobs saved on disk

spork/tasker/run-executors function source
(run-executors tasker &opt workers-per-queue pre-task post-task)
 
-Start a number of executors to run tasks as with `tasker/spawn-executors`, and then wait for all executors to complete.
Community Examples

spork/tasker/spawn-executors function source
(spawn-executors tasker &opt qnames workers-per-queue pre-task post-task)
+Start a number of executors to run tasks as with `tasker/spawn-executors`, and then wait for all executors to complete.

spork/tasker/spawn-executors function source
(spawn-executors tasker &opt qnames workers-per-queue pre-task post-task)
 
-Start a number of executors to run tasks. Tasks can be added to a queue by calling queue-task. A single tasker object can make multiple calls to spawn-executors.
Community Examples

spork/tasker/statuses tuple source
A tuple of all possible statuses that a task can have.
Community Examples

spork/tasker/task-file function source
(task-file tasker task-id &opt file-name)
+Start a number of executors to run tasks. Tasks can be added to a queue by calling queue-task. A single tasker object can make multiple calls to spawn-executors.

spork/tasker/statuses tuple source
A tuple of all possible statuses that a task can have.

spork/tasker/task-file function source
(task-file tasker task-id &opt file-name)
 
-Get a log file for a path. By default, will get a path to out.log.
Community Examples

spork/tasker/task-meta-name string source
Name of the task metadata file
Community Examples

spork/tasker/task-status function source
(task-status tasker task-id)
+Get a log file for a path. By default, will get a path to out.log.

spork/tasker/task-meta-name string source
Name of the task metadata file

spork/tasker/task-status function source
(task-status tasker task-id)
 
-Look up the status of a given task by id.
Community Examples

spork/temple/add-loader function source
(add-loader)
+Look up the status of a given task by id.

spork/temple/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

spork/temple/base-env table source
Base environment for rendering
Community Examples

spork/temple/compile function source
(compile str)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

spork/temple/base-env table source
Base environment for rendering

spork/temple/compile function source
(compile str)
 
 Compile a Temple template into a function which will return a
 rendered buffer.
 
 The resulting function should receive the template arguments in the
-&keys format.
Community Examples

spork/temple/create function source
(create source &opt where)
+&keys format.

spork/temple/create function source
(create source &opt where)
 
-Compile a template string into a function. Optionally provide a location where the source is from to improve debugging. Returns the template function.
Community Examples

spork/test/assert macro source
(assert x &opt e)
+Compile a template string into a function. Optionally provide a location where the source is from to improve debugging. Returns the template function.

spork/test/assert macro source
(assert x &opt e)
 
-Override's the default assert with some nice error handling.
Community Examples

spork/test/assert-docs function source
(assert-docs path)
+Override's the default assert with some nice error handling.

spork/test/assert-docs function source
(assert-docs path)
 
 Assert that all symbols, when module on the path is required,
-have proper doc string
Community Examples

spork/test/assert-error macro source
(assert-error msg & forms)
+have proper doc string

spork/test/assert-error macro source
(assert-error msg & forms)
 
-Test passes if forms error.
Community Examples

spork/test/assert-no-error macro source
(assert-no-error msg & forms)
+Test passes if forms error.

spork/test/assert-no-error macro source
(assert-no-error msg & forms)
 
-Test passes if forms do not error.
Community Examples

spork/test/assert-not macro source
(assert-not x &opt e)
+Test passes if forms do not error.

spork/test/assert-not macro source
(assert-not x &opt e)
 
-Invert assert.
Community Examples

spork/test/capture-stderr macro source
(capture-stderr & body)
+Invert assert.

spork/test/capture-stderr macro source
(capture-stderr & body)
 
 Runs the form and captures stderr. Returns tuple with result of the form
-and a string with captured stderr.
Community Examples

spork/test/capture-stdout macro source
(capture-stdout & body)
+and a string with captured stderr.

spork/test/capture-stdout macro source
(capture-stdout & body)
 
 Runs the form and captures stdout. Returns tuple with result of the form
-and a string with captured stdout.
Community Examples

spork/test/end-suite function source
(end-suite)
+and a string with captured stdout.

spork/test/end-suite function source
(end-suite)
 
-Ends test suite, prints summary and exits if any have failed.
Community Examples

spork/test/start-suite function source
(start-suite &opt name)
+Ends test suite, prints summary and exits if any have failed.

spork/test/start-suite function source
(start-suite &opt name)
 
-Starts test suite.
Community Examples

spork/test/suppress-stderr macro source
(suppress-stderr & body)
+Starts test suite.

spork/test/suppress-stderr macro source
(suppress-stderr & body)
 
-Suppreses stdout from the body
Community Examples

spork/test/suppress-stdout macro source
(suppress-stdout & body)
+Suppreses stdout from the body

spork/test/suppress-stdout macro source
(suppress-stdout & body)
 
-Suppreses stdout from the body
Community Examples

spork/test/timeit macro source
(timeit form &opt tag)
+Suppreses stdout from the body

spork/test/timeit macro source
(timeit form &opt tag)
 
 Time the execution of `form` using `os/clock` before and after,
 and print the result to stdout. returns: result of executing `form`.
-Uses `tag` (default "Elapsed time:") to tag the printout.
Community Examples

spork/test/timeit-loop macro source
(timeit-loop head & body)
+Uses `tag` (default "Elapsed time:") to tag the printout.

spork/test/timeit-loop macro source
(timeit-loop head & body)
 
 Similar to `loop`, but outputs performance statistics after completion.
 Additionally defines a `:timeout` verb to iterate continuously for a given
 number of seconds. If the first form of `body` is a bytes, it will be taken
-as a custom tag.
Community Examples

spork/utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
+as a custom tag.

spork/utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
 
-Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].
Community Examples

spork/utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
+Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].

spork/utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
 
-Encode a Unicode codepoint into the end of a buffer.
Community Examples

spork/utf8/prefix->width cfunction source
(utf8/prefix->width c)
+Encode a Unicode codepoint into the end of a buffer.

spork/utf8/prefix->width cfunction source
(utf8/prefix->width c)
 
-Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Community Examples

spork/zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
+Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.

spork/zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
 
-Add a byte sequence to the zip writer.
Community Examples

spork/zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
+Add a byte sequence to the zip writer.

spork/zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
 
-Add a file to the zip writer.
Community Examples

spork/zip/compress cfunction source
(zip/compress bytes &opt level into)
+Add a file to the zip writer.

spork/zip/compress cfunction source
(zip/compress bytes &opt level into)
 
-Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.
Community Examples

spork/zip/decompress cfunction source
(zip/decompress bytes &opt into)
+Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.

spork/zip/decompress cfunction source
(zip/decompress bytes &opt into)
 
-Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.
Community Examples

spork/zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
+Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.

spork/zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
 
-Extract a file from the zip archive, either to memory or to a file on disk.
Community Examples

spork/zip/file-directory? cfunction source
(zip/file-directory? reader idx)
+Extract a file from the zip archive, either to memory or to a file on disk.

spork/zip/file-directory? cfunction source
(zip/file-directory? reader idx)
 
-Check if a file index is a directory.
Community Examples

spork/zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
+Check if a file index is a directory.

spork/zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
 
-Check if a file is encrypted inside an archive.
Community Examples

spork/zip/file-supported? cfunction source
(zip/file-supported? reader idx)
+Check if a file is encrypted inside an archive.

spork/zip/file-supported? cfunction source
(zip/file-supported? reader idx)
 
-Check if a file is supported with this verstion of miniz.
Community Examples

spork/zip/get-filename cfunction source
(zip/get-filename reader idx)
+Check if a file is supported with this verstion of miniz.

spork/zip/get-filename cfunction source
(zip/get-filename reader idx)
 
-Convert a file index index in the archive to a filename.
Community Examples

spork/zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
+Convert a file index index in the archive to a filename.

spork/zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
 
-Get the index of a particular filename in the archive.
Community Examples

spork/zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
+Get the index of a particular filename in the archive.

spork/zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
 
-Read a byte sequence as a zip archive. Returns a new zip reader.
Community Examples

spork/zip/read-file cfunction source
(zip/read-file filename &opt flags)
+Read a byte sequence as a zip archive. Returns a new zip reader.

spork/zip/read-file cfunction source
(zip/read-file filename &opt flags)
 
-Read a file as a zip archive. Returns a new zip reader.
Community Examples

spork/zip/reader-close cfunction source
(zip/reader-close reader)
+Read a file as a zip archive. Returns a new zip reader.

spork/zip/reader-close cfunction source
(zip/reader-close reader)
 
-Close a reader and free related memory.
Community Examples

spork/zip/reader-count cfunction source
(zip/reader-count reader)
+Close a reader and free related memory.

spork/zip/reader-count cfunction source
(zip/reader-count reader)
 
-Get the number of files inside the zip archive. The files can be indexed 
Community Examples

spork/zip/stat cfunction source
(zip/stat reader idx)
+Get the number of files inside the zip archive. The files can be indexed 

spork/zip/stat cfunction source
(zip/stat reader idx)
 
 Get stat information of file. Returns a new struct with the following fields:
 
@@ -740,17 +740,17 @@ 

Spork

* :comment * :internal-attr * :external-attr -
Community Examples

spork/zip/version cfunction source
(zip/version)
+

spork/zip/version cfunction source
(zip/version)
 
-Get the version string of the underlying miniz library.
Community Examples

spork/zip/write-buffer cfunction source
(zip/write-buffer)
+Get the version string of the underlying miniz library.

spork/zip/write-buffer cfunction source
(zip/write-buffer)
 
-Create a new zip archive writer that write to memory.
Community Examples

spork/zip/write-file cfunction source
(zip/write-file dest-path)
+Create a new zip archive writer that write to memory.

spork/zip/write-file cfunction source
(zip/write-file dest-path)
 
-Create a new zip archive writer that will write into an archive file.
Community Examples

spork/zip/writer-close cfunction source
(zip/writer-close writer)
+Create a new zip archive writer that will write into an archive file.

spork/zip/writer-close cfunction source
(zip/writer-close writer)
 
-Close a ZipWriter.
Community Examples

spork/zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
+Close a ZipWriter.

spork/zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
 
-Finalize a writer, writing any zip files to disk. Return the writer.
Community Examples
+Finalize a writer, writing any zip files to disk. Return the writer.
Parser Module Argument Parsing diff --git a/static/1.31.0/api/spork/json.html b/static/1.31.0/api/spork/json.html index 0f1a0397..5f17d5ba 100644 --- a/static/1.31.0/api/spork/json.html +++ b/static/1.31.0/api/spork/json.html @@ -120,9 +120,9 @@

Index

json/decode json/encode


json/decode cfunction
(json/decode json-source &opt keywords nils)
 
-Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.
Community Examples

json/encode cfunction
(json/encode x &opt tab newline buf)
+Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.

json/encode cfunction
(json/encode x &opt tab newline buf)
 
-Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
Community Examples
+Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
HTTP Framework Math extended diff --git a/static/1.31.0/api/spork/math.html b/static/1.31.0/api/spork/math.html index b24148fb..865d294e 100644 --- a/static/1.31.0/api/spork/math.html +++ b/static/1.31.0/api/spork/math.html @@ -121,160 +121,160 @@

Index

math/add math/add-to-mean math/approx-eq math/bernoulli-distribution math/binominal-coeficient math/binominal-distribution math/check-probability math/chi-squared-distribution-table math/cols math/cumulative-std-normal-probability math/det math/dot math/epsilon math/extent math/factor math/factorial math/geometric-mean math/get-only-el math/harmonic-mean math/ident math/interquartile-range math/invmod math/jacobi math/linear-regression math/linear-regression-line math/median math/median-absolute-deviation math/minor math/mode math/mop math/mul math/mulmod math/next-prime math/perm math/permutation-test math/permutations math/poisson-distribution math/powmod math/prime? math/primes math/quantile math/quantile-rank math/quantile-rank-sorted math/quantile-sorted math/quickselect math/relative-err math/root-mean-square math/rows math/sample-correlation math/sample-covariance math/sample-skewness math/sample-standard-deviation math/sample-variance math/scalar math/shuffle-in-place math/size math/sop math/standard-deviation math/standard-normal-table math/sum-compensated math/sum-nth-power-deviations math/swap math/t-test math/t-test-2 math/trans math/variance math/z-score math/zero


math/add function source
(add m a)
 
 Add `a` to matrix `m` where it can be matrix or scalar.
-Matrix `m` is mutated.
Community Examples

math/add-to-mean function source
(add-to-mean m n v)
+Matrix `m` is mutated.

math/add-to-mean function source
(add-to-mean m n v)
 
-Adds new value `v` to mean `m` from `n` values.
Community Examples

math/approx-eq function source
(approx-eq a e &opt t)
+Adds new value `v` to mean `m` from `n` values.

math/approx-eq function source
(approx-eq a e &opt t)
 
 Approximate equality between actual number `a`
 and expected number `e`. Default tolerance `t`
-is `epsilon`.
Community Examples

math/bernoulli-distribution function source
(bernoulli-distribution p)
+is `epsilon`.

math/bernoulli-distribution function source
(bernoulli-distribution p)
 
-Creates Bernoulli distribution from popability `p` in the tuple.
Community Examples

math/binominal-coeficient function source
(binominal-coeficient n k)
+Creates Bernoulli distribution from popability `p` in the tuple.

math/binominal-coeficient function source
(binominal-coeficient n k)
 
 Computes binominal coeficient from set of size `n`
-and sample size `k`.
Community Examples

math/binominal-distribution function source
(binominal-distribution t p)
+and sample size `k`.

math/binominal-distribution function source
(binominal-distribution t p)
 
 Creates binominal distribution from trials `t`
-and probability `p` in the tuple.
Community Examples

math/check-probability function source
(check-probability p)
+and probability `p` in the tuple.

math/check-probability function source
(check-probability p)
 
-Asserts that probability in in the [0 1] range.
Community Examples

math/chi-squared-distribution-table struct source
Chi Squared distribution table.
Community Examples

math/cols function source
(cols m)
+Asserts that probability in in the [0 1] range.

math/chi-squared-distribution-table struct source
Chi Squared distribution table.

math/cols function source
(cols m)
 
-Returns numbers of columns of matrix `m`.
Community Examples

math/cumulative-std-normal-probability function source
(cumulative-std-normal-probability z)
+Returns numbers of columns of matrix `m`.

math/cumulative-std-normal-probability function source
(cumulative-std-normal-probability z)
 
-Computes standard normal probability for `y`.
Community Examples

math/det function source
(det m)
+Computes standard normal probability for `y`.

math/det function source
(det m)
 
-Computes determinant of matrix `m`.
Community Examples

math/dot function source
(dot mx my)
+Computes determinant of matrix `m`.

math/dot function source
(dot mx my)
 
-Computes dot product of matrices or vectors `x` and `y`.
Community Examples

math/epsilon number source
Epsilon constant
Community Examples

math/extent function source
(extent xs)
+Computes dot product of matrices or vectors `x` and `y`.

math/epsilon number source
Epsilon constant

math/extent function source
(extent xs)
 
-Returns the minimum & maximum number in an `xs` as tuple.
Community Examples

math/factor function source
(factor n)
+Returns the minimum & maximum number in an `xs` as tuple.

math/factor function source
(factor n)
 
-Returns an array containing the prime factors of `n`.
Community Examples

math/factorial function source
(factorial n)
+Returns an array containing the prime factors of `n`.

math/factorial function source
(factorial n)
 
-Returns factorial of `n`.
Community Examples

math/geometric-mean function source
(geometric-mean xs)
+Returns factorial of `n`.

math/geometric-mean function source
(geometric-mean xs)
 
-Gets the geometric mean from `xs`.
Community Examples

math/get-only-el macro source
(get-only-el m)
+Gets the geometric mean from `xs`.

math/get-only-el macro source
(get-only-el m)
 
 Convenience macro for geting first element
-from first row of the two dimensional array `m`.
Community Examples

math/harmonic-mean function source
(harmonic-mean xs)
+from first row of the two dimensional array `m`.

math/harmonic-mean function source
(harmonic-mean xs)
 
-Gets the harmonic mean from `xs`.
Community Examples

math/ident function source
(ident c)
+Gets the harmonic mean from `xs`.

math/ident function source
(ident c)
 
-Creates identity matrix with `c` x `c` size.
Community Examples

math/interquartile-range function source
(interquartile-range xs)
+Creates identity matrix with `c` x `c` size.

math/interquartile-range function source
(interquartile-range xs)
 
-Gets the interquartile range from `xs`.
Community Examples

math/invmod cfunction source
(math/invmod a m)
+Gets the interquartile range from `xs`.

math/invmod cfunction source
(math/invmod a m)
 
-Modular multiplicative inverse of `a` mod `m`. Both arguments must be integer. The return value has the same type as `m`. If no inverse exists, returns `math/nan` instead.
Community Examples

math/jacobi cfunction source
(math/jacobi a m)
+Modular multiplicative inverse of `a` mod `m`. Both arguments must be integer. The return value has the same type as `m`. If no inverse exists, returns `math/nan` instead.

math/jacobi cfunction source
(math/jacobi a m)
 
-Computes the Jacobi Symbol (a|m).
Community Examples

math/linear-regression function source
(linear-regression coords)
+Computes the Jacobi Symbol (a|m).

math/linear-regression function source
(linear-regression coords)
 
 Computes the slope `:m` and y-intercept `:b`
-of the function in the struct from set of coordinates.
Community Examples

math/linear-regression-line function source
(linear-regression-line {:m m :b b})
+of the function in the struct from set of coordinates.

math/linear-regression-line function source
(linear-regression-line {:m m :b b})
 
-Constructs function from struct returned by linear regression.
Community Examples

math/median function source
(median xs)
+Constructs function from struct returned by linear regression.

math/median function source
(median xs)
 
-Gets the median value from `xs`
Community Examples

math/median-absolute-deviation function source
(median-absolute-deviation xs)
+Gets the median value from `xs`

math/median-absolute-deviation function source
(median-absolute-deviation xs)
 
-Gets median absolute deviation from `xs`.
Community Examples

math/minor function source
(minor m x y)
+Gets median absolute deviation from `xs`.

math/minor function source
(minor m x y)
 
-Computes minor matrix of matrix `m` and `x`, `y`.
Community Examples

math/mode function source
(mode xs)
+Computes minor matrix of matrix `m` and `x`, `y`.

math/mode function source
(mode xs)
 
-Gets the mode value from `xs`.
Community Examples

math/mop function source
(mop m op a)
+Gets the mode value from `xs`.

math/mop function source
(mop m op a)
 
 Mutates every cell of the matrix `m` with `op`
-and corresponding cell from matrix arg `a`.
Community Examples

math/mul function source
(mul m a)
+and corresponding cell from matrix arg `a`.

math/mul function source
(mul m a)
 
 Multiply matrix `m` with `a` which can be matrix or vector.
-Matrix `m` is mutated.
Community Examples

math/mulmod cfunction source
(math/mulmod a b m)
+Matrix `m` is mutated.

math/mulmod cfunction source
(math/mulmod a b m)
 
-Modular multiplication of `a` and `b` mod `m`. All arguments must be integer. The return value has the same type as `m`.
Community Examples

math/next-prime function source
(next-prime n)
+Modular multiplication of `a` and `b` mod `m`. All arguments must be integer. The return value has the same type as `m`.

math/next-prime function source
(next-prime n)
 
-Returns the next prime number strictly larger than `n`.
Community Examples

math/perm function source
(perm m)
+Returns the next prime number strictly larger than `n`.

math/perm function source
(perm m)
 
-Computes permanent of the matrix `m`.
Community Examples

math/permutation-test function source
(permutation-test xs ys &opt a k)
+Computes permanent of the matrix `m`.

math/permutation-test function source
(permutation-test xs ys &opt a k)
 
 Conducts a permutation test to determine if two data sets
 `xs` and `ys` are *significantly* different from each other.
 You can use alternative hypotesis `a`, which defaults to `:two-side`,
 with `:greater` and `:lesser` being the other two options.
 The last optional argument is `k` number of values
-in permutation distribution
Community Examples

math/permutations function source
(permutations s &opt k)
+in permutation distribution

math/permutations function source
(permutations s &opt k)
 
-Returns permutations of length `k` from members of `s`
Community Examples

math/poisson-distribution function source
(poisson-distribution lambda)
+Returns permutations of length `k` from members of `s`

math/poisson-distribution function source
(poisson-distribution lambda)
 
-Creates Poisson distribution from `lambda` in tuple.
Community Examples

math/powmod cfunction source
(math/powmod a b m)
+Creates Poisson distribution from `lambda` in tuple.

math/powmod cfunction source
(math/powmod a b m)
 
-Modular exponentiation of `a` to the power of `b` mod `m`. All arguments must be integer. The return value has the same type as `m`.
Community Examples

math/prime? function source
(prime? n)
+Modular exponentiation of `a` to the power of `b` mod `m`. All arguments must be integer. The return value has the same type as `m`.

math/prime? function source
(prime? n)
 
-A primality test, deterministic for all `n` less than 2^63.
Community Examples

math/primes function source
(primes)
+A primality test, deterministic for all `n` less than 2^63.

math/primes function source
(primes)
 
-A boundless prime number generator.
Community Examples

math/quantile function source
(quantile xs p)
+A boundless prime number generator.

math/quantile function source
(quantile xs p)
 
-Gets the quantile value from `xs` at `p` from unsorted population.
Community Examples

math/quantile-rank function source
(quantile-rank xs p)
+Gets the quantile value from `xs` at `p` from unsorted population.

math/quantile-rank function source
(quantile-rank xs p)
 
-Gets the quantile rank of value `v` from unsorted `xs`.
Community Examples

math/quantile-rank-sorted function source
(quantile-rank-sorted xs v)
+Gets the quantile rank of value `v` from unsorted `xs`.

math/quantile-rank-sorted function source
(quantile-rank-sorted xs v)
 
-Gets the quantile rank of value `v` from sorted `xs`.
Community Examples

math/quantile-sorted function source
(quantile-sorted xs p)
+Gets the quantile rank of value `v` from sorted `xs`.

math/quantile-sorted function source
(quantile-sorted xs p)
 
-Gets the quantile value from `xs` at `p` from sorted population.
Community Examples

math/quickselect function source
(quickselect arr k &opt left right)
+Gets the quantile value from `xs` at `p` from sorted population.

math/quickselect function source
(quickselect arr k &opt left right)
 
 Rearrange items in `arr` so that all items in `[left, k]` range
 are the smallest.
 The `k`-th element will have the `(k - left + 1)`-th smallest value
 in `[left, right]`.
-Mutates `arr`.
Community Examples

math/relative-err function source
(relative-err a e)
+Mutates `arr`.

math/relative-err function source
(relative-err a e)
 
 Gets the relative err between actual number `a`
-and expected number `e`.
Community Examples

math/root-mean-square function source
(root-mean-square xs)
+and expected number `e`.

math/root-mean-square function source
(root-mean-square xs)
 
-Gets the root mean square from `xs`.
Community Examples

math/rows function source
(rows m)
+Gets the root mean square from `xs`.

math/rows function source
(rows m)
 
-Returns numbers of rows of matrix `m`.
Community Examples

math/sample-correlation function source
(sample-correlation xs ys)
+Returns numbers of rows of matrix `m`.

math/sample-correlation function source
(sample-correlation xs ys)
 
-Gets the sample correlation between `xs` and `ys`.
Community Examples

math/sample-covariance function source
(sample-covariance xs ys)
+Gets the sample correlation between `xs` and `ys`.

math/sample-covariance function source
(sample-covariance xs ys)
 
-Gets the sample covariance between `xs` and `ys`.
Community Examples

math/sample-skewness function source
(sample-skewness xs)
+Gets the sample covariance between `xs` and `ys`.

math/sample-skewness function source
(sample-skewness xs)
 
-Gets the sample skeweness from the `xs`.
Community Examples

math/sample-standard-deviation function source
(sample-standard-deviation xs)
+Gets the sample skeweness from the `xs`.

math/sample-standard-deviation function source
(sample-standard-deviation xs)
 
-Gets sample standard deviation from `xs`.
Community Examples

math/sample-variance function source
(sample-variance xs)
+Gets sample standard deviation from `xs`.

math/sample-variance function source
(sample-variance xs)
 
-Get the sample variance from `xs`.
Community Examples

math/scalar function source
(scalar c s)
+Get the sample variance from `xs`.

math/scalar function source
(scalar c s)
 
-Creates scalar `s` matrix with `c` x `c` size.
Community Examples

math/shuffle-in-place function source
(shuffle-in-place xs)
+Creates scalar `s` matrix with `c` x `c` size.

math/shuffle-in-place function source
(shuffle-in-place xs)
 
 Generate random permutation of the array `xs`
-which is shuffled in place.
Community Examples

math/size function source
(size m)
+which is shuffled in place.

math/size function source
(size m)
 
-Returns tuple with the matrix `m` size [rows cols].
Community Examples

math/sop function source
(sop m op & a)
+Returns tuple with the matrix `m` size [rows cols].

math/sop function source
(sop m op & a)
 
 Mutates every cell of the matrix `m` with `op`
-and variadic args `a`.
Community Examples

math/standard-deviation function source
(standard-deviation xs)
+and variadic args `a`.

math/standard-deviation function source
(standard-deviation xs)
 
-Gets the standard deviation from `ds`.
Community Examples

math/standard-normal-table tuple source
Computed standard normal table.
Community Examples

math/sum-compensated function source
(sum-compensated xs)
+Gets the standard deviation from `ds`.

math/standard-normal-table tuple source
Computed standard normal table.

math/sum-compensated function source
(sum-compensated xs)
 
-Returns sum of the members of `xs` with Kahan-Babushka algorithm.
Community Examples

math/sum-nth-power-deviations function source
(sum-nth-power-deviations xs n)
+Returns sum of the members of `xs` with Kahan-Babushka algorithm.

math/sum-nth-power-deviations function source
(sum-nth-power-deviations xs n)
 
-Get the sum of deviations to the n power.
Community Examples

math/swap function source
(swap arr i j)
+Get the sum of deviations to the n power.

math/swap function source
(swap arr i j)
 
 Swaps members with indices `i` and `j` of arr.
-Noop when `i` equals `j`.
Community Examples

math/t-test function source
(t-test xs expv)
+Noop when `i` equals `j`.

math/t-test function source
(t-test xs expv)
 
 Computes one sample t-test comparing the mean of `xs`
-to known value `expv`.
Community Examples

math/t-test-2 function source
(t-test-2 xs ys &opt d)
+to known value `expv`.

math/t-test-2 function source
(t-test-2 xs ys &opt d)
 
 Computes two sample t-test of two samples `xs` and `ys`
-with difference optional `d` which defaults to 0.
Community Examples

math/trans function source
(trans m)
+with difference optional `d` which defaults to 0.

math/trans function source
(trans m)
 
-Returns a new transposed matrix from `m`.
Community Examples

math/variance function source
(variance xs)
+Returns a new transposed matrix from `m`.

math/variance function source
(variance xs)
 
-Get the variance from the `xs`.
Community Examples

math/z-score function source
(z-score x m d)
+Get the variance from the `xs`.

math/z-score function source
(z-score x m d)
 
 Gets the standard score for number `x` from mean `m`
-and standard deviation `d`.
Community Examples

math/zero function source
(zero c &opt r)
+and standard deviation `d`.

math/zero function source
(zero c &opt r)
 
 Creates vector of length `c`, or matrix if `r`
-is provided, and fills it with zeros.
Community Examples
+is provided, and fills it with zeros.

JSON Miscellaneous Functions diff --git a/static/1.31.0/api/spork/misc.html b/static/1.31.0/api/spork/misc.html index 31161950..5361c224 100644 --- a/static/1.31.0/api/spork/misc.html +++ b/static/1.31.0/api/spork/misc.html @@ -120,99 +120,99 @@

Index

misc/always misc/antepenultimate misc/binary-search misc/binary-search-by misc/caperr misc/capout misc/cond-> misc/cond->> misc/dedent misc/defs misc/dfs misc/do-def misc/do-var misc/format-table misc/gett misc/insert-sorted misc/insert-sorted-by misc/int->string misc/int/ misc/log misc/make misc/make-id misc/map-keys misc/map-keys-flat misc/map-vals misc/merge-sorted misc/merge-sorted-by misc/penultimate misc/print-table misc/randomize-array misc/second misc/select-keys misc/set* misc/string->int misc/table-filter misc/third misc/trim-prefix misc/trim-suffix misc/until misc/vars


misc/always function source
(always x)
 
-Return a function that discards any arguments and always returns `x`.
Community Examples

misc/antepenultimate function source
(antepenultimate xs)
+Return a function that discards any arguments and always returns `x`.

misc/antepenultimate function source
(antepenultimate xs)
 
-Get the third-to-last element from an indexed data structure.
Community Examples

misc/binary-search macro source
(binary-search x arr &opt <?)
+Get the third-to-last element from an indexed data structure.

misc/binary-search macro source
(binary-search x arr &opt <?)
 
 Returns the index of `x` in a sorted array or tuple or the index of
 the next item if `x` is not present. This is the correct insert index
 for `x` within `arr`. If a `<?` comparator is given, the search uses
-that to compare elements, otherwise uses `<`.
Community Examples

misc/binary-search-by macro source
(binary-search-by x arr f)
+that to compare elements, otherwise uses `<`.

misc/binary-search-by macro source
(binary-search-by x arr f)
 
 Returns the index of `x` in an array or tuple which has been sorted
 by a mapping function `f`, or the index of the next item if `x` is not
-present. This is the correct insert index for `x` within `arr`.
Community Examples

misc/caperr macro source
(caperr & body)
+present. This is the correct insert index for `x` within `arr`.

misc/caperr macro source
(caperr & body)
 
 Captures the standart error output of the variadic `body` and returns it
-as a buffer.
Community Examples

misc/capout macro source
(capout & body)
+as a buffer.

misc/capout macro source
(capout & body)
 
 Captures the standart output of the variadic `body` and returns it as
-a buffer.
Community Examples

misc/cond-> macro source
(cond-> val & clauses)
+a buffer.

misc/cond-> macro source
(cond-> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs with condition and operation to which the `val`,
 is put as first argument. All conditions are tried and
 for truthy conditions the operation is executed.
-Returns the value mutated if any condition is truthy.
Community Examples

misc/cond->> macro source
(cond->> val & clauses)
+Returns the value mutated if any condition is truthy.

misc/cond->> macro source
(cond->> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs of condition and operation to which the `val`,
 is put as last argument. All conditions are tried and
 for truthy the operation is ran.
-Returns mutated value if any condition is truthy.
Community Examples

misc/dedent function source
(dedent & xs)
+Returns mutated value if any condition is truthy.

misc/dedent function source
(dedent & xs)
 
 Remove indentation after concatenating the arguments. Works by removing
 leading whitespace, and then removing that same pattern of whitepsace after
-new lines.
Community Examples

misc/defs macro source
(defs & bindings)
+new lines.

misc/defs macro source
(defs & bindings)
 
-Defines many constants as in let `bindings`, but without creating new scope.
Community Examples

misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
+Defines many constants as in let `bindings`, but without creating new scope.

misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
 
 Do a depth first, pre-order traversal over a data structure.
 Also allow for callbacks before and after visiting the children
 of a node. Also allow for a custom `get-children` function to
 change traversal as needed. Will detect cycles if an empty table
 is passed as the `seen` parameter, which is used to cached values
-that have been visited.
Community Examples

misc/do-def macro source
(do-def c d & body)
+that have been visited.

misc/do-def macro source
(do-def c d & body)
 
 Convenience macro for defining constant named `c` with value `d` before `body`
 and returning it after evaluating `body`, that presumably modifies
-the `c` refered content. For example buffer, table or array.
Community Examples

misc/do-var macro source
(do-var v d & body)
+the `c` refered content. For example buffer, table or array.

misc/do-var macro source
(do-var v d & body)
 
 Convenience macro for defining varible named `v` with value `d` before `body`
-and returning it after evaluating `body`, that presumably modifies `v`.
Community Examples

misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
+and returning it after evaluating `body`, that presumably modifies `v`.

misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
 
-Same as print-table but pushes table into a buffer.
Community Examples

misc/gett macro source
(gett ds & keys)
+Same as print-table but pushes table into a buffer.

misc/gett macro source
(gett ds & keys)
 
-Recursive macro (get). Similar to get-in, but keys are variadic argument.
Community Examples

misc/insert-sorted function source
(insert-sorted arr <? & xs)
+Recursive macro (get). Similar to get-in, but keys are variadic argument.

misc/insert-sorted function source
(insert-sorted arr <? & xs)
 
 Insert elements in `arr` such that it remains sorted by the comparator. If
-`arr` is not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
+`arr` is not sorted beforehand, the results are undefined. Returns `arr`.

misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
 
 Insert elements in `arr` such that it remains sorted by the value returned
 when `f` is called with the element, comparing the values with `<`. If `arr` is
-not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

misc/int->string function source
(int->string int &opt base)
+not sorted beforehand, the results are undefined. Returns `arr`.

misc/int->string function source
(int->string int &opt base)
 
-Stringify an integer in a particular base. Defaults to decimal (base 10).
Community Examples

misc/int/ function source
(int/ & xs)
+Stringify an integer in a particular base. Defaults to decimal (base 10).

misc/int/ function source
(int/ & xs)
 
-Perform integer division.
Community Examples

misc/log macro source
(log level & args)
+Perform integer division.

misc/log macro source
(log level & args)
 
 Print to a dynamic binding stream if that stream is set, otherwise do
 nothing. Evaluate to nil.
 For example, `(log :err "value error: %V" my-value)` will print
-to `(dyn :err)` only if `(dyn :err)` has been set.
Community Examples

misc/make macro source
(make prototype & pairs)
+to `(dyn :err)` only if `(dyn :err)` has been set.

misc/make macro source
(make prototype & pairs)
 
 Convenience macro for creating new table from even number of kvs pairs in a variadic `table-or-pairs`
 arguments and setting its prototype to `prototype`.
-Factory function for creating new objects from prototypes.
Community Examples

misc/make-id function source
(make-id &opt prefix)
+Factory function for creating new objects from prototypes.

misc/make-id function source
(make-id &opt prefix)
 
 Create a random, printable keyword id with 10 bytes of entropy
-with an optional prefix.
Community Examples

misc/map-keys function source
(map-keys f data)
+with an optional prefix.

misc/map-keys function source
(map-keys f data)
 
 Returns new table with function `f` applied to `data`'s
-keys recursively.
Community Examples

misc/map-keys-flat function source
(map-keys-flat f data)
+keys recursively.

misc/map-keys-flat function source
(map-keys-flat f data)
 
 Returns new table with function `f` applied to `data`'s
-keys without recursing.
Community Examples

misc/map-vals function source
(map-vals f data)
+keys without recursing.

misc/map-vals function source
(map-vals f data)
 
-Returns new table with function `f` applied to `data`'s values.
Community Examples

misc/merge-sorted function source
(merge-sorted a b &opt <?)
+Returns new table with function `f` applied to `data`'s values.

misc/merge-sorted function source
(merge-sorted a b &opt <?)
 
 Merges two sorted arrays so that the result remains sorted, using an optional comparator.
-If no comparator is given, `<` is used.
Community Examples

misc/merge-sorted-by function source
(merge-sorted-by a b f)
+If no comparator is given, `<` is used.

misc/merge-sorted-by function source
(merge-sorted-by a b f)
 
 Merges two sorted arrays so that result remains sorted when `f` is called on each element,
-comparing the values with `<`.
Community Examples

misc/penultimate function source
(penultimate xs)
+comparing the values with `<`.

misc/penultimate function source
(penultimate xs)
 
-Get the second-to-last element from an indexed data structure.
Community Examples

misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
+Get the second-to-last element from an indexed data structure.

misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
 
 Iterate through the rows of a data structure and print a table in a human
 readable way, with padding and heading information. Can optionally provide
@@ -220,37 +220,37 @@ 

Index for each row. Lastly, a `header-mapping` dictionary can be provided that changes the printed header names by mapping column keys to the desired header name. If no mapping is found, then the column key will be used as -the header name. Returns nil.

Community Examples

misc/randomize-array function source
(randomize-array arr &opt rng)
+the header name. Returns nil.

misc/randomize-array function source
(randomize-array arr &opt rng)
 
 Randomizes array using the fisher-yates shuffle, takes an optional random
-number generator.
Community Examples

misc/second function source
(second xs)
+number generator.

misc/second function source
(second xs)
 
-Get the second element from an indexed data structure.
Community Examples

misc/select-keys function source
(select-keys data keyz)
+Get the second element from an indexed data structure.

misc/select-keys function source
(select-keys data keyz)
 
-Returns new table with selected `keyz` from dictionary `data`.
Community Examples

misc/set* macro source
(set* tgts exprs)
+Returns new table with selected `keyz` from dictionary `data`.

misc/set* macro source
(set* tgts exprs)
 
 Parallel `set` function. Takes a list of targets and
 expressions, evaluates all the expressions, and then
 assigns them to the targets. Each target can be a variable
-or a 2-tuple, just like in the normal `set` special form.
Community Examples

misc/string->int function source
(string->int str &opt base)
+or a 2-tuple, just like in the normal `set` special form.

misc/string->int function source
(string->int str &opt base)
 
 Parse an integer in the given base. Defaults to decimal (base 10). Differs
-from scan-number in that this does not recognize floating point notation.
Community Examples

misc/table-filter function source
(table-filter pred dict)
+from scan-number in that this does not recognize floating point notation.

misc/table-filter function source
(table-filter pred dict)
 
 Filter a key-value structure info a table. Semantics are the same as for
 built-in `filter`, except that `pred` takes two arguments (key and value.)
-Does not consider prototypes.
Community Examples

misc/third function source
(third xs)
+Does not consider prototypes.

misc/third function source
(third xs)
 
-Get the third element from an indexed data structure.
Community Examples

misc/trim-prefix function source
(trim-prefix prefix str)
+Get the third element from an indexed data structure.

misc/trim-prefix function source
(trim-prefix prefix str)
 
-Trim the specified prefix of a string if it has one
Community Examples

misc/trim-suffix function source
(trim-suffix suffix str)
+Trim the specified prefix of a string if it has one

misc/trim-suffix function source
(trim-suffix suffix str)
 
-Trim the specified suffix of a string if it has one
Community Examples

misc/until macro source
(until cnd & body)
+Trim the specified suffix of a string if it has one

misc/until macro source
(until cnd & body)
 
 Repeat `body` while the `cnd` is false.
-Equivalent to (while (not cnd) ;body).
Community Examples

misc/vars macro source
(vars & bindings)
+Equivalent to (while (not cnd) ;body).

misc/vars macro source
(vars & bindings)
 
-Defines many variables as in let `bindings`, but without creating new scope.
Community Examples
+Defines many variables as in let `bindings`, but without creating new scope.
Math extended NetREPL diff --git a/static/1.31.0/api/spork/msg.html b/static/1.31.0/api/spork/msg.html index a2bd0d23..9259d2e3 100644 --- a/static/1.31.0/api/spork/msg.html +++ b/static/1.31.0/api/spork/msg.html @@ -120,11 +120,11 @@

Index

msg/make-proto msg/make-recv msg/make-send


msg/make-proto function source
(make-proto stream &opt pack unpack)
 
-Create both a send an recv function from a stream, as with `make-send` and `make-recv`.
Community Examples

msg/make-recv function source
(make-recv stream &opt unpack)
+Create both a send an recv function from a stream, as with `make-send` and `make-recv`.

msg/make-recv function source
(make-recv stream &opt unpack)
 
-Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.
Community Examples

msg/make-send function source
(make-send stream &opt pack)
+Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.

msg/make-send function source
(make-send stream &opt pack)
 
-Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Community Examples
+Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Shell Utilities Test diff --git a/static/1.31.0/api/spork/netrepl.html b/static/1.31.0/api/spork/netrepl.html index c607a0bb..9f110ef2 100644 --- a/static/1.31.0/api/spork/netrepl.html +++ b/static/1.31.0/api/spork/netrepl.html @@ -120,11 +120,11 @@

Index

netrepl/client netrepl/default-host netrepl/default-port netrepl/server netrepl/server-single


netrepl/client function source
(client &opt host port name)
 
-Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".
Community Examples

netrepl/default-host string source
Default host to run server on and connect to.
Community Examples

netrepl/default-port string source
Default port to run the net repl.
Community Examples

netrepl/server function source
(server &opt host port env cleanup welcome-msg)
+Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".

netrepl/default-host string source
Default host to run server on and connect to.

netrepl/default-port string source
Default port to run the net repl.

netrepl/server function source
(server &opt host port env cleanup welcome-msg)
 
-Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.
Community Examples

netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
+Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.

netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
 
-Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Community Examples
+Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Miscellaneous Functions Path Utilities diff --git a/static/1.31.0/api/spork/path.html b/static/1.31.0/api/spork/path.html index e0144eba..31feb9d2 100644 --- a/static/1.31.0/api/spork/path.html +++ b/static/1.31.0/api/spork/path.html @@ -120,59 +120,59 @@

Index

path/abspath path/abspath? path/basename path/delim path/dirname path/ext path/join path/normalize path/parts path/posix/abspath path/posix/abspath? path/posix/basename path/posix/delim path/posix/dirname path/posix/ext path/posix/join path/posix/normalize path/posix/parts path/posix/relpath path/posix/sep path/relpath path/sep path/win32/abspath path/win32/abspath? path/win32/basename path/win32/delim path/win32/dirname path/win32/ext path/win32/join path/win32/normalize path/win32/parts path/win32/relpath path/win32/sep


path/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

path/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/basename function source
(posix/basename path)
+Check if a path is absolute.

path/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

path/delim string source
Platform delimiter
Community Examples

path/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

path/delim string source
Platform delimiter

path/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/ext function source
(ext path)
+Gets the directory name of a path.

path/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/join function source
(posix/join & els)
+Get the file extension for a path.

path/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

path/normalize function source
(posix/normalize path)
+Join path elements together.

path/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

path/posix/abspath function source
(posix/abspath path)
+Split a path into its parts.

path/posix/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/posix/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

path/posix/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/posix/basename function source
(posix/basename path)
+Check if a path is absolute.

path/posix/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

path/posix/delim string source
Platform delimiter
Community Examples

path/posix/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

path/posix/delim string source
Platform delimiter

path/posix/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/posix/ext function source
(ext path)
+Gets the directory name of a path.

path/posix/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/posix/join function source
(posix/join & els)
+Get the file extension for a path.

path/posix/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

path/posix/normalize function source
(posix/normalize path)
+Join path elements together.

path/posix/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/posix/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/posix/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

path/posix/relpath function source
(posix/relpath source target)
+Split a path into its parts.

path/posix/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/posix/sep string source
Platform separator
Community Examples

path/relpath function source
(posix/relpath source target)
+Get the relative path between two subpaths.

path/posix/sep string source
Platform separator

path/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/sep string source
Platform separator
Community Examples

path/win32/abspath function source
(win32/abspath path)
+Get the relative path between two subpaths.

path/sep string source
Platform separator

path/win32/abspath function source
(win32/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/win32/abspath? function source
(win32/abspath? path)
+Coerce a path to be absolute.

path/win32/abspath? function source
(win32/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/win32/basename function source
(win32/basename path)
+Check if a path is absolute.

path/win32/basename function source
(win32/basename path)
 
-Gets the base file name of a path.
Community Examples

path/win32/delim string source
Platform delimiter
Community Examples

path/win32/dirname function source
(win32/dirname path)
+Gets the base file name of a path.

path/win32/delim string source
Platform delimiter

path/win32/dirname function source
(win32/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/win32/ext function source
(ext path)
+Gets the directory name of a path.

path/win32/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/win32/join function source
(win32/join & els)
+Get the file extension for a path.

path/win32/join function source
(win32/join & els)
 
-Join path elements together.
Community Examples

path/win32/normalize function source
(win32/normalize path)
+Join path elements together.

path/win32/normalize function source
(win32/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/win32/parts function source
(win32/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/win32/parts function source
(win32/parts path)
 
-Split a path into its parts.
Community Examples

path/win32/relpath function source
(win32/relpath source target)
+Split a path into its parts.

path/win32/relpath function source
(win32/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/win32/sep string source
Platform separator
Community Examples
+Get the relative path between two subpaths.

path/win32/sep string source
Platform separator
NetREPL Raw Terminal Functionality diff --git a/static/1.31.0/api/spork/rawterm.html b/static/1.31.0/api/spork/rawterm.html index 8b0812a3..699f0d1f 100644 --- a/static/1.31.0/api/spork/rawterm.html +++ b/static/1.31.0/api/spork/rawterm.html @@ -120,25 +120,25 @@

Index

rawterm/begin rawterm/buffer-traverse rawterm/ctrl-z rawterm/end rawterm/getch rawterm/isatty rawterm/monowidth rawterm/rune-monowidth rawterm/size rawterm/slice-monowidth


rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
 
-Begin raw terminal functionality. Return a stream that can be read from to get input.
Community Examples

rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
+Begin raw terminal functionality. Return a stream that can be read from to get input.

rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
 
-Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.
Community Examples

rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
+Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.

rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
 
-A handler that a user can use to handle ctrl-z from input to suspend the current process.
Community Examples

rawterm/end cfunction source
(rawterm/end)
+A handler that a user can use to handle ctrl-z from input to suspend the current process.

rawterm/end cfunction source
(rawterm/end)
 
-End raw terminal functionality.
Community Examples

rawterm/getch cfunction source
(rawterm/getch &opt into)
+End raw terminal functionality.

rawterm/getch cfunction source
(rawterm/getch &opt into)
 
-Get a byte of input from stdin, without blocking if possible. Returns a buffer.
Community Examples

rawterm/isatty cfunction source
(rawterm/isatty)
+Get a byte of input from stdin, without blocking if possible. Returns a buffer.

rawterm/isatty cfunction source
(rawterm/isatty)
 
-Check if the current stdin is a tty.
Community Examples

rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
+Check if the current stdin is a tty.

rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
 
-Measure the monospace width of a string.
Community Examples

rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
+Measure the monospace width of a string.

rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
 
-Get the monospace width of a rune. Returns either 0, 1, or 2.
Community Examples

rawterm/size cfunction source
(rawterm/size)
+Get the monospace width of a rune. Returns either 0, 1, or 2.

rawterm/size cfunction source
(rawterm/size)
 
-Get the number of rows and columns visible in the terminal as tuple [rows cols]
Community Examples

rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
+Get the number of rows and columns visible in the terminal as tuple [rows cols]

rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
 
-Get a byte slice that will fit into a number of columns.
Community Examples
+Get a byte slice that will fit into a number of columns.
Path Utilities Regular Expression PEG Syntax diff --git a/static/1.31.0/api/spork/regex.html b/static/1.31.0/api/spork/regex.html index bb00dddf..ea7aa514 100644 --- a/static/1.31.0/api/spork/regex.html +++ b/static/1.31.0/api/spork/regex.html @@ -123,19 +123,19 @@

Index

regex/compile regex/find regex/find-all regex/match regex/peg regex/replace regex/replace-all regex/source


regex/compile function source
(compile pattern)
 
-Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.
Community Examples

regex/find function source
(find reg text &opt start)
+Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.

regex/find function source
(find reg text &opt start)
 
-Similar to peg/find, but for regexes.
Community Examples

regex/find-all function source
(find-all reg text &opt start)
+Similar to peg/find, but for regexes.

regex/find-all function source
(find-all reg text &opt start)
 
-Similar to peg/find-all, but for regexes.
Community Examples

regex/match function source
(match reg text &opt start)
+Similar to peg/find-all, but for regexes.

regex/match function source
(match reg text &opt start)
 
-Similar to peg/match, but for regexes.
Community Examples

regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.
Community Examples

regex/replace function source
(replace reg rep text &opt start)
+Similar to peg/match, but for regexes.

regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.

regex/replace function source
(replace reg rep text &opt start)
 
-Similar to peg/replace, but for regexes.
Community Examples

regex/replace-all function source
(replace-all reg rep text &opt start)
+Similar to peg/replace, but for regexes.

regex/replace-all function source
(replace-all reg rep text &opt start)
 
-Similar to peg/replace-all, but for regexes.
Community Examples

regex/source function source
(source pattern)
+Similar to peg/replace-all, but for regexes.

regex/source function source
(source pattern)
 
-Compile a subset of regex to PEG source code.
Community Examples
+Compile a subset of regex to PEG source code.
Raw Terminal Functionality Remote Procedure Calls diff --git a/static/1.31.0/api/spork/rpc.html b/static/1.31.0/api/spork/rpc.html index 9b3cb42e..96bd88d9 100644 --- a/static/1.31.0/api/spork/rpc.html +++ b/static/1.31.0/api/spork/rpc.html @@ -120,9 +120,9 @@

Index

rpc/client rpc/default-host rpc/default-port rpc/server


rpc/client function source
(client &opt host port name)
 
-Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.
Community Examples

rpc/default-host string source
Default host to run server on and connect to.
Community Examples

rpc/default-port string source
Default port to run the net repl.
Community Examples

rpc/server function source
(server functions &opt host port workers-per-connection)
+Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.

rpc/default-host string source
Default host to run server on and connect to.

rpc/default-port string source
Default port to run the net repl.

rpc/server function source
(server functions &opt host port workers-per-connection)
 
-Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Community Examples
+Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Regular Expression PEG Syntax Schema diff --git a/static/1.31.0/api/spork/schema.html b/static/1.31.0/api/spork/schema.html index 5ef482bc..462f0dd6 100644 --- a/static/1.31.0/api/spork/schema.html +++ b/static/1.31.0/api/spork/schema.html @@ -120,13 +120,13 @@

Index

schema/make-predicate schema/make-validator schema/predicate schema/validator


schema/make-predicate function source
(make-predicate schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `predicate`.
Community Examples

schema/make-validator function source
(make-validator schema)
+Generate a function that can be used to validate a data structure. This is the function form of `predicate`.

schema/make-validator function source
(make-validator schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `validator`.
Community Examples

schema/predicate macro source
(predicate pattern)
+Generate a function that can be used to validate a data structure. This is the function form of `validator`.

schema/predicate macro source
(predicate pattern)
 
-Make a validation predicate given a certain schema.
Community Examples

schema/validator macro source
(validator pattern)
+Make a validation predicate given a certain schema.

schema/validator macro source
(validator pattern)
 
-Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Community Examples
+Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Remote Procedure Calls Shell Utilities diff --git a/static/1.31.0/api/spork/sh.html b/static/1.31.0/api/spork/sh.html index 9a614abe..a2d7b22a 100644 --- a/static/1.31.0/api/spork/sh.html +++ b/static/1.31.0/api/spork/sh.html @@ -121,36 +121,36 @@

Index

sh/copy sh/copy-file sh/create-dirs sh/devnull sh/escape sh/exec sh/exec-fail sh/exec-slurp sh/exec-slurp-all sh/exists? sh/list-all-files sh/make-new-file sh/rm sh/scan-directory sh/split


sh/copy function source
(copy src dest)
 
 Copy a file or directory recursively from one location to another.
-Expects input to be unix style paths
Community Examples

sh/copy-file function source
(copy-file src-path dst-path)
+Expects input to be unix style paths

sh/copy-file function source
(copy-file src-path dst-path)
 
-Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.
Community Examples

sh/create-dirs function source
(create-dirs dir-path)
+Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.

sh/create-dirs function source
(create-dirs dir-path)
 
-Create all directories in path specified as string including itself.
Community Examples

sh/devnull function source
(devnull)
+Create all directories in path specified as string including itself.

sh/devnull function source
(devnull)
 
-get the /dev/null equivalent of the current platform as an open file
Community Examples

sh/escape function source
(escape & args)
+get the /dev/null equivalent of the current platform as an open file

sh/escape function source
(escape & args)
 
-Output a string with all arguments correctly quoted
Community Examples

sh/exec function source
(exec & args)
+Output a string with all arguments correctly quoted

sh/exec function source
(exec & args)
 
-Execute command specified by args returning it's exit code
Community Examples

sh/exec-fail function source
(exec-fail & args)
+Execute command specified by args returning it's exit code

sh/exec-fail function source
(exec-fail & args)
 
-Execute command specified by args, fails when command exits with non-zero exit code
Community Examples

sh/exec-slurp function source
(exec-slurp & args)
+Execute command specified by args, fails when command exits with non-zero exit code

sh/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of command specified by args and return it trimmed in a string.
Community Examples

sh/exec-slurp-all function source
(exec-slurp-all & args)
+Read stdout of command specified by args and return it trimmed in a string.

sh/exec-slurp-all function source
(exec-slurp-all & args)
 
 Read stdout and stderr of subprocess and return it trimmed in a struct with :err and :out containing the output as string.
-This will also return the exit code under the :status key.
Community Examples

sh/exists? function source
(exists? path)
+This will also return the exit code under the :status key.

sh/exists? function source
(exists? path)
 
-Check if the given file or directory exists. (Follows symlinks)
Community Examples

sh/list-all-files function source
(list-all-files dir &opt into)
+Check if the given file or directory exists. (Follows symlinks)

sh/list-all-files function source
(list-all-files dir &opt into)
 
-List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.
Community Examples

sh/make-new-file function source
(make-new-file file-path &opt mode)
+List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.

sh/make-new-file function source
(make-new-file file-path &opt mode)
 
-Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).
Community Examples

sh/rm function source
(rm path)
+Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).

sh/rm function source
(rm path)
 
-Remove a directory and all sub directories recursively.
Community Examples

sh/scan-directory function source
(scan-directory dir func)
+Remove a directory and all sub directories recursively.

sh/scan-directory function source
(scan-directory dir func)
 
-Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.
Community Examples

sh/split function source
(split s)
+Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.

sh/split function source
(split s)
 
-Split a string into 'sh like' tokens, returns nil if unable to parse the string.
Community Examples
+Split a string into 'sh like' tokens, returns nil if unable to parse the string.

Schema Simple Messaging Protocol diff --git a/static/1.31.0/api/spork/tarray.html b/static/1.31.0/api/spork/tarray.html index 9ce79e49..4dac2f8f 100644 --- a/static/1.31.0/api/spork/tarray.html +++ b/static/1.31.0/api/spork/tarray.html @@ -120,19 +120,19 @@

Index

tarray/buffer tarray/copy-bytes tarray/length tarray/new tarray/properties tarray/slice tarray/swap-bytes


tarray/buffer cfunction
(tarray/buffer array|size)
 
-Return typed array buffer or create a new buffer.
Community Examples

tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
+Return typed array buffer or create a new buffer.

tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
 
-Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.
Community Examples

tarray/length cfunction
(tarray/length array|buffer)
+Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.

tarray/length cfunction
(tarray/length array|buffer)
 
-Return typed array or buffer size.
Community Examples

tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
+Return typed array or buffer size.

tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
 
-Create new typed array.
Community Examples

tarray/properties cfunction
(tarray/properties array)
+Create new typed array.

tarray/properties cfunction
(tarray/properties array)
 
-Return typed array properties as a struct.
Community Examples

tarray/slice cfunction
(tarray/slice tarr &opt start end)
+Return typed array properties as a struct.

tarray/slice cfunction
(tarray/slice tarr &opt start end)
 
-Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.
Community Examples

tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
+Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.

tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
 
-Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Community Examples
+Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Test Zip Files diff --git a/static/1.31.0/api/spork/test.html b/static/1.31.0/api/spork/test.html index ef6b58de..1bf7b754 100644 --- a/static/1.31.0/api/spork/test.html +++ b/static/1.31.0/api/spork/test.html @@ -120,39 +120,39 @@

Index

test/assert test/assert-docs test/assert-error test/assert-no-error test/assert-not test/capture-stderr test/capture-stdout test/end-suite test/start-suite test/suppress-stderr test/suppress-stdout test/timeit test/timeit-loop


test/assert macro source
(assert x &opt e)
 
-Override's the default assert with some nice error handling.
Community Examples

test/assert-docs function source
(assert-docs path)
+Override's the default assert with some nice error handling.

test/assert-docs function source
(assert-docs path)
 
 Assert that all symbols, when module on the path is required,
-have proper doc string
Community Examples

test/assert-error macro source
(assert-error msg & forms)
+have proper doc string

test/assert-error macro source
(assert-error msg & forms)
 
-Test passes if forms error.
Community Examples

test/assert-no-error macro source
(assert-no-error msg & forms)
+Test passes if forms error.

test/assert-no-error macro source
(assert-no-error msg & forms)
 
-Test passes if forms do not error.
Community Examples

test/assert-not macro source
(assert-not x &opt e)
+Test passes if forms do not error.

test/assert-not macro source
(assert-not x &opt e)
 
-Invert assert.
Community Examples

test/capture-stderr macro source
(capture-stderr & body)
+Invert assert.

test/capture-stderr macro source
(capture-stderr & body)
 
 Runs the form and captures stderr. Returns tuple with result of the form
-and a string with captured stderr.
Community Examples

test/capture-stdout macro source
(capture-stdout & body)
+and a string with captured stderr.

test/capture-stdout macro source
(capture-stdout & body)
 
 Runs the form and captures stdout. Returns tuple with result of the form
-and a string with captured stdout.
Community Examples

test/end-suite function source
(end-suite)
+and a string with captured stdout.

test/end-suite function source
(end-suite)
 
-Ends test suite, prints summary and exits if any have failed.
Community Examples

test/start-suite function source
(start-suite &opt name)
+Ends test suite, prints summary and exits if any have failed.

test/start-suite function source
(start-suite &opt name)
 
-Starts test suite.
Community Examples

test/suppress-stderr macro source
(suppress-stderr & body)
+Starts test suite.

test/suppress-stderr macro source
(suppress-stderr & body)
 
-Suppreses stdout from the body
Community Examples

test/suppress-stdout macro source
(suppress-stdout & body)
+Suppreses stdout from the body

test/suppress-stdout macro source
(suppress-stdout & body)
 
-Suppreses stdout from the body
Community Examples

test/timeit macro source
(timeit form &opt tag)
+Suppreses stdout from the body

test/timeit macro source
(timeit form &opt tag)
 
 Time the execution of `form` using `os/clock` before and after,
 and print the result to stdout. returns: result of executing `form`.
-Uses `tag` (default "Elapsed time:") to tag the printout.
Community Examples

test/timeit-loop macro source
(timeit-loop head & body)
+Uses `tag` (default "Elapsed time:") to tag the printout.

test/timeit-loop macro source
(timeit-loop head & body)
 
 Similar to `loop`, but outputs performance statistics after completion.
 Additionally defines a `:timeout` verb to iterate continuously for a given
 number of seconds. If the first form of `body` is a bytes, it will be taken
-as a custom tag.
Community Examples
+as a custom tag.
Simple Messaging Protocol Typed Arrays diff --git a/static/1.31.0/api/spork/zip.html b/static/1.31.0/api/spork/zip.html index 493eeea2..2ef55dd7 100644 --- a/static/1.31.0/api/spork/zip.html +++ b/static/1.31.0/api/spork/zip.html @@ -120,33 +120,33 @@

Index

zip/add-bytes zip/add-file zip/compress zip/decompress zip/extract zip/file-directory? zip/file-encrypted? zip/file-supported? zip/get-filename zip/locate-file zip/read-bytes zip/read-file zip/reader-close zip/reader-count zip/stat zip/version zip/write-buffer zip/write-file zip/writer-close zip/writer-finalize


zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
 
-Add a byte sequence to the zip writer.
Community Examples

zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
+Add a byte sequence to the zip writer.

zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
 
-Add a file to the zip writer.
Community Examples

zip/compress cfunction source
(zip/compress bytes &opt level into)
+Add a file to the zip writer.

zip/compress cfunction source
(zip/compress bytes &opt level into)
 
-Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.
Community Examples

zip/decompress cfunction source
(zip/decompress bytes &opt into)
+Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.

zip/decompress cfunction source
(zip/decompress bytes &opt into)
 
-Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.
Community Examples

zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
+Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.

zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
 
-Extract a file from the zip archive, either to memory or to a file on disk.
Community Examples

zip/file-directory? cfunction source
(zip/file-directory? reader idx)
+Extract a file from the zip archive, either to memory or to a file on disk.

zip/file-directory? cfunction source
(zip/file-directory? reader idx)
 
-Check if a file index is a directory.
Community Examples

zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
+Check if a file index is a directory.

zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
 
-Check if a file is encrypted inside an archive.
Community Examples

zip/file-supported? cfunction source
(zip/file-supported? reader idx)
+Check if a file is encrypted inside an archive.

zip/file-supported? cfunction source
(zip/file-supported? reader idx)
 
-Check if a file is supported with this verstion of miniz.
Community Examples

zip/get-filename cfunction source
(zip/get-filename reader idx)
+Check if a file is supported with this verstion of miniz.

zip/get-filename cfunction source
(zip/get-filename reader idx)
 
-Convert a file index index in the archive to a filename.
Community Examples

zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
+Convert a file index index in the archive to a filename.

zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
 
-Get the index of a particular filename in the archive.
Community Examples

zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
+Get the index of a particular filename in the archive.

zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
 
-Read a byte sequence as a zip archive. Returns a new zip reader.
Community Examples

zip/read-file cfunction source
(zip/read-file filename &opt flags)
+Read a byte sequence as a zip archive. Returns a new zip reader.

zip/read-file cfunction source
(zip/read-file filename &opt flags)
 
-Read a file as a zip archive. Returns a new zip reader.
Community Examples

zip/reader-close cfunction source
(zip/reader-close reader)
+Read a file as a zip archive. Returns a new zip reader.

zip/reader-close cfunction source
(zip/reader-close reader)
 
-Close a reader and free related memory.
Community Examples

zip/reader-count cfunction source
(zip/reader-count reader)
+Close a reader and free related memory.

zip/reader-count cfunction source
(zip/reader-count reader)
 
-Get the number of files inside the zip archive. The files can be indexed 
Community Examples

zip/stat cfunction source
(zip/stat reader idx)
+Get the number of files inside the zip archive. The files can be indexed 

zip/stat cfunction source
(zip/stat reader idx)
 
 Get stat information of file. Returns a new struct with the following fields:
 
@@ -163,17 +163,17 @@ 

Index * :comment * :internal-attr * :external-attr -

Community Examples

zip/version cfunction source
(zip/version)
+

zip/version cfunction source
(zip/version)
 
-Get the version string of the underlying miniz library.
Community Examples

zip/write-buffer cfunction source
(zip/write-buffer)
+Get the version string of the underlying miniz library.

zip/write-buffer cfunction source
(zip/write-buffer)
 
-Create a new zip archive writer that write to memory.
Community Examples

zip/write-file cfunction source
(zip/write-file dest-path)
+Create a new zip archive writer that write to memory.

zip/write-file cfunction source
(zip/write-file dest-path)
 
-Create a new zip archive writer that will write into an archive file.
Community Examples

zip/writer-close cfunction source
(zip/writer-close writer)
+Create a new zip archive writer that will write into an archive file.

zip/writer-close cfunction source
(zip/writer-close writer)
 
-Close a ZipWriter.
Community Examples

zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
+Close a ZipWriter.

zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
 
-Finalize a writer, writing any zip files to disk. Return the writer.
Community Examples
+Finalize a writer, writing any zip files to disk. Return the writer.
Typed Arrays String Module diff --git a/static/1.34.0/api/jpm/cc.html b/static/1.34.0/api/jpm/cc.html index 9d6955ca..bbe43661 100644 --- a/static/1.34.0/api/jpm/cc.html +++ b/static/1.34.0/api/jpm/cc.html @@ -122,35 +122,35 @@

Index

cc/archive-c cc/compile-c cc/create-buffer-c cc/create-buffer-c-impl cc/create-executable cc/embed-name cc/entry-name cc/entry-replace cc/link-c cc/make-bin-source cc/make-define cc/make-defines cc/modpath-to-meta cc/modpath-to-static cc/out-path


cc/archive-c function source
(archive-c opts target & objects)
 
-Link object files together to make a static library.
Community Examples

cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
+Link object files together to make a static library.

cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
 
-Compile a C file into an object file.
Community Examples

cc/create-buffer-c function source
(create-buffer-c source dest name)
+Compile a C file into an object file.

cc/create-buffer-c function source
(create-buffer-c source dest name)
 
-Inline raw byte file as a c file.
Community Examples

cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
+Inline raw byte file as a c file.

cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
 
-
Community Examples

cc/create-executable function source
(create-executable opts source dest no-core)
+

cc/create-executable function source
(create-executable opts source dest no-core)
 
-Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.
Community Examples

cc/embed-name function source
(embed-name path)
+Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.

cc/embed-name function source
(embed-name path)
 
-Rename a janet symbol for embedding.
Community Examples

cc/entry-name function source
(entry-name name)
+Rename a janet symbol for embedding.

cc/entry-name function source
(entry-name name)
 
-Name of symbol that enters static compilation of a module.
Community Examples

cc/entry-replace function source
(entry-replace name)
+Name of symbol that enters static compilation of a module.

cc/entry-replace function source
(entry-replace name)
 
-Escape special characters in the entry-name
Community Examples

cc/link-c function source
(link-c has-cpp opts target & objects)
+Escape special characters in the entry-name

cc/link-c function source
(link-c has-cpp opts target & objects)
 
-Link C or C++ object files together to make a native module.
Community Examples

cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
+Link C or C++ object files together to make a native module.

cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
 
-
Community Examples

cc/make-define function source
(make-define define value)
+

cc/make-define function source
(make-define define value)
 
-Generate strings for adding custom defines to the compiler.
Community Examples

cc/make-defines function source
(make-defines defines)
+Generate strings for adding custom defines to the compiler.

cc/make-defines function source
(make-defines defines)
 
-Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.
Community Examples

cc/modpath-to-meta function source
(modpath-to-meta path)
+Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.

cc/modpath-to-meta function source
(modpath-to-meta path)
 
-Get the meta file path (.meta.janet) corresponding to a native module path (.so).
Community Examples

cc/modpath-to-static function source
(modpath-to-static path)
+Get the meta file path (.meta.janet) corresponding to a native module path (.so).

cc/modpath-to-static function source
(modpath-to-static path)
 
-Get the static library (.a) path corresponding to a native module path (.so).
Community Examples

cc/out-path function source
(out-path path from-ext to-ext)
+Get the static library (.a) path corresponding to a native module path (.so).

cc/out-path function source
(out-path path from-ext to-ext)
 
-Take a source file path and convert it to an output path.
Community Examples
+Take a source file path and convert it to an output path.
Build Rules C Source Generation diff --git a/static/1.34.0/api/jpm/cgen.html b/static/1.34.0/api/jpm/cgen.html index e3a50700..33420b36 100644 --- a/static/1.34.0/api/jpm/cgen.html +++ b/static/1.34.0/api/jpm/cgen.html @@ -122,13 +122,13 @@

Index

cgen/add-loader cgen/ir cgen/mangle cgen/print-ir


cgen/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

cgen/ir macro source
(ir & body)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

cgen/ir macro source
(ir & body)
 
-Macro that automatically quotes the body provided and calls (print-ir ...) on the body.
Community Examples

cgen/mangle function source
(mangle token)
+Macro that automatically quotes the body provided and calls (print-ir ...) on the body.

cgen/mangle function source
(mangle token)
 
-Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.
Community Examples

cgen/print-ir function source
(print-ir ir)
+Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.

cgen/print-ir function source
(print-ir ir)
 
-Compile the CGEN IR to C and print it to (dyn :out).
Community Examples
+Compile the CGEN IR to C and print it to (dyn :out).
C Compiler Command Line Interface diff --git a/static/1.34.0/api/jpm/cli.html b/static/1.34.0/api/jpm/cli.html index b7384626..d6582315 100644 --- a/static/1.34.0/api/jpm/cli.html +++ b/static/1.34.0/api/jpm/cli.html @@ -122,11 +122,11 @@

Index

cli/jpm cli/main cli/run cli/setup


cli/jpm macro source
(jpm & argv)
 
-A Macro User Interface for jpm to be used from a repl in a way similar to the command line.
Community Examples

cli/main function source
(main & argv)
+A Macro User Interface for jpm to be used from a repl in a way similar to the command line.

cli/main function source
(main & argv)
 
-Script entry.
Community Examples

cli/run function source
(run & args)
+Script entry.

cli/run function source
(run & args)
 
-Run CLI commands.
Community Examples

cli/setup function source
(setup args)
+Run CLI commands.

cli/setup function source
(setup args)
 
 Load configuration from the command line, environment variables, and
 configuration files. Returns array of non-configuration arguments as well.
@@ -134,7 +134,7 @@ 

Index 1. Commmand line settings 2. The value of `(dyn :jpm-config)` 3. Environment variables - 4. Config file settings (default-config if non specified)

Community Examples
+ 4. Config file settings (default-config if non specified)
C Source Generation Commands diff --git a/static/1.34.0/api/jpm/commands.html b/static/1.34.0/api/jpm/commands.html index 8e8351bb..ef42b314 100644 --- a/static/1.34.0/api/jpm/commands.html +++ b/static/1.34.0/api/jpm/commands.html @@ -122,49 +122,49 @@

Index

commands/build commands/clean commands/configure commands/deps commands/enable-local-mode commands/help commands/install commands/jpm-debug-repl commands/list-installed commands/list-pkgs commands/list-rules commands/list-tasks commands/new-c-project commands/new-exe-project commands/new-project commands/quickbin commands/set-tree commands/show-config commands/show-paths commands/show-rule-tree commands/test commands/update-pkgs


commands/build function source
(build)
 
-
Community Examples

commands/clean function source
(clean)
+

commands/clean function source
(clean)
 
-
Community Examples

commands/configure function source
(configure &opt path)
+

commands/configure function source
(configure &opt path)
 
-Setup an out-of-tree build with certain configuration options.
Community Examples

commands/deps function source
(deps)
+Setup an out-of-tree build with certain configuration options.

commands/deps function source
(deps)
 
-
Community Examples

commands/enable-local-mode function source
(enable-local-mode)
+

commands/enable-local-mode function source
(enable-local-mode)
 
-Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/
Community Examples

commands/help function source
(help)
+Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/

commands/help function source
(help)
 
-
Community Examples

commands/install function source
(install & repo)
+

commands/install function source
(install & repo)
 
-
Community Examples

commands/jpm-debug-repl function source
(jpm-debug-repl)
+

commands/jpm-debug-repl function source
(jpm-debug-repl)
 
-
Community Examples

commands/list-installed function source
(list-installed)
+

commands/list-installed function source
(list-installed)
 
-
Community Examples

commands/list-pkgs function source
(list-pkgs &opt search)
+

commands/list-pkgs function source
(list-pkgs &opt search)
 
-
Community Examples

commands/list-rules function source
(list-rules &opt ctx)
+

commands/list-rules function source
(list-rules &opt ctx)
 
-
Community Examples

commands/list-tasks function source
(list-tasks &opt ctx)
+

commands/list-tasks function source
(list-tasks &opt ctx)
 
-
Community Examples

commands/new-c-project function source
(new-c-project name)
+

commands/new-c-project function source
(new-c-project name)
 
-Create a new C project
Community Examples

commands/new-exe-project function source
(new-exe-project name)
+Create a new C project

commands/new-exe-project function source
(new-exe-project name)
 
-Create a new executable project
Community Examples

commands/new-project function source
(new-project name)
+Create a new executable project

commands/new-project function source
(new-project name)
 
-Create a new project
Community Examples

commands/quickbin function source
(quickbin input output)
+Create a new project

commands/quickbin function source
(quickbin input output)
 
-
Community Examples

commands/set-tree function source
(set-tree tree)
+

commands/set-tree function source
(set-tree tree)
 
-Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.
Community Examples

commands/show-config function source
(show-config)
+Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.

commands/show-config function source
(show-config)
 
-
Community Examples

commands/show-paths function source
(show-paths)
+

commands/show-paths function source
(show-paths)
 
-
Community Examples

commands/show-rule-tree function source
(show-rule-tree &opt root depth)
+

commands/show-rule-tree function source
(show-rule-tree &opt root depth)
 
-
Community Examples

commands/test function source
(test)
+

commands/test function source
(test)
 
-
Community Examples

commands/update-pkgs function source
(update-pkgs)
+

commands/update-pkgs function source
(update-pkgs)
 
-
Community Examples
+
Command Line Interface Config diff --git a/static/1.34.0/api/jpm/config.html b/static/1.34.0/api/jpm/config.html index 4bdddfc9..601d9ec7 100644 --- a/static/1.34.0/api/jpm/config.html +++ b/static/1.34.0/api/jpm/config.html @@ -120,111 +120,111 @@

Config

Index

-

config/builtin-configs config/config-checkers config/config-docs config/config-options config/config-parsers config/config-set config/defconf config/dyn:ar config/dyn:auto-shebang config/dyn:binpath config/dyn:build-type config/dyn:buildpath config/dyn:c++ config/dyn:c++-link config/dyn:cc config/dyn:cc-link config/dyn:cflags config/dyn:cflags-verbose config/dyn:config-file config/dyn:cppflags config/dyn:curlpath config/dyn:dest-dir config/dyn:dynamic-cflags config/dyn:dynamic-lflags config/dyn:gitpath config/dyn:headerpath config/dyn:is-msvc config/dyn:janet config/dyn:janet-cflags config/dyn:janet-importlib config/dyn:janet-lflags config/dyn:ldflags config/dyn:lflags config/dyn:libpath config/dyn:local config/dyn:manpath config/dyn:modext config/dyn:modpath config/dyn:nocolor config/dyn:offline config/dyn:optimize config/dyn:pkglist config/dyn:silent config/dyn:statext config/dyn:tarpath config/dyn:test config/dyn:tree config/dyn:update-pkgs config/dyn:use-batch-shell config/dyn:verbose config/dyn:workers config/load-config config/load-config-file config/load-default config/load-options config/opt config/read-env-variables config/save-config config/shorthand-mapping


config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.
Community Examples

config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).
Community Examples

config/config-docs table source
Table of all of the help text for each config option.
Community Examples

config/config-options table source
A table of possible options for enum option types.
Community Examples

config/config-parsers table source
A table of all of the dynamic config bindings to parsers.
Community Examples

config/config-set table source
Listing of all config dyns.
Community Examples

config/defconf macro source
(defconf kw &opt parser docs options)
+

config/builtin-configs config/config-checkers config/config-docs config/config-options config/config-parsers config/config-set config/defconf config/dyn:ar config/dyn:auto-shebang config/dyn:binpath config/dyn:build-type config/dyn:buildpath config/dyn:c++ config/dyn:c++-link config/dyn:cc config/dyn:cc-link config/dyn:cflags config/dyn:cflags-verbose config/dyn:config-file config/dyn:cppflags config/dyn:curlpath config/dyn:dest-dir config/dyn:dynamic-cflags config/dyn:dynamic-lflags config/dyn:gitpath config/dyn:headerpath config/dyn:is-msvc config/dyn:janet config/dyn:janet-cflags config/dyn:janet-importlib config/dyn:janet-lflags config/dyn:ldflags config/dyn:lflags config/dyn:libpath config/dyn:local config/dyn:manpath config/dyn:modext config/dyn:modpath config/dyn:nocolor config/dyn:offline config/dyn:optimize config/dyn:pkglist config/dyn:silent config/dyn:statext config/dyn:tarpath config/dyn:test config/dyn:tree config/dyn:update-pkgs config/dyn:use-batch-shell config/dyn:verbose config/dyn:workers config/load-config config/load-config-file config/load-default config/load-options config/opt config/read-env-variables config/save-config config/shorthand-mapping


config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.

config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).

config/config-docs table source
Table of all of the help text for each config option.

config/config-options table source
A table of possible options for enum option types.

config/config-parsers table source
A table of all of the dynamic config bindings to parsers.

config/config-set table source
Listing of all config dyns.

config/defconf macro source
(defconf kw &opt parser docs options)
 
-Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.
Community Examples

config/dyn:ar function source
(dyn:ar &opt dflt)
+Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.

config/dyn:ar function source
(dyn:ar &opt dflt)
 
-
Community Examples

config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
+

config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
 
-
Community Examples

config/dyn:binpath function source
(dyn:binpath &opt dflt)
+

config/dyn:binpath function source
(dyn:binpath &opt dflt)
 
-
Community Examples

config/dyn:build-type function source
(dyn:build-type &opt dflt)
+

config/dyn:build-type function source
(dyn:build-type &opt dflt)
 
-
Community Examples

config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
+

config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
 
-
Community Examples

config/dyn:c++ function source
(dyn:c++ &opt dflt)
+

config/dyn:c++ function source
(dyn:c++ &opt dflt)
 
-
Community Examples

config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
+

config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
 
-
Community Examples

config/dyn:cc function source
(dyn:cc &opt dflt)
+

config/dyn:cc function source
(dyn:cc &opt dflt)
 
-
Community Examples

config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
+

config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
 
-
Community Examples

config/dyn:cflags function source
(dyn:cflags &opt dflt)
+

config/dyn:cflags function source
(dyn:cflags &opt dflt)
 
-
Community Examples

config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
+

config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
 
-
Community Examples

config/dyn:config-file function source
(dyn:config-file &opt dflt)
+

config/dyn:config-file function source
(dyn:config-file &opt dflt)
 
-
Community Examples

config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
+

config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
 
-
Community Examples

config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
+

config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
 
-
Community Examples

config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
+

config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
 
-
Community Examples

config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
+

config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
 
-
Community Examples

config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
+

config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
 
-
Community Examples

config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
+

config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
 
-
Community Examples

config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
+

config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
 
-
Community Examples

config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
+

config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
 
-
Community Examples

config/dyn:janet function source
(dyn:janet &opt dflt)
+

config/dyn:janet function source
(dyn:janet &opt dflt)
 
-
Community Examples

config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
+

config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
 
-
Community Examples

config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
+

config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
 
-
Community Examples

config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
+

config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
 
-
Community Examples

config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
+

config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
 
-
Community Examples

config/dyn:lflags function source
(dyn:lflags &opt dflt)
+

config/dyn:lflags function source
(dyn:lflags &opt dflt)
 
-
Community Examples

config/dyn:libpath function source
(dyn:libpath &opt dflt)
+

config/dyn:libpath function source
(dyn:libpath &opt dflt)
 
-
Community Examples

config/dyn:local function source
(dyn:local &opt dflt)
+

config/dyn:local function source
(dyn:local &opt dflt)
 
-
Community Examples

config/dyn:manpath function source
(dyn:manpath &opt dflt)
+

config/dyn:manpath function source
(dyn:manpath &opt dflt)
 
-
Community Examples

config/dyn:modext function source
(dyn:modext &opt dflt)
+

config/dyn:modext function source
(dyn:modext &opt dflt)
 
-
Community Examples

config/dyn:modpath function source
(dyn:modpath &opt dflt)
+

config/dyn:modpath function source
(dyn:modpath &opt dflt)
 
-
Community Examples

config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
+

config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
 
-
Community Examples

config/dyn:offline function source
(dyn:offline &opt dflt)
+

config/dyn:offline function source
(dyn:offline &opt dflt)
 
-
Community Examples

config/dyn:optimize function source
(dyn:optimize &opt dflt)
+

config/dyn:optimize function source
(dyn:optimize &opt dflt)
 
-
Community Examples

config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
+

config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
 
-
Community Examples

config/dyn:silent function source
(dyn:silent &opt dflt)
+

config/dyn:silent function source
(dyn:silent &opt dflt)
 
-
Community Examples

config/dyn:statext function source
(dyn:statext &opt dflt)
+

config/dyn:statext function source
(dyn:statext &opt dflt)
 
-
Community Examples

config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
+

config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
 
-
Community Examples

config/dyn:test function source
(dyn:test &opt dflt)
+

config/dyn:test function source
(dyn:test &opt dflt)
 
-
Community Examples

config/dyn:tree function source
(dyn:tree &opt dflt)
+

config/dyn:tree function source
(dyn:tree &opt dflt)
 
-
Community Examples

config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
+

config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
 
-
Community Examples

config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
+

config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
 
-
Community Examples

config/dyn:verbose function source
(dyn:verbose &opt dflt)
+

config/dyn:verbose function source
(dyn:verbose &opt dflt)
 
-
Community Examples

config/dyn:workers function source
(dyn:workers &opt dflt)
+

config/dyn:workers function source
(dyn:workers &opt dflt)
 
-
Community Examples

config/load-config function source
(load-config settings &opt override)
+

config/load-config function source
(load-config settings &opt override)
 
-Load a configuration from a table or struct.
Community Examples

config/load-config-file function source
(load-config-file path &opt override)
+Load a configuration from a table or struct.

config/load-config-file function source
(load-config-file path &opt override)
 
-Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.
Community Examples

config/load-default function source
(load-default &opt override)
+Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.

config/load-default function source
(load-default &opt override)
 
-Load the default configuration.
Community Examples

config/load-options function source
(load-options &opt path)
+Load the default configuration.

config/load-options function source
(load-options &opt path)
 
-Load a file that contains config options that can be set. If no such file exists, then do nothing.
Community Examples

config/opt function source
(opt opts key &opt dflt)
+Load a file that contains config options that can be set. If no such file exists, then do nothing.

config/opt function source
(opt opts key &opt dflt)
 
-Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.
Community Examples

config/read-env-variables function source
(read-env-variables)
+Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.

config/read-env-variables function source
(read-env-variables)
 
-Read environment variables that correspond to config variables into dyns.
Community Examples

config/save-config function source
(save-config path)
+Read environment variables that correspond to config variables into dyns.

config/save-config function source
(save-config path)
 
-Write the current configuration information to a file.
Community Examples

config/shorthand-mapping struct source
Map some single characters to long options.
Community Examples
+Write the current configuration information to a file.

config/shorthand-mapping struct source
Map some single characters to long options.
Commands Configuration Generation diff --git a/static/1.34.0/api/jpm/dagbuild.html b/static/1.34.0/api/jpm/dagbuild.html index 9a5768b0..9eb6fdf5 100644 --- a/static/1.34.0/api/jpm/dagbuild.html +++ b/static/1.34.0/api/jpm/dagbuild.html @@ -122,9 +122,9 @@

Index

dagbuild/pdag dagbuild/pmap


dagbuild/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.
Community Examples

dagbuild/pmap function source
(pmap f data)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.

dagbuild/pmap function source
(pmap f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Community Examples
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Configuration Generation Project Management diff --git a/static/1.34.0/api/jpm/index.html b/static/1.34.0/api/jpm/index.html index e141917c..a2b456be 100644 --- a/static/1.34.0/api/jpm/index.html +++ b/static/1.34.0/api/jpm/index.html @@ -122,325 +122,325 @@

Index

jpm/cc/archive-c jpm/cc/compile-c jpm/cc/create-buffer-c jpm/cc/create-buffer-c-impl jpm/cc/create-executable jpm/cc/embed-name jpm/cc/entry-name jpm/cc/entry-replace jpm/cc/link-c jpm/cc/make-bin-source jpm/cc/make-define jpm/cc/make-defines jpm/cc/modpath-to-meta jpm/cc/modpath-to-static jpm/cc/out-path jpm/cgen/add-loader jpm/cgen/ir jpm/cgen/mangle jpm/cgen/print-ir jpm/commands/build jpm/commands/clean jpm/commands/configure jpm/commands/deps jpm/commands/enable-local-mode jpm/commands/help jpm/commands/install jpm/commands/jpm-debug-repl jpm/commands/list-installed jpm/commands/list-pkgs jpm/commands/list-rules jpm/commands/list-tasks jpm/commands/new-c-project jpm/commands/new-exe-project jpm/commands/new-project jpm/commands/quickbin jpm/commands/set-tree jpm/commands/show-config jpm/commands/show-paths jpm/commands/show-rule-tree jpm/commands/test jpm/commands/update-pkgs jpm/config/builtin-configs jpm/config/config-checkers jpm/config/config-docs jpm/config/config-options jpm/config/config-parsers jpm/config/config-set jpm/config/defconf jpm/config/dyn:ar jpm/config/dyn:auto-shebang jpm/config/dyn:binpath jpm/config/dyn:build-type jpm/config/dyn:buildpath jpm/config/dyn:c++ jpm/config/dyn:c++-link jpm/config/dyn:cc jpm/config/dyn:cc-link jpm/config/dyn:cflags jpm/config/dyn:cflags-verbose jpm/config/dyn:config-file jpm/config/dyn:cppflags jpm/config/dyn:curlpath jpm/config/dyn:dest-dir jpm/config/dyn:dynamic-cflags jpm/config/dyn:dynamic-lflags jpm/config/dyn:gitpath jpm/config/dyn:headerpath jpm/config/dyn:is-msvc jpm/config/dyn:janet jpm/config/dyn:janet-cflags jpm/config/dyn:janet-importlib jpm/config/dyn:janet-lflags jpm/config/dyn:ldflags jpm/config/dyn:lflags jpm/config/dyn:libpath jpm/config/dyn:local jpm/config/dyn:manpath jpm/config/dyn:modext jpm/config/dyn:modpath jpm/config/dyn:nocolor jpm/config/dyn:offline jpm/config/dyn:optimize jpm/config/dyn:pkglist jpm/config/dyn:silent jpm/config/dyn:statext jpm/config/dyn:tarpath jpm/config/dyn:test jpm/config/dyn:tree jpm/config/dyn:update-pkgs jpm/config/dyn:use-batch-shell jpm/config/dyn:verbose jpm/config/dyn:workers jpm/config/load-config jpm/config/load-config-file jpm/config/load-default jpm/config/load-options jpm/config/opt jpm/config/read-env-variables jpm/config/save-config jpm/config/shorthand-mapping jpm/dagbuild/pdag jpm/dagbuild/pmap jpm/make-config/auto jpm/make-config/generate-config jpm/pm/bundle-install jpm/pm/curl jpm/pm/do-rule jpm/pm/download-bundle jpm/pm/download-git-bundle jpm/pm/download-tar-bundle jpm/pm/git jpm/pm/import-rules jpm/pm/is-bundle-installed jpm/pm/load-lockfile jpm/pm/load-project-meta jpm/pm/make-jpm-env jpm/pm/make-lockfile jpm/pm/out-of-tree-config jpm/pm/post-deps jpm/pm/require-jpm jpm/pm/resolve-bundle jpm/pm/tar jpm/pm/update-git-bundle jpm/pm/update-installed jpm/rules/add-body jpm/rules/add-dep jpm/rules/add-input jpm/rules/add-output jpm/rules/add-thunk jpm/rules/build-rules jpm/rules/getrules jpm/rules/phony jpm/rules/rule jpm/rules/sh-phony jpm/rules/sh-rule jpm/rules/sh-task jpm/rules/task jpm/scaffold/scaffold-project jpm/shutil/abspath jpm/shutil/basename jpm/shutil/clear-cache jpm/shutil/clear-manifest jpm/shutil/clexe-shell jpm/shutil/color jpm/shutil/copy jpm/shutil/copyfile jpm/shutil/create-dirs jpm/shutil/devnull jpm/shutil/dirname jpm/shutil/do-monkeypatch jpm/shutil/drop1-shell jpm/shutil/exec-slurp jpm/shutil/filepath-replace jpm/shutil/find-build-dir jpm/shutil/find-cache jpm/shutil/find-manifest jpm/shutil/find-manifest-dir jpm/shutil/is-mingw jpm/shutil/is-win jpm/shutil/is-win-or-mingw jpm/shutil/path-splitter jpm/shutil/rimraf jpm/shutil/rm jpm/shutil/run-patched jpm/shutil/run-repl jpm/shutil/run-script jpm/shutil/shell jpm/shutil/undo-monkeypatch


jpm/cc/archive-c function source
(archive-c opts target & objects)
 
-Link object files together to make a static library.
Community Examples

jpm/cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
+Link object files together to make a static library.

jpm/cc/compile-c function source
(compile-c compiler opts src dest &opt static?)
 
-Compile a C file into an object file.
Community Examples

jpm/cc/create-buffer-c function source
(create-buffer-c source dest name)
+Compile a C file into an object file.

jpm/cc/create-buffer-c function source
(create-buffer-c source dest name)
 
-Inline raw byte file as a c file.
Community Examples

jpm/cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
+Inline raw byte file as a c file.

jpm/cc/create-buffer-c-impl function source
(create-buffer-c-impl bytes dest name)
 
-
Community Examples

jpm/cc/create-executable function source
(create-executable opts source dest no-core)
+

jpm/cc/create-executable function source
(create-executable opts source dest no-core)
 
-Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.
Community Examples

jpm/cc/embed-name function source
(embed-name path)
+Links an image with libjanet.a (or .lib) to produce an executable. Also will try to link native modules into the final executable as well.

jpm/cc/embed-name function source
(embed-name path)
 
-Rename a janet symbol for embedding.
Community Examples

jpm/cc/entry-name function source
(entry-name name)
+Rename a janet symbol for embedding.

jpm/cc/entry-name function source
(entry-name name)
 
-Name of symbol that enters static compilation of a module.
Community Examples

jpm/cc/entry-replace function source
(entry-replace name)
+Name of symbol that enters static compilation of a module.

jpm/cc/entry-replace function source
(entry-replace name)
 
-Escape special characters in the entry-name
Community Examples

jpm/cc/link-c function source
(link-c has-cpp opts target & objects)
+Escape special characters in the entry-name

jpm/cc/link-c function source
(link-c has-cpp opts target & objects)
 
-Link C or C++ object files together to make a native module.
Community Examples

jpm/cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
+Link C or C++ object files together to make a native module.

jpm/cc/make-bin-source function source
(make-bin-source declarations lookup-into-invocations no-core)
 
-
Community Examples

jpm/cc/make-define function source
(make-define define value)
+

jpm/cc/make-define function source
(make-define define value)
 
-Generate strings for adding custom defines to the compiler.
Community Examples

jpm/cc/make-defines function source
(make-defines defines)
+Generate strings for adding custom defines to the compiler.

jpm/cc/make-defines function source
(make-defines defines)
 
-Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.
Community Examples

jpm/cc/modpath-to-meta function source
(modpath-to-meta path)
+Generate many defines. Takes a dictionary of defines. If a value is true, generates -DNAME (/DNAME on windows), otherwise -DNAME=value.

jpm/cc/modpath-to-meta function source
(modpath-to-meta path)
 
-Get the meta file path (.meta.janet) corresponding to a native module path (.so).
Community Examples

jpm/cc/modpath-to-static function source
(modpath-to-static path)
+Get the meta file path (.meta.janet) corresponding to a native module path (.so).

jpm/cc/modpath-to-static function source
(modpath-to-static path)
 
-Get the static library (.a) path corresponding to a native module path (.so).
Community Examples

jpm/cc/out-path function source
(out-path path from-ext to-ext)
+Get the static library (.a) path corresponding to a native module path (.so).

jpm/cc/out-path function source
(out-path path from-ext to-ext)
 
-Take a source file path and convert it to an output path.
Community Examples

jpm/cgen/add-loader function source
(add-loader)
+Take a source file path and convert it to an output path.

jpm/cgen/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

jpm/cgen/ir macro source
(ir & body)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

jpm/cgen/ir macro source
(ir & body)
 
-Macro that automatically quotes the body provided and calls (print-ir ...) on the body.
Community Examples

jpm/cgen/mangle function source
(mangle token)
+Macro that automatically quotes the body provided and calls (print-ir ...) on the body.

jpm/cgen/mangle function source
(mangle token)
 
-Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.
Community Examples

jpm/cgen/print-ir function source
(print-ir ir)
+Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. `print-ir` will not mangle symbols for you.

jpm/cgen/print-ir function source
(print-ir ir)
 
-Compile the CGEN IR to C and print it to (dyn :out).
Community Examples

jpm/commands/build function source
(build)
+Compile the CGEN IR to C and print it to (dyn :out).

jpm/commands/build function source
(build)
 
-
Community Examples

jpm/commands/clean function source
(clean)
+

jpm/commands/clean function source
(clean)
 
-
Community Examples

jpm/commands/configure function source
(configure &opt path)
+

jpm/commands/configure function source
(configure &opt path)
 
-Setup an out-of-tree build with certain configuration options.
Community Examples

jpm/commands/deps function source
(deps)
+Setup an out-of-tree build with certain configuration options.

jpm/commands/deps function source
(deps)
 
-
Community Examples

jpm/commands/enable-local-mode function source
(enable-local-mode)
+

jpm/commands/enable-local-mode function source
(enable-local-mode)
 
-Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/
Community Examples

jpm/commands/help function source
(help)
+Modify the config to enable local development. Creates a local tree if one does not exist in ./jpm_tree/

jpm/commands/help function source
(help)
 
-
Community Examples

jpm/commands/install function source
(install & repo)
+

jpm/commands/install function source
(install & repo)
 
-
Community Examples

jpm/commands/jpm-debug-repl function source
(jpm-debug-repl)
+

jpm/commands/jpm-debug-repl function source
(jpm-debug-repl)
 
-
Community Examples

jpm/commands/list-installed function source
(list-installed)
+

jpm/commands/list-installed function source
(list-installed)
 
-
Community Examples

jpm/commands/list-pkgs function source
(list-pkgs &opt search)
+

jpm/commands/list-pkgs function source
(list-pkgs &opt search)
 
-
Community Examples

jpm/commands/list-rules function source
(list-rules &opt ctx)
+

jpm/commands/list-rules function source
(list-rules &opt ctx)
 
-
Community Examples

jpm/commands/list-tasks function source
(list-tasks &opt ctx)
+

jpm/commands/list-tasks function source
(list-tasks &opt ctx)
 
-
Community Examples

jpm/commands/new-c-project function source
(new-c-project name)
+

jpm/commands/new-c-project function source
(new-c-project name)
 
-Create a new C project
Community Examples

jpm/commands/new-exe-project function source
(new-exe-project name)
+Create a new C project

jpm/commands/new-exe-project function source
(new-exe-project name)
 
-Create a new executable project
Community Examples

jpm/commands/new-project function source
(new-project name)
+Create a new executable project

jpm/commands/new-project function source
(new-project name)
 
-Create a new project
Community Examples

jpm/commands/quickbin function source
(quickbin input output)
+Create a new project

jpm/commands/quickbin function source
(quickbin input output)
 
-
Community Examples

jpm/commands/set-tree function source
(set-tree tree)
+

jpm/commands/set-tree function source
(set-tree tree)
 
-Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.
Community Examples

jpm/commands/show-config function source
(show-config)
+Set the module tree for installing dependencies. This just sets the modpath binpath and manpath. Also creates the tree if it doesn't exist. However, still uses the system libraries and headers for janet.

jpm/commands/show-config function source
(show-config)
 
-
Community Examples

jpm/commands/show-paths function source
(show-paths)
+

jpm/commands/show-paths function source
(show-paths)
 
-
Community Examples

jpm/commands/show-rule-tree function source
(show-rule-tree &opt root depth)
+

jpm/commands/show-rule-tree function source
(show-rule-tree &opt root depth)
 
-
Community Examples

jpm/commands/test function source
(test)
+

jpm/commands/test function source
(test)
 
-
Community Examples

jpm/commands/update-pkgs function source
(update-pkgs)
+

jpm/commands/update-pkgs function source
(update-pkgs)
 
-
Community Examples

jpm/config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.
Community Examples

jpm/config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).
Community Examples

jpm/config/config-docs table source
Table of all of the help text for each config option.
Community Examples

jpm/config/config-options table source
A table of possible options for enum option types.
Community Examples

jpm/config/config-parsers table source
A table of all of the dynamic config bindings to parsers.
Community Examples

jpm/config/config-set table source
Listing of all config dyns.
Community Examples

jpm/config/defconf macro source
(defconf kw &opt parser docs options)
+

jpm/config/builtin-configs table source
Table of all built-in options, as opposed to project deifned options.

jpm/config/config-checkers table source
A table of all of the dynamic config bindings to checkers (validators).

jpm/config/config-docs table source
Table of all of the help text for each config option.

jpm/config/config-options table source
A table of possible options for enum option types.

jpm/config/config-parsers table source
A table of all of the dynamic config bindings to parsers.

jpm/config/config-set table source
Listing of all config dyns.

jpm/config/defconf macro source
(defconf kw &opt parser docs options)
 
-Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.
Community Examples

jpm/config/dyn:ar function source
(dyn:ar &opt dflt)
+Define a function that wraps (dyn :keyword). This will allow use of dynamic bindings with static runtime checks.

jpm/config/dyn:ar function source
(dyn:ar &opt dflt)
 
-
Community Examples

jpm/config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
+

jpm/config/dyn:auto-shebang function source
(dyn:auto-shebang &opt dflt)
 
-
Community Examples

jpm/config/dyn:binpath function source
(dyn:binpath &opt dflt)
+

jpm/config/dyn:binpath function source
(dyn:binpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:build-type function source
(dyn:build-type &opt dflt)
+

jpm/config/dyn:build-type function source
(dyn:build-type &opt dflt)
 
-
Community Examples

jpm/config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
+

jpm/config/dyn:buildpath function source
(dyn:buildpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:c++ function source
(dyn:c++ &opt dflt)
+

jpm/config/dyn:c++ function source
(dyn:c++ &opt dflt)
 
-
Community Examples

jpm/config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
+

jpm/config/dyn:c++-link function source
(dyn:c++-link &opt dflt)
 
-
Community Examples

jpm/config/dyn:cc function source
(dyn:cc &opt dflt)
+

jpm/config/dyn:cc function source
(dyn:cc &opt dflt)
 
-
Community Examples

jpm/config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
+

jpm/config/dyn:cc-link function source
(dyn:cc-link &opt dflt)
 
-
Community Examples

jpm/config/dyn:cflags function source
(dyn:cflags &opt dflt)
+

jpm/config/dyn:cflags function source
(dyn:cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
+

jpm/config/dyn:cflags-verbose function source
(dyn:cflags-verbose &opt dflt)
 
-
Community Examples

jpm/config/dyn:config-file function source
(dyn:config-file &opt dflt)
+

jpm/config/dyn:config-file function source
(dyn:config-file &opt dflt)
 
-
Community Examples

jpm/config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
+

jpm/config/dyn:cppflags function source
(dyn:cppflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
+

jpm/config/dyn:curlpath function source
(dyn:curlpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
+

jpm/config/dyn:dest-dir function source
(dyn:dest-dir &opt dflt)
 
-
Community Examples

jpm/config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
+

jpm/config/dyn:dynamic-cflags function source
(dyn:dynamic-cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
+

jpm/config/dyn:dynamic-lflags function source
(dyn:dynamic-lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
+

jpm/config/dyn:gitpath function source
(dyn:gitpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
+

jpm/config/dyn:headerpath function source
(dyn:headerpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
+

jpm/config/dyn:is-msvc function source
(dyn:is-msvc &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet function source
(dyn:janet &opt dflt)
+

jpm/config/dyn:janet function source
(dyn:janet &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
+

jpm/config/dyn:janet-cflags function source
(dyn:janet-cflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
+

jpm/config/dyn:janet-importlib function source
(dyn:janet-importlib &opt dflt)
 
-
Community Examples

jpm/config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
+

jpm/config/dyn:janet-lflags function source
(dyn:janet-lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
+

jpm/config/dyn:ldflags function source
(dyn:ldflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:lflags function source
(dyn:lflags &opt dflt)
+

jpm/config/dyn:lflags function source
(dyn:lflags &opt dflt)
 
-
Community Examples

jpm/config/dyn:libpath function source
(dyn:libpath &opt dflt)
+

jpm/config/dyn:libpath function source
(dyn:libpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:local function source
(dyn:local &opt dflt)
+

jpm/config/dyn:local function source
(dyn:local &opt dflt)
 
-
Community Examples

jpm/config/dyn:manpath function source
(dyn:manpath &opt dflt)
+

jpm/config/dyn:manpath function source
(dyn:manpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:modext function source
(dyn:modext &opt dflt)
+

jpm/config/dyn:modext function source
(dyn:modext &opt dflt)
 
-
Community Examples

jpm/config/dyn:modpath function source
(dyn:modpath &opt dflt)
+

jpm/config/dyn:modpath function source
(dyn:modpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
+

jpm/config/dyn:nocolor function source
(dyn:nocolor &opt dflt)
 
-
Community Examples

jpm/config/dyn:offline function source
(dyn:offline &opt dflt)
+

jpm/config/dyn:offline function source
(dyn:offline &opt dflt)
 
-
Community Examples

jpm/config/dyn:optimize function source
(dyn:optimize &opt dflt)
+

jpm/config/dyn:optimize function source
(dyn:optimize &opt dflt)
 
-
Community Examples

jpm/config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
+

jpm/config/dyn:pkglist function source
(dyn:pkglist &opt dflt)
 
-
Community Examples

jpm/config/dyn:silent function source
(dyn:silent &opt dflt)
+

jpm/config/dyn:silent function source
(dyn:silent &opt dflt)
 
-
Community Examples

jpm/config/dyn:statext function source
(dyn:statext &opt dflt)
+

jpm/config/dyn:statext function source
(dyn:statext &opt dflt)
 
-
Community Examples

jpm/config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
+

jpm/config/dyn:tarpath function source
(dyn:tarpath &opt dflt)
 
-
Community Examples

jpm/config/dyn:test function source
(dyn:test &opt dflt)
+

jpm/config/dyn:test function source
(dyn:test &opt dflt)
 
-
Community Examples

jpm/config/dyn:tree function source
(dyn:tree &opt dflt)
+

jpm/config/dyn:tree function source
(dyn:tree &opt dflt)
 
-
Community Examples

jpm/config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
+

jpm/config/dyn:update-pkgs function source
(dyn:update-pkgs &opt dflt)
 
-
Community Examples

jpm/config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
+

jpm/config/dyn:use-batch-shell function source
(dyn:use-batch-shell &opt dflt)
 
-
Community Examples

jpm/config/dyn:verbose function source
(dyn:verbose &opt dflt)
+

jpm/config/dyn:verbose function source
(dyn:verbose &opt dflt)
 
-
Community Examples

jpm/config/dyn:workers function source
(dyn:workers &opt dflt)
+

jpm/config/dyn:workers function source
(dyn:workers &opt dflt)
 
-
Community Examples

jpm/config/load-config function source
(load-config settings &opt override)
+

jpm/config/load-config function source
(load-config settings &opt override)
 
-Load a configuration from a table or struct.
Community Examples

jpm/config/load-config-file function source
(load-config-file path &opt override)
+Load a configuration from a table or struct.

jpm/config/load-config-file function source
(load-config-file path &opt override)
 
-Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.
Community Examples

jpm/config/load-default function source
(load-default &opt override)
+Load a configuration from a file. If override is set, will override already set values. Otherwise will prefer the current value over the settings from the config file.

jpm/config/load-default function source
(load-default &opt override)
 
-Load the default configuration.
Community Examples

jpm/config/load-options function source
(load-options &opt path)
+Load the default configuration.

jpm/config/load-options function source
(load-options &opt path)
 
-Load a file that contains config options that can be set. If no such file exists, then do nothing.
Community Examples

jpm/config/opt function source
(opt opts key &opt dflt)
+Load a file that contains config options that can be set. If no such file exists, then do nothing.

jpm/config/opt function source
(opt opts key &opt dflt)
 
-Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.
Community Examples

jpm/config/read-env-variables function source
(read-env-variables)
+Get an option, allowing overrides via dynamic bindings AND some default value dflt if no dynamic binding is set.

jpm/config/read-env-variables function source
(read-env-variables)
 
-Read environment variables that correspond to config variables into dyns.
Community Examples

jpm/config/save-config function source
(save-config path)
+Read environment variables that correspond to config variables into dyns.

jpm/config/save-config function source
(save-config path)
 
-Write the current configuration information to a file.
Community Examples

jpm/config/shorthand-mapping struct source
Map some single characters to long options.
Community Examples

jpm/dagbuild/pdag function source
(pdag f dag &opt n-workers)
+Write the current configuration information to a file.

jpm/config/shorthand-mapping struct source
Map some single characters to long options.

jpm/dagbuild/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.
Community Examples

jpm/dagbuild/pmap function source
(pmap f data)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Returns a table mapping each node to the result of `(f node)`.

jpm/dagbuild/pmap function source
(pmap f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.
Community Examples

jpm/make-config/auto function source
(auto)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array.

jpm/make-config/auto function source
(auto)
 
-Get an autodetected config.
Community Examples

jpm/make-config/generate-config function source
(generate-config &opt destdir silent as-data)
+Get an autodetected config.

jpm/make-config/generate-config function source
(generate-config &opt destdir silent as-data)
 
-Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Community Examples

jpm/pm/bundle-install function source
(bundle-install bundle &opt no-deps force-update)
+Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.

jpm/pm/bundle-install function source
(bundle-install bundle &opt no-deps force-update)
 
-Install a bundle from a git repository.
Community Examples

jpm/pm/curl function source
(curl & args)
+Install a bundle from a git repository.

jpm/pm/curl function source
(curl & args)
 
-Make a call to curl
Community Examples

jpm/pm/do-rule function source
(do-rule target)
+Make a call to curl

jpm/pm/do-rule function source
(do-rule target)
 
-Evaluate a given rule in a one-off manner.
Community Examples

jpm/pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
+Evaluate a given rule in a one-off manner.

jpm/pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
 
-Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.
Community Examples

jpm/pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
+Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.

jpm/pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
 
-Download a git bundle from a remote respository
Community Examples

jpm/pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
+Download a git bundle from a remote respository

jpm/pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
 
-Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.
Community Examples

jpm/pm/git function source
(git & args)
+Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.

jpm/pm/git function source
(git & args)
 
-Make a call to git.
Community Examples

jpm/pm/import-rules function source
(import-rules path &opt base-env)
+Make a call to git.

jpm/pm/import-rules function source
(import-rules path &opt base-env)
 
-Import another file that defines more rules. This ruleset is merged into the current ruleset.
Community Examples

jpm/pm/is-bundle-installed function source
(is-bundle-installed bundle)
+Import another file that defines more rules. This ruleset is merged into the current ruleset.

jpm/pm/is-bundle-installed function source
(is-bundle-installed bundle)
 
-Determines if a bundle has been installed or not
Community Examples

jpm/pm/load-lockfile function source
(load-lockfile &opt filename)
+Determines if a bundle has been installed or not

jpm/pm/load-lockfile function source
(load-lockfile &opt filename)
 
-Load packages from a lockfile.
Community Examples

jpm/pm/load-project-meta function source
(load-project-meta &opt path)
+Load packages from a lockfile.

jpm/pm/load-project-meta function source
(load-project-meta &opt path)
 
-Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.
Community Examples

jpm/pm/make-jpm-env function source
(make-jpm-env &opt base-env)
+Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.

jpm/pm/make-jpm-env function source
(make-jpm-env &opt base-env)
 
-Create an environment that is preloaded with jpm symbols.
Community Examples

jpm/pm/make-lockfile function source
(make-lockfile &opt filename)
+Create an environment that is preloaded with jpm symbols.

jpm/pm/make-lockfile function source
(make-lockfile &opt filename)
 
-
Community Examples

jpm/pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
+

jpm/pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
 
-Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.
Community Examples

jpm/pm/post-deps macro source
(post-deps & body)
+Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.

jpm/pm/post-deps macro source
(post-deps & body)
 
-Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.
Community Examples

jpm/pm/require-jpm function source
(require-jpm path &opt base-env)
+Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.

jpm/pm/require-jpm function source
(require-jpm path &opt base-env)
 
-Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.
Community Examples

jpm/pm/resolve-bundle function source
(resolve-bundle bundle)
+Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.

jpm/pm/resolve-bundle function source
(resolve-bundle bundle)
 
-Convert any bundle string/table to the normalized table form.
Community Examples

jpm/pm/tar function source
(tar & args)
+Convert any bundle string/table to the normalized table form.

jpm/pm/tar function source
(tar & args)
 
-Make a call to tar.
Community Examples

jpm/pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
+Make a call to tar.

jpm/pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
 
-Fetch latest tag version from remote repository
Community Examples

jpm/pm/update-installed function source
(update-installed)
+Fetch latest tag version from remote repository

jpm/pm/update-installed function source
(update-installed)
 
-Update all previously installed packages to their latest versions.
Community Examples

jpm/rules/add-body macro source
(add-body target & body)
+Update all previously installed packages to their latest versions.

jpm/rules/add-body macro source
(add-body target & body)
 
-Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.
Community Examples

jpm/rules/add-dep function source
(add-dep target dep)
+Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.

jpm/rules/add-dep function source
(add-dep target dep)
 
-Alias for `add-input`
Community Examples

jpm/rules/add-input function source
(add-input target input)
+Alias for `add-input`

jpm/rules/add-input function source
(add-input target input)
 
-Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.
Community Examples

jpm/rules/add-output function source
(add-output target output)
+Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.

jpm/rules/add-output function source
(add-output target output)
 
-Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.
Community Examples

jpm/rules/add-thunk function source
(add-thunk target thunk)
+Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.

jpm/rules/add-thunk function source
(add-thunk target thunk)
 
-Append a thunk to a target's recipe.
Community Examples

jpm/rules/build-rules function source
(build-rules rules targets &opt n-workers)
+Append a thunk to a target's recipe.

jpm/rules/build-rules function source
(build-rules rules targets &opt n-workers)
 
-Given a graph of all rules, extract a work graph that will build out-of-date files.
Community Examples

jpm/rules/getrules function source
(getrules)
+Given a graph of all rules, extract a work graph that will build out-of-date files.

jpm/rules/getrules function source
(getrules)
 
-
Community Examples

jpm/rules/phony macro source
(phony target deps & body)
+

jpm/rules/phony macro source
(phony target deps & body)
 
-Alias for `task`.
Community Examples

jpm/rules/rule macro source
(rule target deps & body)
+Alias for `task`.

jpm/rules/rule macro source
(rule target deps & body)
 
-Add a rule to the rule graph.
Community Examples

jpm/rules/sh-phony macro source
(sh-phony target deps & body)
+Add a rule to the rule graph.

jpm/rules/sh-phony macro source
(sh-phony target deps & body)
 
-Alias for `sh-task`.
Community Examples

jpm/rules/sh-rule macro source
(sh-rule target deps & body)
+Alias for `sh-task`.

jpm/rules/sh-rule macro source
(sh-rule target deps & body)
 
-Add a rule that invokes a shell command, and fails if the command returns non-zero.
Community Examples

jpm/rules/sh-task macro source
(sh-task target deps & body)
+Add a rule that invokes a shell command, and fails if the command returns non-zero.

jpm/rules/sh-task macro source
(sh-task target deps & body)
 
-Add a task that invokes a shell command, and fails if the command returns non-zero.
Community Examples

jpm/rules/task macro source
(task target deps & body)
+Add a task that invokes a shell command, and fails if the command returns non-zero.

jpm/rules/task macro source
(task target deps & body)
 
-Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
Community Examples

jpm/scaffold/scaffold-project function source
(scaffold-project name &opt options)
+Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).

jpm/scaffold/scaffold-project function source
(scaffold-project name &opt options)
 
-Generate a standardized project scaffold.
Community Examples

jpm/shutil/abspath function source
(abspath path)
+Generate a standardized project scaffold.

jpm/shutil/abspath function source
(abspath path)
 
-Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).
Community Examples

jpm/shutil/basename function source
(basename path)
+Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).

jpm/shutil/basename function source
(basename path)
 
-Get the filename of a path without any leading directory components.
Community Examples

jpm/shutil/clear-cache function source
(clear-cache)
+Get the filename of a path without any leading directory components.

jpm/shutil/clear-cache function source
(clear-cache)
 
-Clear the global git cache.
Community Examples

jpm/shutil/clear-manifest function source
(clear-manifest)
+Clear the global git cache.

jpm/shutil/clear-manifest function source
(clear-manifest)
 
-Clear the global installation manifest.
Community Examples

jpm/shutil/clexe-shell function source
(clexe-shell & args)
+Clear the global installation manifest.

jpm/shutil/clexe-shell function source
(clexe-shell & args)
 
-
Community Examples

jpm/shutil/color function source
(color input-color text)
+

jpm/shutil/color function source
(color input-color text)
 
-Color text with ascii escape sequences if (os/isatty)
Community Examples

jpm/shutil/copy function source
(copy src dest)
+Color text with ascii escape sequences if (os/isatty)

jpm/shutil/copy function source
(copy src dest)
 
-Copy a file or directory recursively from one location to another.
Community Examples

jpm/shutil/copyfile function source
(copyfile src dest)
+Copy a file or directory recursively from one location to another.

jpm/shutil/copyfile function source
(copyfile src dest)
 
-Copy a file one location to another.
Community Examples

jpm/shutil/create-dirs function source
(create-dirs dest)
+Copy a file one location to another.

jpm/shutil/create-dirs function source
(create-dirs dest)
 
-Create all directories needed for a file (mkdir -p).
Community Examples

jpm/shutil/devnull function source
(devnull)
+Create all directories needed for a file (mkdir -p).

jpm/shutil/devnull function source
(devnull)
 
-
Community Examples

jpm/shutil/dirname function source
(dirname path)
+

jpm/shutil/dirname function source
(dirname path)
 
-Get the directory of a file without the filename.
Community Examples

jpm/shutil/do-monkeypatch function source
(do-monkeypatch build-dir)
+Get the directory of a file without the filename.

jpm/shutil/do-monkeypatch function source
(do-monkeypatch build-dir)
 
-Modify the existing environment to have the same paths as the test environment.
Community Examples

jpm/shutil/drop1-shell function source
(drop1-shell std args)
+Modify the existing environment to have the same paths as the test environment.

jpm/shutil/drop1-shell function source
(drop1-shell std args)
 
-Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.
Community Examples

jpm/shutil/exec-slurp function source
(exec-slurp & args)
+Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.

jpm/shutil/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

jpm/shutil/filepath-replace function source
(filepath-replace repo)
+Read stdout of subprocess and return it trimmed in a string.

jpm/shutil/filepath-replace function source
(filepath-replace repo)
 
-Remove special characters from a string or path to make it into a path segment.
Community Examples

jpm/shutil/find-build-dir function source
(find-build-dir)
+Remove special characters from a string or path to make it into a path segment.

jpm/shutil/find-build-dir function source
(find-build-dir)
 
-Gets the build directory to output files to.
Community Examples

jpm/shutil/find-cache function source
(find-cache)
+Gets the build directory to output files to.

jpm/shutil/find-cache function source
(find-cache)
 
-Return the path to the global cache.
Community Examples

jpm/shutil/find-manifest function source
(find-manifest name)
+Return the path to the global cache.

jpm/shutil/find-manifest function source
(find-manifest name)
 
-Get the full path of a manifest file given a package name.
Community Examples

jpm/shutil/find-manifest-dir function source
(find-manifest-dir)
+Get the full path of a manifest file given a package name.

jpm/shutil/find-manifest-dir function source
(find-manifest-dir)
 
-Get the path to the directory containing manifests for installed packages.
Community Examples

jpm/shutil/is-mingw function source
(is-mingw)
+Get the path to the directory containing manifests for installed packages.

jpm/shutil/is-mingw function source
(is-mingw)
 
-Check if built with mingw
Community Examples

jpm/shutil/is-win function source
(is-win)
+Check if built with mingw

jpm/shutil/is-win function source
(is-win)
 
-Check if we should assume a DOS-like shell or default to posix shell.
Community Examples

jpm/shutil/is-win-or-mingw function source
(is-win-or-mingw)
+Check if we should assume a DOS-like shell or default to posix shell.

jpm/shutil/is-win-or-mingw function source
(is-win-or-mingw)
 
-Check if built with mingw
Community Examples

jpm/shutil/path-splitter core/peg source
split paths on / and \.
Community Examples

jpm/shutil/rimraf function source
(rimraf path)
+Check if built with mingw

jpm/shutil/path-splitter core/peg source
split paths on / and \.

jpm/shutil/rimraf function source
(rimraf path)
 
-Hard delete directory tree
Community Examples

jpm/shutil/rm function source
(rm path)
+Hard delete directory tree

jpm/shutil/rm function source
(rm path)
 
-Remove a directory and all sub directories.
Community Examples

jpm/shutil/run-patched function source
(run-patched & extra-args)
+Remove a directory and all sub directories.

jpm/shutil/run-patched function source
(run-patched & extra-args)
 
-Run a subprocess Janet repl that has the same environment as the test environment.
Community Examples

jpm/shutil/run-repl function source
(run-repl)
+Run a subprocess Janet repl that has the same environment as the test environment.

jpm/shutil/run-repl function source
(run-repl)
 
-Run a repl in the monkey patched test environment
Community Examples

jpm/shutil/run-script function source
(run-script path)
+Run a repl in the monkey patched test environment

jpm/shutil/run-script function source
(run-script path)
 
-Run a local script in the monkey patched environment.
Community Examples

jpm/shutil/shell function source
(shell & args)
+Run a local script in the monkey patched environment.

jpm/shutil/shell function source
(shell & args)
 
-Do a shell command
Community Examples

jpm/shutil/undo-monkeypatch function source
(undo-monkeypatch old-builddir)
+Do a shell command

jpm/shutil/undo-monkeypatch function source
(undo-monkeypatch old-builddir)
 
-
Community Examples
+
Integer Types Module Build Rules diff --git a/static/1.34.0/api/jpm/make-config.html b/static/1.34.0/api/jpm/make-config.html index 88361b8d..b139e0dc 100644 --- a/static/1.34.0/api/jpm/make-config.html +++ b/static/1.34.0/api/jpm/make-config.html @@ -122,9 +122,9 @@

Index

make-config/auto make-config/generate-config


make-config/auto function source
(auto)
 
-Get an autodetected config.
Community Examples

make-config/generate-config function source
(generate-config &opt destdir silent as-data)
+Get an autodetected config.

make-config/generate-config function source
(generate-config &opt destdir silent as-data)
 
-Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Community Examples
+Make a pretty good configuration file for the current target. Returns a buffer with config source contents. If `destdir` is given, will generate the folders needed to create a jpm tree.
Config DAG Build diff --git a/static/1.34.0/api/jpm/pm.html b/static/1.34.0/api/jpm/pm.html index 6d71853c..47cc2f33 100644 --- a/static/1.34.0/api/jpm/pm.html +++ b/static/1.34.0/api/jpm/pm.html @@ -122,45 +122,45 @@

Index

pm/bundle-install pm/curl pm/do-rule pm/download-bundle pm/download-git-bundle pm/download-tar-bundle pm/git pm/import-rules pm/is-bundle-installed pm/load-lockfile pm/load-project-meta pm/make-jpm-env pm/make-lockfile pm/out-of-tree-config pm/post-deps pm/require-jpm pm/resolve-bundle pm/tar pm/update-git-bundle pm/update-installed


pm/bundle-install function source
(bundle-install bundle &opt no-deps force-update)
 
-Install a bundle from a git repository.
Community Examples

pm/curl function source
(curl & args)
+Install a bundle from a git repository.

pm/curl function source
(curl & args)
 
-Make a call to curl
Community Examples

pm/do-rule function source
(do-rule target)
+Make a call to curl

pm/do-rule function source
(do-rule target)
 
-Evaluate a given rule in a one-off manner.
Community Examples

pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
+Evaluate a given rule in a one-off manner.

pm/download-bundle function source
(download-bundle url bundle-type &opt tag shallow)
 
-Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.
Community Examples

pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
+Download the package source (using git) to the local cache. Return the path to the downloaded or cached soure code.

pm/download-git-bundle function source
(download-git-bundle bundle-dir url tag shallow)
 
-Download a git bundle from a remote respository
Community Examples

pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
+Download a git bundle from a remote respository

pm/download-tar-bundle function source
(download-tar-bundle bundle-dir url &opt force-gz)
 
-Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.
Community Examples

pm/git function source
(git & args)
+Download a dependency from a tape archive. The archive should have exactly one top level directory that contains the contents of the project.

pm/git function source
(git & args)
 
-Make a call to git.
Community Examples

pm/import-rules function source
(import-rules path &opt base-env)
+Make a call to git.

pm/import-rules function source
(import-rules path &opt base-env)
 
-Import another file that defines more rules. This ruleset is merged into the current ruleset.
Community Examples

pm/is-bundle-installed function source
(is-bundle-installed bundle)
+Import another file that defines more rules. This ruleset is merged into the current ruleset.

pm/is-bundle-installed function source
(is-bundle-installed bundle)
 
-Determines if a bundle has been installed or not
Community Examples

pm/load-lockfile function source
(load-lockfile &opt filename)
+Determines if a bundle has been installed or not

pm/load-lockfile function source
(load-lockfile &opt filename)
 
-Load packages from a lockfile.
Community Examples

pm/load-project-meta function source
(load-project-meta &opt path)
+Load packages from a lockfile.

pm/load-project-meta function source
(load-project-meta &opt path)
 
-Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.
Community Examples

pm/make-jpm-env function source
(make-jpm-env &opt base-env)
+Load the metadata from a project.janet file without doing a full evaluation of the project.janet file. Returns a struct with the project metadata. Raises an error if no metadata found.

pm/make-jpm-env function source
(make-jpm-env &opt base-env)
 
-Create an environment that is preloaded with jpm symbols.
Community Examples

pm/make-lockfile function source
(make-lockfile &opt filename)
+Create an environment that is preloaded with jpm symbols.

pm/make-lockfile function source
(make-lockfile &opt filename)
 
-
Community Examples

pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
+

pm/out-of-tree-config function source
(out-of-tree-config path &opt options)
 
-Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.
Community Examples

pm/post-deps macro source
(post-deps & body)
+Create an out of tree build configuration. This lets a user have a debug or release build, as well as other configuration on a one time basis. This works by creating a new directory with a project.janet that loads in the original project.janet file with some settings changed.

pm/post-deps macro source
(post-deps & body)
 
-Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.
Community Examples

pm/require-jpm function source
(require-jpm path &opt base-env)
+Run code at the top level if jpm dependencies are installed. Build code that imports dependencies should be wrapped with this macro, as project.janet needs to be able to run successfully even without dependencies installed.

pm/require-jpm function source
(require-jpm path &opt base-env)
 
-Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.
Community Examples

pm/resolve-bundle function source
(resolve-bundle bundle)
+Require a jpm file project file. This is different from a normal require in that code is loaded in the jpm environment.

pm/resolve-bundle function source
(resolve-bundle bundle)
 
-Convert any bundle string/table to the normalized table form.
Community Examples

pm/tar function source
(tar & args)
+Convert any bundle string/table to the normalized table form.

pm/tar function source
(tar & args)
 
-Make a call to tar.
Community Examples

pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
+Make a call to tar.

pm/update-git-bundle function source
(update-git-bundle bundle-dir tag shallow)
 
-Fetch latest tag version from remote repository
Community Examples

pm/update-installed function source
(update-installed)
+Fetch latest tag version from remote repository

pm/update-installed function source
(update-installed)
 
-Update all previously installed packages to their latest versions.
Community Examples
+Update all previously installed packages to their latest versions.
DAG Build Project Scaffolding diff --git a/static/1.34.0/api/jpm/rules.html b/static/1.34.0/api/jpm/rules.html index 95e0da89..efb401bb 100644 --- a/static/1.34.0/api/jpm/rules.html +++ b/static/1.34.0/api/jpm/rules.html @@ -122,31 +122,31 @@

Index

rules/add-body rules/add-dep rules/add-input rules/add-output rules/add-thunk rules/build-rules rules/getrules rules/phony rules/rule rules/sh-phony rules/sh-rule rules/sh-task rules/task


rules/add-body macro source
(add-body target & body)
 
-Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.
Community Examples

rules/add-dep function source
(add-dep target dep)
+Add recipe code to an existing rule. This makes existing rules do more but does not modify the dependency graph.

rules/add-dep function source
(add-dep target dep)
 
-Alias for `add-input`
Community Examples

rules/add-input function source
(add-input target input)
+Alias for `add-input`

rules/add-input function source
(add-input target input)
 
-Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.
Community Examples

rules/add-output function source
(add-output target output)
+Add a dependency to an existing rule. Useful for extending phony rules or extending the dependency graph of existing rules.

rules/add-output function source
(add-output target output)
 
-Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.
Community Examples

rules/add-thunk function source
(add-thunk target thunk)
+Add an output file to an existing rule. Rules can contain multiple outputs, but are still referred to by a main target name.

rules/add-thunk function source
(add-thunk target thunk)
 
-Append a thunk to a target's recipe.
Community Examples

rules/build-rules function source
(build-rules rules targets &opt n-workers)
+Append a thunk to a target's recipe.

rules/build-rules function source
(build-rules rules targets &opt n-workers)
 
-Given a graph of all rules, extract a work graph that will build out-of-date files.
Community Examples

rules/getrules function source
(getrules)
+Given a graph of all rules, extract a work graph that will build out-of-date files.

rules/getrules function source
(getrules)
 
-
Community Examples

rules/phony macro source
(phony target deps & body)
+

rules/phony macro source
(phony target deps & body)
 
-Alias for `task`.
Community Examples

rules/rule macro source
(rule target deps & body)
+Alias for `task`.

rules/rule macro source
(rule target deps & body)
 
-Add a rule to the rule graph.
Community Examples

rules/sh-phony macro source
(sh-phony target deps & body)
+Add a rule to the rule graph.

rules/sh-phony macro source
(sh-phony target deps & body)
 
-Alias for `sh-task`.
Community Examples

rules/sh-rule macro source
(sh-rule target deps & body)
+Alias for `sh-task`.

rules/sh-rule macro source
(sh-rule target deps & body)
 
-Add a rule that invokes a shell command, and fails if the command returns non-zero.
Community Examples

rules/sh-task macro source
(sh-task target deps & body)
+Add a rule that invokes a shell command, and fails if the command returns non-zero.

rules/sh-task macro source
(sh-task target deps & body)
 
-Add a task that invokes a shell command, and fails if the command returns non-zero.
Community Examples

rules/task macro source
(task target deps & body)
+Add a task that invokes a shell command, and fails if the command returns non-zero.

rules/task macro source
(task target deps & body)
 
-Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
Community Examples
+Add a task rule to the rule graph. A task rule will always run if invoked (it is always considered out of date).
JPM C Compiler diff --git a/static/1.34.0/api/jpm/scaffold.html b/static/1.34.0/api/jpm/scaffold.html index c78342da..f4680af5 100644 --- a/static/1.34.0/api/jpm/scaffold.html +++ b/static/1.34.0/api/jpm/scaffold.html @@ -122,7 +122,7 @@

Index

scaffold/scaffold-project


scaffold/scaffold-project function source
(scaffold-project name &opt options)
 
-Generate a standardized project scaffold.
Community Examples
+Generate a standardized project scaffold.
Project Management Shell Utilities diff --git a/static/1.34.0/api/jpm/shutil.html b/static/1.34.0/api/jpm/shutil.html index 3530f063..3245e61d 100644 --- a/static/1.34.0/api/jpm/shutil.html +++ b/static/1.34.0/api/jpm/shutil.html @@ -122,63 +122,63 @@

Index

shutil/abspath shutil/basename shutil/clear-cache shutil/clear-manifest shutil/clexe-shell shutil/color shutil/copy shutil/copyfile shutil/create-dirs shutil/devnull shutil/dirname shutil/do-monkeypatch shutil/drop1-shell shutil/exec-slurp shutil/filepath-replace shutil/find-build-dir shutil/find-cache shutil/find-manifest shutil/find-manifest-dir shutil/is-mingw shutil/is-win shutil/is-win-or-mingw shutil/path-splitter shutil/rimraf shutil/rm shutil/run-patched shutil/run-repl shutil/run-script shutil/shell shutil/undo-monkeypatch


shutil/abspath function source
(abspath path)
 
-Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).
Community Examples

shutil/basename function source
(basename path)
+Create an absolute path. Does not resolve . and .. (useful for generating entries in install manifest file).

shutil/basename function source
(basename path)
 
-Get the filename of a path without any leading directory components.
Community Examples

shutil/clear-cache function source
(clear-cache)
+Get the filename of a path without any leading directory components.

shutil/clear-cache function source
(clear-cache)
 
-Clear the global git cache.
Community Examples

shutil/clear-manifest function source
(clear-manifest)
+Clear the global git cache.

shutil/clear-manifest function source
(clear-manifest)
 
-Clear the global installation manifest.
Community Examples

shutil/clexe-shell function source
(clexe-shell & args)
+Clear the global installation manifest.

shutil/clexe-shell function source
(clexe-shell & args)
 
-
Community Examples

shutil/color function source
(color input-color text)
+

shutil/color function source
(color input-color text)
 
-Color text with ascii escape sequences if (os/isatty)
Community Examples

shutil/copy function source
(copy src dest)
+Color text with ascii escape sequences if (os/isatty)

shutil/copy function source
(copy src dest)
 
-Copy a file or directory recursively from one location to another.
Community Examples

shutil/copyfile function source
(copyfile src dest)
+Copy a file or directory recursively from one location to another.

shutil/copyfile function source
(copyfile src dest)
 
-Copy a file one location to another.
Community Examples

shutil/create-dirs function source
(create-dirs dest)
+Copy a file one location to another.

shutil/create-dirs function source
(create-dirs dest)
 
-Create all directories needed for a file (mkdir -p).
Community Examples

shutil/devnull function source
(devnull)
+Create all directories needed for a file (mkdir -p).

shutil/devnull function source
(devnull)
 
-
Community Examples

shutil/dirname function source
(dirname path)
+

shutil/dirname function source
(dirname path)
 
-Get the directory of a file without the filename.
Community Examples

shutil/do-monkeypatch function source
(do-monkeypatch build-dir)
+Get the directory of a file without the filename.

shutil/do-monkeypatch function source
(do-monkeypatch build-dir)
 
-Modify the existing environment to have the same paths as the test environment.
Community Examples

shutil/drop1-shell function source
(drop1-shell std args)
+Modify the existing environment to have the same paths as the test environment.

shutil/drop1-shell function source
(drop1-shell std args)
 
-Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.
Community Examples

shutil/exec-slurp function source
(exec-slurp & args)
+Variant of `shell` to play nice with cl.exe, which outputs some junk to terminal that can't be turned off.

shutil/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of subprocess and return it trimmed in a string.
Community Examples

shutil/filepath-replace function source
(filepath-replace repo)
+Read stdout of subprocess and return it trimmed in a string.

shutil/filepath-replace function source
(filepath-replace repo)
 
-Remove special characters from a string or path to make it into a path segment.
Community Examples

shutil/find-build-dir function source
(find-build-dir)
+Remove special characters from a string or path to make it into a path segment.

shutil/find-build-dir function source
(find-build-dir)
 
-Gets the build directory to output files to.
Community Examples

shutil/find-cache function source
(find-cache)
+Gets the build directory to output files to.

shutil/find-cache function source
(find-cache)
 
-Return the path to the global cache.
Community Examples

shutil/find-manifest function source
(find-manifest name)
+Return the path to the global cache.

shutil/find-manifest function source
(find-manifest name)
 
-Get the full path of a manifest file given a package name.
Community Examples

shutil/find-manifest-dir function source
(find-manifest-dir)
+Get the full path of a manifest file given a package name.

shutil/find-manifest-dir function source
(find-manifest-dir)
 
-Get the path to the directory containing manifests for installed packages.
Community Examples

shutil/is-mingw function source
(is-mingw)
+Get the path to the directory containing manifests for installed packages.

shutil/is-mingw function source
(is-mingw)
 
-Check if built with mingw
Community Examples

shutil/is-win function source
(is-win)
+Check if built with mingw

shutil/is-win function source
(is-win)
 
-Check if we should assume a DOS-like shell or default to posix shell.
Community Examples

shutil/is-win-or-mingw function source
(is-win-or-mingw)
+Check if we should assume a DOS-like shell or default to posix shell.

shutil/is-win-or-mingw function source
(is-win-or-mingw)
 
-Check if built with mingw
Community Examples

shutil/path-splitter core/peg source
split paths on / and \.
Community Examples

shutil/rimraf function source
(rimraf path)
+Check if built with mingw

shutil/path-splitter core/peg source
split paths on / and \.

shutil/rimraf function source
(rimraf path)
 
-Hard delete directory tree
Community Examples

shutil/rm function source
(rm path)
+Hard delete directory tree

shutil/rm function source
(rm path)
 
-Remove a directory and all sub directories.
Community Examples

shutil/run-patched function source
(run-patched & extra-args)
+Remove a directory and all sub directories.

shutil/run-patched function source
(run-patched & extra-args)
 
-Run a subprocess Janet repl that has the same environment as the test environment.
Community Examples

shutil/run-repl function source
(run-repl)
+Run a subprocess Janet repl that has the same environment as the test environment.

shutil/run-repl function source
(run-repl)
 
-Run a repl in the monkey patched test environment
Community Examples

shutil/run-script function source
(run-script path)
+Run a repl in the monkey patched test environment

shutil/run-script function source
(run-script path)
 
-Run a local script in the monkey patched environment.
Community Examples

shutil/shell function source
(shell & args)
+Run a local script in the monkey patched environment.

shutil/shell function source
(shell & args)
 
-Do a shell command
Community Examples

shutil/undo-monkeypatch function source
(undo-monkeypatch old-builddir)
+Do a shell command

shutil/undo-monkeypatch function source
(undo-monkeypatch old-builddir)
 
-
Community Examples
+
Project Scaffolding Math Module diff --git a/static/1.34.0/api/spork/argparse.html b/static/1.34.0/api/spork/argparse.html index a5f1b6fa..772106fa 100644 --- a/static/1.34.0/api/spork/argparse.html +++ b/static/1.34.0/api/spork/argparse.html @@ -155,7 +155,7 @@

Index Once parsed, values are accessible in the returned table by the name of the option. For example `(result "verbose")` will check if the verbose flag is enabled. -You may also use a custom args array when specified via the special option `:args`.Community Examples

+You may also use a custom args array when specified via the special option `:args`.
Spork Base64 diff --git a/static/1.34.0/api/spork/base64.html b/static/1.34.0/api/spork/base64.html index b5426659..c7376a34 100644 --- a/static/1.34.0/api/spork/base64.html +++ b/static/1.34.0/api/spork/base64.html @@ -123,9 +123,9 @@

Index

base64/decode base64/encode


base64/decode function source
(decode s)
 
 Converts a base64 encoded string to its binary representation of any format
-(UTF-8, binary, ..).
Community Examples

base64/encode function source
(encode s)
+(UTF-8, binary, ..).

base64/encode function source
(encode s)
 
-Converts a string of any format (UTF-8, binary, ..) to base64 encoding.
Community Examples
+Converts a string of any format (UTF-8, binary, ..) to base64 encoding.

Argument Parsing CRC diff --git a/static/1.34.0/api/spork/crc.html b/static/1.34.0/api/spork/crc.html index d85d3563..4c1de0d7 100644 --- a/static/1.34.0/api/spork/crc.html +++ b/static/1.34.0/api/spork/crc.html @@ -122,9 +122,9 @@

Index

crc/make-variant crc/named-variant


crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
 
-Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.
Community Examples

crc/named-variant cfunction source
(crc/named-variant name)
+Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.

crc/named-variant cfunction source
(crc/named-variant name)
 
-Get a named CRC variant.
Community Examples
+Get a named CRC variant.
Base64 Cron diff --git a/static/1.34.0/api/spork/cron.html b/static/1.34.0/api/spork/cron.html index 46e10b08..36647aee 100644 --- a/static/1.34.0/api/spork/cron.html +++ b/static/1.34.0/api/spork/cron.html @@ -122,11 +122,11 @@

Index

cron/check cron/next-timestamp cron/parse-cron


cron/check function source
(check cron &opt time local)
 
-Check if a given time matches a cron specifier.
Community Examples

cron/next-timestamp function source
(next-timestamp cron &opt time local)
+Check if a given time matches a cron specifier.

cron/next-timestamp function source
(next-timestamp cron &opt time local)
 
-Given a cron schedule, get the next instance on the cron tab after time
Community Examples

cron/parse-cron function source
(parse-cron str)
+Given a cron schedule, get the next instance on the cron tab after time

cron/parse-cron function source
(parse-cron str)
 
-Parse a cron string into a valid cron schedule object
Community Examples
+Parse a cron string into a valid cron schedule object
CRC EV Utilities diff --git a/static/1.34.0/api/spork/ev-utils.html b/static/1.34.0/api/spork/ev-utils.html index 95e59743..fda23e3e 100644 --- a/static/1.34.0/api/spork/ev-utils.html +++ b/static/1.34.0/api/spork/ev-utils.html @@ -122,27 +122,27 @@

Index

ev-utils/go-nursery ev-utils/join-nursery ev-utils/multithread-service ev-utils/nursery ev-utils/pcall ev-utils/pdag ev-utils/pmap ev-utils/pmap-full ev-utils/pmap-limited ev-utils/spawn-nursery ev-utils/wait-cancel


ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
 
-Spawn a fiber into a nursery, similar to ev/go.
Community Examples

ev-utils/join-nursery function source
(join-nursery nurse)
+Spawn a fiber into a nursery, similar to ev/go.

ev-utils/join-nursery function source
(join-nursery nurse)
 
-Suspend the current fiber until the nursery is emptied.
Community Examples

ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
+Suspend the current fiber until the nursery is emptied.

ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
 
-Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.
Community Examples

ev-utils/nursery function source
(nursery)
+Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.

ev-utils/nursery function source
(nursery)
 
-Group a number of fibers into a single object for structured concurrency
Community Examples

ev-utils/pcall function source
(pcall f n)
+Group a number of fibers into a single object for structured concurrency

ev-utils/pcall function source
(pcall f n)
 
-Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.
Community Examples

ev-utils/pdag function source
(pdag f dag &opt n-workers)
+Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.

ev-utils/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.
Community Examples

ev-utils/pmap function source
(pmap f data &opt n-workers)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.

ev-utils/pmap function source
(pmap f data &opt n-workers)
 
-Map `f` over data in parallel, optionally limiting parallelism to `n` workers.
Community Examples

ev-utils/pmap-full function source
(pmap-full f data)
+Map `f` over data in parallel, optionally limiting parallelism to `n` workers.

ev-utils/pmap-full function source
(pmap-full f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.
Community Examples

ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.

ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
 
-Similar to pmap-full, but only runs work n-ways parallel.
Community Examples

ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
+Similar to pmap-full, but only runs work n-ways parallel.

ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
 
-Similar to ev/spawn but associate spawned fibers with a nursery
Community Examples

ev-utils/wait-cancel macro source
(wait-cancel & body)
+Similar to ev/spawn but associate spawned fibers with a nursery

ev-utils/wait-cancel macro source
(wait-cancel & body)
 
-Wait forever until the current fiber is canceled, and then run some cleanup code.
Community Examples
+Wait forever until the current fiber is canceled, and then run some cleanup code.
Cron Format diff --git a/static/1.34.0/api/spork/fmt.html b/static/1.34.0/api/spork/fmt.html index 80d4cf44..5bf770a2 100644 --- a/static/1.34.0/api/spork/fmt.html +++ b/static/1.34.0/api/spork/fmt.html @@ -120,13 +120,13 @@

Format

Index

-

fmt/*user-indent-2-forms* fmt/format fmt/format-file fmt/format-print


fmt/*user-indent-2-forms* keyword source
A user list of forms that are control forms and should be indented two spaces.
Community Examples

fmt/format function source
(format source)
+

fmt/*user-indent-2-forms* fmt/format fmt/format-file fmt/format-print


fmt/*user-indent-2-forms* keyword source
A user list of forms that are control forms and should be indented two spaces.

fmt/format function source
(format source)
 
-Format a string of source code to a buffer.
Community Examples

fmt/format-file function source
(format-file file)
+Format a string of source code to a buffer.

fmt/format-file function source
(format-file file)
 
-Format a file
Community Examples

fmt/format-print function source
(format-print source)
+Format a file

fmt/format-print function source
(format-print source)
 
-Format a string of source code and print the result.
Community Examples
+Format a string of source code and print the result.
EV Utilities Generators diff --git a/static/1.34.0/api/spork/generators.html b/static/1.34.0/api/spork/generators.html index 20c8f4c9..ac3e52b3 100644 --- a/static/1.34.0/api/spork/generators.html +++ b/static/1.34.0/api/spork/generators.html @@ -122,35 +122,35 @@

Index

generators/concat generators/cycle generators/drop generators/drop-until generators/drop-while generators/filter generators/from-iterable generators/map generators/mapcat generators/range generators/run generators/take generators/take-until generators/take-while generators/to-array


generators/concat function source
(concat & xs)
 
-Concatenate one or more generators or iterables into a single generator.
Community Examples

generators/cycle function source
(cycle ds)
+Concatenate one or more generators or iterables into a single generator.

generators/cycle function source
(cycle ds)
 
-Repeatedly yield the elements of `ds`, looping back to the beginning when finished.
Community Examples

generators/drop function source
(drop n ds)
+Repeatedly yield the elements of `ds`, looping back to the beginning when finished.

generators/drop function source
(drop n ds)
 
-Drop `n` elements from `ds`.
Community Examples

generators/drop-until function source
(drop-until p ds)
+Drop `n` elements from `ds`.

generators/drop-until function source
(drop-until p ds)
 
-Drop elements from `ds` until `p` is true.
Community Examples

generators/drop-while function source
(drop-while p ds)
+Drop elements from `ds` until `p` is true.

generators/drop-while function source
(drop-while p ds)
 
-Drop elements from `ds` while `p` is true.
Community Examples

generators/filter function source
(filter p ds)
+Drop elements from `ds` while `p` is true.

generators/filter function source
(filter p ds)
 
-Create a generator that filters `ds` with `p`.
Community Examples

generators/from-iterable function source
(from-iterable ds)
+Create a generator that filters `ds` with `p`.

generators/from-iterable function source
(from-iterable ds)
 
-Create a new generator around any iterable data structure.
Community Examples

generators/map function source
(map f ds)
+Create a new generator around any iterable data structure.

generators/map function source
(map f ds)
 
-Create a generator that maps `f` over `ds`.
Community Examples

generators/mapcat function source
(mapcat f ds)
+Create a generator that maps `f` over `ds`.

generators/mapcat function source
(mapcat f ds)
 
-Map `f` over `ds`, concatenating the results into a new generator.
Community Examples

generators/range function source
(range from to)
+Map `f` over `ds`, concatenating the results into a new generator.

generators/range function source
(range from to)
 
-Create a lazy range.
Community Examples

generators/run function source
(run s)
+Create a lazy range.

generators/run function source
(run s)
 
-Evaluate `s` for side effects.
Community Examples

generators/take function source
(take n ds)
+Evaluate `s` for side effects.

generators/take function source
(take n ds)
 
-Take `n` elements from iterable `ds`.
Community Examples

generators/take-until function source
(take-until p ds)
+Take `n` elements from iterable `ds`.

generators/take-until function source
(take-until p ds)
 
-Return elements from `ds` until `p` is true.
Community Examples

generators/take-while function source
(take-while p ds)
+Return elements from `ds` until `p` is true.

generators/take-while function source
(take-while p ds)
 
-Return elements from `ds` while `p` is true.
Community Examples

generators/to-array function source
(to-array s)
+Return elements from `ds` while `p` is true.

generators/to-array function source
(to-array s)
 
-Consume `s` into a new array.
Community Examples
+Consume `s` into a new array.
Format Getline diff --git a/static/1.34.0/api/spork/getline.html b/static/1.34.0/api/spork/getline.html index 85040547..1018d00c 100644 --- a/static/1.34.0/api/spork/getline.html +++ b/static/1.34.0/api/spork/getline.html @@ -122,13 +122,13 @@

Index

getline/default-autocomplete-context getline/default-autocomplete-options getline/default-doc-fetch getline/make-getline getline/max-history


getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
 
-Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.
Community Examples

getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
+Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.

getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
 
-Default handler to get available autocomplete options for a given substring.
Community Examples

getline/default-doc-fetch function source
(default-doc-fetch sym w &)
+Default handler to get available autocomplete options for a given substring.

getline/default-doc-fetch function source
(default-doc-fetch sym w &)
 
-Default handler for Ctrl-G to lookup docstrings in the current environment.
Community Examples

getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
+Default handler for Ctrl-G to lookup docstrings in the current environment.

getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
 
-Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.
Community Examples

getline/max-history number source
Maximal amount of items in the history
Community Examples
+Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.

getline/max-history number source
Maximal amount of items in the history
Generators HTML Generation diff --git a/static/1.34.0/api/spork/htmlgen.html b/static/1.34.0/api/spork/htmlgen.html index c79ecbba..fee919be 100644 --- a/static/1.34.0/api/spork/htmlgen.html +++ b/static/1.34.0/api/spork/htmlgen.html @@ -120,13 +120,13 @@

HTML Generation

Index

-

htmlgen/doctype-html htmlgen/escape htmlgen/html htmlgen/raw


htmlgen/doctype-html function source
The html5 doctype header
Community Examples

htmlgen/escape function source
(escape x)
+

htmlgen/doctype-html htmlgen/escape htmlgen/html htmlgen/raw


htmlgen/doctype-html function source
The html5 doctype header

htmlgen/escape function source
(escape x)
 
-Escape characters in a string for HTML
Community Examples

htmlgen/html function source
(html data &opt buf)
+Escape characters in a string for HTML

htmlgen/html function source
(html data &opt buf)
 
-Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.
Community Examples

htmlgen/raw function source
(raw text)
+Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.

htmlgen/raw function source
(raw text)
 
-Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Community Examples
+Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Getline HTTP diff --git a/static/1.34.0/api/spork/http.html b/static/1.34.0/api/spork/http.html index 122736c3..1ea52ab0 100644 --- a/static/1.34.0/api/spork/http.html +++ b/static/1.34.0/api/spork/http.html @@ -120,29 +120,29 @@

HTTP

Index

-

http/cookie-grammar http/cookies http/logger http/middleware http/query-string-grammar http/read-body http/read-request http/read-response http/request http/request-peg http/response-peg http/router http/send-response http/server http/server-handler http/status-messages http/url-grammar


http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.
Community Examples

http/cookies function source
(cookies nextmw)
+

http/cookie-grammar http/cookies http/logger http/middleware http/query-string-grammar http/read-body http/read-request http/read-response http/request http/request-peg http/response-peg http/router http/send-response http/server http/server-handler http/status-messages http/url-grammar


http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.

http/cookies function source
(cookies nextmw)
 
-Parses cookies into the table under :cookies key
Community Examples

http/logger function source
(logger nextmw)
+Parses cookies into the table under :cookies key

http/logger function source
(logger nextmw)
 
-Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.
Community Examples

http/middleware function source
(middleware x)
+Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.

http/middleware function source
(middleware x)
 
-Coerce any type to http middleware
Community Examples

http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.
Community Examples

http/read-body function source
(read-body req)
+Coerce any type to http middleware

http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.

http/read-body function source
(read-body req)
 
-Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.
Community Examples

http/read-request function source
(read-request conn buf &opt no-query)
+Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.

http/read-request function source
(read-request conn buf &opt no-query)
 
-Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`
Community Examples

http/read-response function source
(read-response conn buf)
+Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`

http/read-response function source
(read-response conn buf)
 
-Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`
Community Examples

http/request function source
(request method url &keys {:headers headers :body body})
+Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`

http/request function source
(request method url &keys {:headers headers :body body})
 
-Make an HTTP request to a server. Returns a table containing response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.
Community Examples

http/request-peg core/peg source
PEG for parsing HTTP requests
Community Examples

http/response-peg core/peg source
PEG for parsing HTTP responses
Community Examples

http/router function source
(router routes)
+Make an HTTP request to a server. Returns a table containing response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.

http/request-peg core/peg source
PEG for parsing HTTP requests

http/response-peg core/peg source
PEG for parsing HTTP responses

http/router function source
(router routes)
 
-Creates a router middleware. A router will dispatch to different routes based on the URL path.
Community Examples

http/send-response function source
(send-response conn response &opt buf)
+Creates a router middleware. A router will dispatch to different routes based on the URL path.

http/send-response function source
(send-response conn response &opt buf)
 
-Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.
Community Examples

http/server function source
(server handler &opt host port)
+Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.

http/server function source
(server handler &opt host port)
 
-Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.
Community Examples

http/server-handler function source
(server-handler conn handler)
+Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.

http/server-handler function source
(server-handler conn handler)
 
-A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.
Community Examples

http/status-messages struct source
Mapping of HTTP status codes to their status message.
Community Examples

http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
Community Examples
+A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.

http/status-messages struct source
Mapping of HTTP status codes to their status message.

http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
HTML Generation HTTP Framework diff --git a/static/1.34.0/api/spork/httpf.html b/static/1.34.0/api/spork/httpf.html index 9d53b43c..bfb38258 100644 --- a/static/1.34.0/api/spork/httpf.html +++ b/static/1.34.0/api/spork/httpf.html @@ -122,15 +122,15 @@

Index

httpf/add-bindings-as-routes httpf/add-route httpf/default-payload-wrapper httpf/listen httpf/server


httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
 
-Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.
Community Examples

httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
+Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.

httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
 
-Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.
Community Examples

httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
+Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.

httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
 
-Add some metadata to all responses
Community Examples

httpf/listen function source
(listen server &opt host port n-workers)
+Add some metadata to all responses

httpf/listen function source
(listen server &opt host port n-workers)
 
-Start server
Community Examples

httpf/server function source
(server &opt parent)
+Start server

httpf/server function source
(server &opt parent)
 
-Create a new server.
Community Examples
+Create a new server.
HTTP JSON diff --git a/static/1.34.0/api/spork/index.html b/static/1.34.0/api/spork/index.html index cd1e2909..eea94653 100644 --- a/static/1.34.0/api/spork/index.html +++ b/static/1.34.0/api/spork/index.html @@ -160,256 +160,256 @@

Spork

Once parsed, values are accessible in the returned table by the name of the option. For example `(result "verbose")` will check if the verbose flag is enabled. -You may also use a custom args array when specified via the special option `:args`.Community Examples

spork/base64/decode function source
(decode s)
+You may also use a custom args array when specified via the special option `:args`.

spork/base64/decode function source
(decode s)
 
 Converts a base64 encoded string to its binary representation of any format
-(UTF-8, binary, ..).
Community Examples

spork/base64/encode function source
(encode s)
+(UTF-8, binary, ..).

spork/base64/encode function source
(encode s)
 
-Converts a string of any format (UTF-8, binary, ..) to base64 encoding.
Community Examples

spork/crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
+Converts a string of any format (UTF-8, binary, ..) to base64 encoding.

spork/crc/make-variant cfunction source
(crc/make-variant size polynomial &opt init byte-flip xorout)
 
-Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.
Community Examples

spork/crc/named-variant cfunction source
(crc/named-variant name)
+Create a CRC function based on the given polynomial, initial value, xourout, and whether to invert input bytes.

spork/crc/named-variant cfunction source
(crc/named-variant name)
 
-Get a named CRC variant.
Community Examples

spork/cron/check function source
(check cron &opt time local)
+Get a named CRC variant.

spork/cron/check function source
(check cron &opt time local)
 
-Check if a given time matches a cron specifier.
Community Examples

spork/cron/next-timestamp function source
(next-timestamp cron &opt time local)
+Check if a given time matches a cron specifier.

spork/cron/next-timestamp function source
(next-timestamp cron &opt time local)
 
-Given a cron schedule, get the next instance on the cron tab after time
Community Examples

spork/cron/parse-cron function source
(parse-cron str)
+Given a cron schedule, get the next instance on the cron tab after time

spork/cron/parse-cron function source
(parse-cron str)
 
-Parse a cron string into a valid cron schedule object
Community Examples

spork/ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
+Parse a cron string into a valid cron schedule object

spork/ev-utils/go-nursery function source
(go-nursery nurse f &opt value)
 
-Spawn a fiber into a nursery, similar to ev/go.
Community Examples

spork/ev-utils/join-nursery function source
(join-nursery nurse)
+Spawn a fiber into a nursery, similar to ev/go.

spork/ev-utils/join-nursery function source
(join-nursery nurse)
 
-Suspend the current fiber until the nursery is emptied.
Community Examples

spork/ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
+Suspend the current fiber until the nursery is emptied.

spork/ev-utils/multithread-service function source
(multithread-service thread-main n-threads)
 
-Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.
Community Examples

spork/ev-utils/nursery function source
(nursery)
+Run instances of a function over multiple threads. On failures, restart the failed thread. Normal function returns will not trigger a restart.

spork/ev-utils/nursery function source
(nursery)
 
-Group a number of fibers into a single object for structured concurrency
Community Examples

spork/ev-utils/pcall function source
(pcall f n)
+Group a number of fibers into a single object for structured concurrency

spork/ev-utils/pcall function source
(pcall f n)
 
-Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.
Community Examples

spork/ev-utils/pdag function source
(pdag f dag &opt n-workers)
+Call a function n times (in parallel) for side effects. Each function is called with an integer argument indicating a fiber index. Returns nil.

spork/ev-utils/pdag function source
(pdag f dag &opt n-workers)
 
-Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.
Community Examples

spork/ev-utils/pmap function source
(pmap f data &opt n-workers)
+Executes a dag by calling f on every node in the graph. Can set the number of workers for parallel execution. The graph is represented as a table mapping nodes to arrays of child nodes. Each node will only be evaluated after all children have been evaluated. Modifying `dag` inside `f` will not affect the scheduling of workers. Returns a table mapping each node to the result of `(f node)`.

spork/ev-utils/pmap function source
(pmap f data &opt n-workers)
 
-Map `f` over data in parallel, optionally limiting parallelism to `n` workers.
Community Examples

spork/ev-utils/pmap-full function source
(pmap-full f data)
+Map `f` over data in parallel, optionally limiting parallelism to `n` workers.

spork/ev-utils/pmap-full function source
(pmap-full f data)
 
-Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.
Community Examples

spork/ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
+Function form of `ev/gather`. If any of the sibling fibers error, all other siblings will be canceled. Returns the gathered results in an array. `data` can be any indexed data structure.

spork/ev-utils/pmap-limited function source
(pmap-limited f data n-workers)
 
-Similar to pmap-full, but only runs work n-ways parallel.
Community Examples

spork/ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
+Similar to pmap-full, but only runs work n-ways parallel.

spork/ev-utils/spawn-nursery macro source
(spawn-nursery nurse & body)
 
-Similar to ev/spawn but associate spawned fibers with a nursery
Community Examples

spork/ev-utils/wait-cancel macro source
(wait-cancel & body)
+Similar to ev/spawn but associate spawned fibers with a nursery

spork/ev-utils/wait-cancel macro source
(wait-cancel & body)
 
-Wait forever until the current fiber is canceled, and then run some cleanup code.
Community Examples

spork/fmt/*user-indent-2-forms* keyword source
A user list of forms that are control forms and should be indented two spaces.
Community Examples

spork/fmt/format function source
(format source)
+Wait forever until the current fiber is canceled, and then run some cleanup code.

spork/fmt/*user-indent-2-forms* keyword source
A user list of forms that are control forms and should be indented two spaces.

spork/fmt/format function source
(format source)
 
-Format a string of source code to a buffer.
Community Examples

spork/fmt/format-file function source
(format-file file)
+Format a string of source code to a buffer.

spork/fmt/format-file function source
(format-file file)
 
-Format a file
Community Examples

spork/fmt/format-print function source
(format-print source)
+Format a file

spork/fmt/format-print function source
(format-print source)
 
-Format a string of source code and print the result.
Community Examples

spork/generators/concat function source
(concat & xs)
+Format a string of source code and print the result.

spork/generators/concat function source
(concat & xs)
 
-Concatenate one or more generators or iterables into a single generator.
Community Examples

spork/generators/cycle function source
(cycle ds)
+Concatenate one or more generators or iterables into a single generator.

spork/generators/cycle function source
(cycle ds)
 
-Repeatedly yield the elements of `ds`, looping back to the beginning when finished.
Community Examples

spork/generators/drop function source
(drop n ds)
+Repeatedly yield the elements of `ds`, looping back to the beginning when finished.

spork/generators/drop function source
(drop n ds)
 
-Drop `n` elements from `ds`.
Community Examples

spork/generators/drop-until function source
(drop-until p ds)
+Drop `n` elements from `ds`.

spork/generators/drop-until function source
(drop-until p ds)
 
-Drop elements from `ds` until `p` is true.
Community Examples

spork/generators/drop-while function source
(drop-while p ds)
+Drop elements from `ds` until `p` is true.

spork/generators/drop-while function source
(drop-while p ds)
 
-Drop elements from `ds` while `p` is true.
Community Examples

spork/generators/filter function source
(filter p ds)
+Drop elements from `ds` while `p` is true.

spork/generators/filter function source
(filter p ds)
 
-Create a generator that filters `ds` with `p`.
Community Examples

spork/generators/from-iterable function source
(from-iterable ds)
+Create a generator that filters `ds` with `p`.

spork/generators/from-iterable function source
(from-iterable ds)
 
-Create a new generator around any iterable data structure.
Community Examples

spork/generators/map function source
(map f ds)
+Create a new generator around any iterable data structure.

spork/generators/map function source
(map f ds)
 
-Create a generator that maps `f` over `ds`.
Community Examples

spork/generators/mapcat function source
(mapcat f ds)
+Create a generator that maps `f` over `ds`.

spork/generators/mapcat function source
(mapcat f ds)
 
-Map `f` over `ds`, concatenating the results into a new generator.
Community Examples

spork/generators/range function source
(range from to)
+Map `f` over `ds`, concatenating the results into a new generator.

spork/generators/range function source
(range from to)
 
-Create a lazy range.
Community Examples

spork/generators/run function source
(run s)
+Create a lazy range.

spork/generators/run function source
(run s)
 
-Evaluate `s` for side effects.
Community Examples

spork/generators/take function source
(take n ds)
+Evaluate `s` for side effects.

spork/generators/take function source
(take n ds)
 
-Take `n` elements from iterable `ds`.
Community Examples

spork/generators/take-until function source
(take-until p ds)
+Take `n` elements from iterable `ds`.

spork/generators/take-until function source
(take-until p ds)
 
-Return elements from `ds` until `p` is true.
Community Examples

spork/generators/take-while function source
(take-while p ds)
+Return elements from `ds` until `p` is true.

spork/generators/take-while function source
(take-while p ds)
 
-Return elements from `ds` while `p` is true.
Community Examples

spork/generators/to-array function source
(to-array s)
+Return elements from `ds` while `p` is true.

spork/generators/to-array function source
(to-array s)
 
-Consume `s` into a new array.
Community Examples

spork/getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
+Consume `s` into a new array.

spork/getline/default-autocomplete-context function source
(default-autocomplete-context buf pos)
 
-Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.
Community Examples

spork/getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
+Given a buffer and a cursor position, extract a string that will be used as context for autocompletion. Return a position and substring from the buffer to use for autocompletion.

spork/getline/default-autocomplete-options function source
(default-autocomplete-options prefix &)
 
-Default handler to get available autocomplete options for a given substring.
Community Examples

spork/getline/default-doc-fetch function source
(default-doc-fetch sym w &)
+Default handler to get available autocomplete options for a given substring.

spork/getline/default-doc-fetch function source
(default-doc-fetch sym w &)
 
-Default handler for Ctrl-G to lookup docstrings in the current environment.
Community Examples

spork/getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
+Default handler for Ctrl-G to lookup docstrings in the current environment.

spork/getline/make-getline function source
(make-getline &opt autocomplete-context autocomplete-options doc-fetch)
 
-Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.
Community Examples

spork/getline/max-history number source
Maximal amount of items in the history
Community Examples

spork/htmlgen/doctype-html function source
The html5 doctype header
Community Examples

spork/htmlgen/escape function source
(escape x)
+Reads a line of input into a buffer, like `getline`. However, allow looking up entries with a general lookup function rather than a environment table.

spork/getline/max-history number source
Maximal amount of items in the history

spork/htmlgen/doctype-html function source
The html5 doctype header

spork/htmlgen/escape function source
(escape x)
 
-Escape characters in a string for HTML
Community Examples

spork/htmlgen/html function source
(html data &opt buf)
+Escape characters in a string for HTML

spork/htmlgen/html function source
(html data &opt buf)
 
-Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.
Community Examples

spork/htmlgen/raw function source
(raw text)
+Render HTML from standard data structures. Fills the provided optional buffer, or new one if it is not provided, with the html bytes.

spork/htmlgen/raw function source
(raw text)
 
-Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.
Community Examples

spork/http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.
Community Examples

spork/http/cookies function source
(cookies nextmw)
+Get an object that can be used to splice in HTML literals. `text` is not escaped in the output string.

spork/http/cookie-grammar core/peg source
Grammar to parse a cookie header to a series of keys and values.

spork/http/cookies function source
(cookies nextmw)
 
-Parses cookies into the table under :cookies key
Community Examples

spork/http/logger function source
(logger nextmw)
+Parses cookies into the table under :cookies key

spork/http/logger function source
(logger nextmw)
 
-Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.
Community Examples

spork/http/middleware function source
(middleware x)
+Creates a logging middleware. The logger middleware prints URL route, return status, and elapsed request time.

spork/http/middleware function source
(middleware x)
 
-Coerce any type to http middleware
Community Examples

spork/http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.
Community Examples

spork/http/read-body function source
(read-body req)
+Coerce any type to http middleware

spork/http/query-string-grammar core/peg source
Grammar that parses a query string (sans url path and ? character) and returns a table.

spork/http/read-body function source
(read-body req)
 
-Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.
Community Examples

spork/http/read-request function source
(read-request conn buf &opt no-query)
+Given a request, read the HTTP body from the connection. Returns the body as a buffer. If the request has no body, returns nil.

spork/http/read-request function source
(read-request conn buf &opt no-query)
 
-Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`
Community Examples

spork/http/read-response function source
(read-response conn buf)
+Read an HTTP request header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:method` - the HTTP method used. * `:path` - the path of the resource requested. The following keys are also present, but omitted if the user passes a truthy parameter to `no-query`. * `:route` - path of the resource requested without query string. * `:query-string` - segment of HTTP path after first ? character. * `:query` - the query string parsed into a table. Supports a single string value     for every string key, and any query parameters that aren't given a value are mapped to true.  Note that data is read in chunks and any data after the header terminator is  stored in `:buffer.`

spork/http/read-response function source
(read-response conn buf)
 
-Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`
Community Examples

spork/http/request function source
(request method url &keys {:headers headers :body body})
+Read an HTTP response header from a connection. Returns a table with the following keys: * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:head-size` - the number of bytes used by the header. * `:status` - the HTTP status code. * `:message` - the HTTP status message. Note that data is read in chunks and any data after the header terminator is stored in `:buffer.`

spork/http/request function source
(request method url &keys {:headers headers :body body})
 
-Make an HTTP request to a server. Returns a table containing response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.
Community Examples

spork/http/request-peg core/peg source
PEG for parsing HTTP requests
Community Examples

spork/http/response-peg core/peg source
PEG for parsing HTTP responses
Community Examples

spork/http/router function source
(router routes)
+Make an HTTP request to a server. Returns a table containing response information. * `:head-size` - number of bytes in the http header * `:headers` - table mapping header names to header values. Header names are lowercase. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:status` - HTTP status code as an integer. * `:message` - HTTP status message. * `:body` - Bytes of the response body.

spork/http/request-peg core/peg source
PEG for parsing HTTP requests

spork/http/response-peg core/peg source
PEG for parsing HTTP responses

spork/http/router function source
(router routes)
 
-Creates a router middleware. A router will dispatch to different routes based on the URL path.
Community Examples

spork/http/send-response function source
(send-response conn response &opt buf)
+Creates a router middleware. A router will dispatch to different routes based on the URL path.

spork/http/send-response function source
(send-response conn response &opt buf)
 
-Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.
Community Examples

spork/http/server function source
(server handler &opt host port)
+Send an HTTP response over a connection. Will automatically use chunked encoding if body is not a byte sequence. `response` should be a table with the following keys: * `:headers` - optional headers to write * `:status` - integer status code to write * `:body` - optional byte sequence or iterable (for chunked body) for returning contents. The iterable can be lazy, i.e. for streaming    data.

spork/http/server function source
(server handler &opt host port)
 
-Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.
Community Examples

spork/http/server-handler function source
(server-handler conn handler)
+Makes a simple http server. By default it binds to 0.0.0.0:8000, returns a new server stream. Simply wraps http/server-handler with a net/server.

spork/http/server-handler function source
(server-handler conn handler)
 
-A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.
Community Examples

spork/http/status-messages struct source
Mapping of HTTP status codes to their status message.
Community Examples

spork/http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.
Community Examples

spork/httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
+A simple connection handler for an HTTP server. When a connection is accepted. Call this with a handler function to handle the connect. The handler will be called with one argument, the request table, which will contain the following keys: * `:head-size` - number of bytes in the http header. * `:headers` - table mapping header names to header values. * `:connection` - the connection stream for the header. * `:buffer` - the buffer instance that may contain extra bytes. * `:path` - HTTP path. * `:method` - HTTP method, as a string.

spork/http/status-messages struct source
Mapping of HTTP status codes to their status message.

spork/http/url-grammar core/peg source
Grammar to parse a URL into domain, port, and path triplet. Only supports the http:// protocol.

spork/httpf/add-bindings-as-routes function source
(add-bindings-as-routes server &opt env)
 
-Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.
Community Examples

spork/httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
+Add all local functions defined with :path metadata to a server. Will read from the :schema, :doc, :path, and :route-doc metadata to determine how the route behaves.

spork/httpf/add-route function source
(add-route server path docstring schema handler &opt read-mime render-mime)
 
-Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.
Community Examples

spork/httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
+Add a single manually route to a server. Prefer using `httpf/add-bindings-as-routes` for the usual case.

spork/httpf/default-payload-wrapper function source
(default-payload-wrapper payload)
 
-Add some metadata to all responses
Community Examples

spork/httpf/listen function source
(listen server &opt host port n-workers)
+Add some metadata to all responses

spork/httpf/listen function source
(listen server &opt host port n-workers)
 
-Start server
Community Examples

spork/httpf/server function source
(server &opt parent)
+Start server

spork/httpf/server function source
(server &opt parent)
 
-Create a new server.
Community Examples

spork/json/decode cfunction
(json/decode json-source &opt keywords nils)
+Create a new server.

spork/json/decode cfunction
(json/decode json-source &opt keywords nils)
 
-Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.
Community Examples

spork/json/encode cfunction
(json/encode x &opt tab newline buf)
+Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.

spork/json/encode cfunction
(json/encode x &opt tab newline buf)
 
-Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
Community Examples

spork/mdz/*front-matter* keyword source
Dynamic binding to front matter after parsing, compilation, and evaluation, of markup completes.
Community Examples

spork/mdz/*markup-dom* keyword source
The htmlgen source that can be used to generate a document with htmlgen/html.
Community Examples

spork/mdz/add-loader function source
(add-loader)
+Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.

spork/mdz/*front-matter* keyword source
Dynamic binding to front matter after parsing, compilation, and evaluation, of markup completes.

spork/mdz/*markup-dom* keyword source
The htmlgen source that can be used to generate a document with htmlgen/html.

spork/mdz/add-loader function source
(add-loader)
 
-Allow importing and requiring markup as a module
Community Examples

spork/mdz/anchor function source
(anchor name & content)
+Allow importing and requiring markup as a module

spork/mdz/anchor function source
(anchor name & content)
 
-Create an in-page anchor for a local link.
Community Examples

spork/mdz/bigger function source
(bigger content)
+Create an in-page anchor for a local link.

spork/mdz/bigger function source
(bigger content)
 
-Make span element with bigger font
Community Examples

spork/mdz/blockquote function source
(blockquote content)
+Make span element with bigger font

spork/mdz/blockquote function source
(blockquote content)
 
-Make a block quote element
Community Examples

spork/mdz/center function source
(center content)
+Make a block quote element

spork/mdz/center function source
(center content)
 
-Center some content
Community Examples

spork/mdz/code function source
(code content)
+Center some content

spork/mdz/code function source
(code content)
 
-Make code element with class mendoza-code
Community Examples

spork/mdz/codeblock function source
(codeblock lang &opt source)
+Make code element with class mendoza-code

spork/mdz/codeblock function source
(codeblock lang &opt source)
 
-Inline code or codeblock
Community Examples

spork/mdz/div function
Make a div element
Community Examples

spork/mdz/em function
Make a em element
Community Examples

spork/mdz/hr function source
(hr)
+Inline code or codeblock

spork/mdz/div function
Make a div element

spork/mdz/em function
Make a em element

spork/mdz/hr function source
(hr)
 
-Add a horizontal rule
Community Examples

spork/mdz/html function source
(html source)
+Add a horizontal rule

spork/mdz/html function source
(html source)
 
-Embed some raw html
Community Examples

spork/mdz/image function source
(image src alt)
+Embed some raw html

spork/mdz/image function source
(image src alt)
 
-Make an image element
Community Examples

spork/mdz/li function
Make a li element
Community Examples

spork/mdz/link function source
(link url &opt content)
+Make an image element

spork/mdz/li function
Make a li element

spork/mdz/link function source
(link url &opt content)
 
-Create an anchor link
Community Examples

spork/mdz/markup function source
(markup source &opt env where)
+Create an anchor link

spork/mdz/markup function source
(markup source &opt env where)
 
-Parse mendoza markup and evaluate it returning an htmlgen document tree.
Community Examples

spork/mdz/mdz-loader function source
(mdz-loader path &)
+Parse mendoza markup and evaluate it returning an htmlgen document tree.

spork/mdz/mdz-loader function source
(mdz-loader path &)
 
-Loader for the mdz format
Community Examples

spork/mdz/ol function
Make a ol element
Community Examples

spork/mdz/p function
Make a p element
Community Examples

spork/mdz/pre function
Make a pre element
Community Examples

spork/mdz/section function source
(section name content)
+Loader for the mdz format

spork/mdz/ol function
Make a ol element

spork/mdz/p function
Make a p element

spork/mdz/pre function
Make a pre element

spork/mdz/section function source
(section name content)
 
-Create a section. Usually used to embed different parts of the content document into different parts of the main page.
Community Examples

spork/mdz/smaller function source
(smaller content)
+Create a section. Usually used to embed different parts of the content document into different parts of the main page.

spork/mdz/smaller function source
(smaller content)
 
-Make span element with smaller font
Community Examples

spork/mdz/strong function
Make a strong element
Community Examples

spork/mdz/sub function
Make a sub element
Community Examples

spork/mdz/sup function
Make a sup element
Community Examples

spork/mdz/tag function source
(tag name content)
+Make span element with smaller font

spork/mdz/strong function
Make a strong element

spork/mdz/sub function
Make a sub element

spork/mdz/sup function
Make a sup element

spork/mdz/tag function source
(tag name content)
 
-Wrap some content in an html tag. If you need attributes or other properties, you may want to use raw HTML via the html function.
Community Examples

spork/mdz/td function
Make a td element
Community Examples

spork/mdz/th function
Make a th element
Community Examples

spork/mdz/tr function
Make a tr element
Community Examples

spork/mdz/u function
Make a u element
Community Examples

spork/mdz/ul function
Make a ul element
Community Examples

spork/misc/always function source
(always x)
+Wrap some content in an html tag. If you need attributes or other properties, you may want to use raw HTML via the html function.

spork/mdz/td function
Make a td element

spork/mdz/th function
Make a th element

spork/mdz/tr function
Make a tr element

spork/mdz/u function
Make a u element

spork/mdz/ul function
Make a ul element

spork/misc/always function source
(always x)
 
-Return a function that discards any arguments and always returns `x`.
Community Examples

spork/misc/antepenultimate function source
(antepenultimate xs)
+Return a function that discards any arguments and always returns `x`.

spork/misc/antepenultimate function source
(antepenultimate xs)
 
-Get the third-to-last element from an indexed data structure.
Community Examples

spork/misc/binary-search macro source
(binary-search x arr &opt <?)
+Get the third-to-last element from an indexed data structure.

spork/misc/binary-search macro source
(binary-search x arr &opt <?)
 
 Returns the index of `x` in a sorted array or tuple or the index of
 the next item if `x` is not present. This is the correct insert index
 for `x` within `arr`. If a `<?` comparator is given, the search uses
-that to compare elements, otherwise uses `<`.
Community Examples

spork/misc/binary-search-by macro source
(binary-search-by x arr f)
+that to compare elements, otherwise uses `<`.

spork/misc/binary-search-by macro source
(binary-search-by x arr f)
 
 Returns the index of `x` in an array or tuple which has been sorted
 by a mapping function `f`, or the index of the next item if `x` is not
-present. This is the correct insert index for `x` within `arr`.
Community Examples

spork/misc/caperr macro source
(caperr & body)
+present. This is the correct insert index for `x` within `arr`.

spork/misc/caperr macro source
(caperr & body)
 
 Captures the standart error output of the variadic `body` and returns it
-as a buffer.
Community Examples

spork/misc/capout macro source
(capout & body)
+as a buffer.

spork/misc/capout macro source
(capout & body)
 
 Captures the standart output of the variadic `body` and returns it as
-a buffer.
Community Examples

spork/misc/cond-> macro source
(cond-> val & clauses)
+a buffer.

spork/misc/cond-> macro source
(cond-> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs with condition and operation to which the `val`,
 is put as first argument. All conditions are tried and
 for truthy conditions the operation is executed.
-Returns the value mutated if any condition is truthy.
Community Examples

spork/misc/cond->> macro source
(cond->> val & clauses)
+Returns the value mutated if any condition is truthy.

spork/misc/cond->> macro source
(cond->> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs of condition and operation to which the `val`,
 is put as last argument. All conditions are tried and
 for truthy the operation is ran.
-Returns mutated value if any condition is truthy.
Community Examples

spork/misc/dedent function source
(dedent & xs)
+Returns mutated value if any condition is truthy.

spork/misc/dedent function source
(dedent & xs)
 
 Remove indentation after concatenating the arguments. Works by removing
 leading whitespace, and then removing that same pattern of whitepsace after
-new lines.
Community Examples

spork/misc/defs macro source
(defs & bindings)
+new lines.

spork/misc/defs macro source
(defs & bindings)
 
-Defines many constants as in let `bindings`, but without creating new scope.
Community Examples

spork/misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
+Defines many constants as in let `bindings`, but without creating new scope.

spork/misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
 
 Do a depth first, pre-order traversal over a data structure.
 Also allow for callbacks before and after visiting the children
 of a node. Also allow for a custom `get-children` function to
 change traversal as needed. Will detect cycles if an empty table
 is passed as the `seen` parameter, which is used to cached values
-that have been visited.
Community Examples

spork/misc/do-def macro source
(do-def c d & body)
+that have been visited.

spork/misc/do-def macro source
(do-def c d & body)
 
 Convenience macro for defining constant named `c` with value `d` before `body`
 and returning it after evaluating `body`, that presumably modifies
-the `c` refered content. For example buffer, table or array.
Community Examples

spork/misc/do-var macro source
(do-var v d & body)
+the `c` refered content. For example buffer, table or array.

spork/misc/do-var macro source
(do-var v d & body)
 
 Convenience macro for defining varible named `v` with value `d` before `body`
-and returning it after evaluating `body`, that presumably modifies `v`.
Community Examples

spork/misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
+and returning it after evaluating `body`, that presumably modifies `v`.

spork/misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
 
-Same as print-table but pushes table into a buffer.
Community Examples

spork/misc/gett macro source
(gett ds & keys)
+Same as print-table but pushes table into a buffer.

spork/misc/gett macro source
(gett ds & keys)
 
-Recursive macro (get). Similar to get-in, but keys are variadic argument.
Community Examples

spork/misc/insert-sorted function source
(insert-sorted arr <? & xs)
+Recursive macro (get). Similar to get-in, but keys are variadic argument.

spork/misc/insert-sorted function source
(insert-sorted arr <? & xs)
 
 Insert elements in `arr` such that it remains sorted by the comparator. If
-`arr` is not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

spork/misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
+`arr` is not sorted beforehand, the results are undefined. Returns `arr`.

spork/misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
 
 Insert elements in `arr` such that it remains sorted by the value returned
 when `f` is called with the element, comparing the values with `<`. If `arr` is
-not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

spork/misc/int->string function source
(int->string int &opt base)
+not sorted beforehand, the results are undefined. Returns `arr`.

spork/misc/int->string function source
(int->string int &opt base)
 
-Stringify an integer in a particular base. Defaults to decimal (base 10).
Community Examples

spork/misc/int/ function source
(int/ & xs)
+Stringify an integer in a particular base. Defaults to decimal (base 10).

spork/misc/int/ function source
(int/ & xs)
 
-Perform integer division.
Community Examples

spork/misc/log macro source
(log level & args)
+Perform integer division.

spork/misc/log macro source
(log level & args)
 
 Print to a dynamic binding stream if that stream is set, otherwise do
 nothing. Evaluate to nil.
 For example, `(log :err "value error: %V" my-value)` will print
-to `(dyn :err)` only if `(dyn :err)` has been set.
Community Examples

spork/misc/make macro source
(make prototype & pairs)
+to `(dyn :err)` only if `(dyn :err)` has been set.

spork/misc/make macro source
(make prototype & pairs)
 
 Convenience macro for creating new table from even number of kvs pairs in a variadic `table-or-pairs`
 arguments and setting its prototype to `prototype`.
-Factory function for creating new objects from prototypes.
Community Examples

spork/misc/make-id function source
(make-id &opt prefix)
+Factory function for creating new objects from prototypes.

spork/misc/make-id function source
(make-id &opt prefix)
 
 Create a random, printable keyword id with 10 bytes of entropy
-with an optional prefix.
Community Examples

spork/misc/map-keys function source
(map-keys f data)
+with an optional prefix.

spork/misc/map-keys function source
(map-keys f data)
 
 Returns new table with function `f` applied to `data`'s
-keys recursively.
Community Examples

spork/misc/map-keys-flat function source
(map-keys-flat f data)
+keys recursively.

spork/misc/map-keys-flat function source
(map-keys-flat f data)
 
 Returns new table with function `f` applied to `data`'s
-keys without recursing.
Community Examples

spork/misc/map-vals function source
(map-vals f data)
+keys without recursing.

spork/misc/map-vals function source
(map-vals f data)
 
-Returns new table with function `f` applied to `data`'s values.
Community Examples

spork/misc/merge-sorted function source
(merge-sorted a b &opt <?)
+Returns new table with function `f` applied to `data`'s values.

spork/misc/merge-sorted function source
(merge-sorted a b &opt <?)
 
 Merges two sorted arrays so that the result remains sorted, using an optional comparator.
-If no comparator is given, `<` is used.
Community Examples

spork/misc/merge-sorted-by function source
(merge-sorted-by a b f)
+If no comparator is given, `<` is used.

spork/misc/merge-sorted-by function source
(merge-sorted-by a b f)
 
 Merges two sorted arrays so that result remains sorted when `f` is called on each element,
-comparing the values with `<`.
Community Examples

spork/misc/penultimate function source
(penultimate xs)
+comparing the values with `<`.

spork/misc/penultimate function source
(penultimate xs)
 
-Get the second-to-last element from an indexed data structure.
Community Examples

spork/misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
+Get the second-to-last element from an indexed data structure.

spork/misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
 
 Iterate through the rows of a data structure and print a table in a human
 readable way, with padding and heading information. Can optionally provide
@@ -417,315 +417,315 @@ 

Spork

for each row. Lastly, a `header-mapping` dictionary can be provided that changes the printed header names by mapping column keys to the desired header name. If no mapping is found, then the column key will be used as -the header name. Returns nil.
Community Examples

spork/misc/randomize-array function source
(randomize-array arr &opt rng)
+the header name. Returns nil.

spork/misc/randomize-array function source
(randomize-array arr &opt rng)
 
 Randomizes array using the fisher-yates shuffle, takes an optional random
-number generator.
Community Examples

spork/misc/second function source
(second xs)
+number generator.

spork/misc/second function source
(second xs)
 
-Get the second element from an indexed data structure.
Community Examples

spork/misc/select-keys function source
(select-keys data keyz)
+Get the second element from an indexed data structure.

spork/misc/select-keys function source
(select-keys data keyz)
 
-Returns new table with selected `keyz` from dictionary `data`.
Community Examples

spork/misc/set* macro source
(set* tgts exprs)
+Returns new table with selected `keyz` from dictionary `data`.

spork/misc/set* macro source
(set* tgts exprs)
 
 Parallel `set` function. Takes a list of targets and
 expressions, evaluates all the expressions, and then
 assigns them to the targets. Each target can be a variable
-or a 2-tuple, just like in the normal `set` special form.
Community Examples

spork/misc/string->int function source
(string->int str &opt base)
+or a 2-tuple, just like in the normal `set` special form.

spork/misc/string->int function source
(string->int str &opt base)
 
 Parse an integer in the given base. Defaults to decimal (base 10). Differs
-from scan-number in that this does not recognize floating point notation.
Community Examples

spork/misc/table-filter function source
(table-filter pred dict)
+from scan-number in that this does not recognize floating point notation.

spork/misc/table-filter function source
(table-filter pred dict)
 
 Filter a key-value structure info a table. Semantics are the same as for
 built-in `filter`, except that `pred` takes two arguments (key and value.)
-Does not consider prototypes.
Community Examples

spork/misc/third function source
(third xs)
+Does not consider prototypes.

spork/misc/third function source
(third xs)
 
-Get the third element from an indexed data structure.
Community Examples

spork/misc/trim-prefix function source
(trim-prefix prefix str)
+Get the third element from an indexed data structure.

spork/misc/trim-prefix function source
(trim-prefix prefix str)
 
-Trim the specified prefix of a string if it has one
Community Examples

spork/misc/trim-suffix function source
(trim-suffix suffix str)
+Trim the specified prefix of a string if it has one

spork/misc/trim-suffix function source
(trim-suffix suffix str)
 
-Trim the specified suffix of a string if it has one
Community Examples

spork/misc/until macro source
(until cnd & body)
+Trim the specified suffix of a string if it has one

spork/misc/until macro source
(until cnd & body)
 
 Repeat `body` while the `cnd` is false.
-Equivalent to (while (not cnd) ;body).
Community Examples

spork/misc/vars macro source
(vars & bindings)
+Equivalent to (while (not cnd) ;body).

spork/misc/vars macro source
(vars & bindings)
 
-Defines many variables as in let `bindings`, but without creating new scope.
Community Examples

spork/msg/make-proto function source
(make-proto stream &opt pack unpack)
+Defines many variables as in let `bindings`, but without creating new scope.

spork/msg/make-proto function source
(make-proto stream &opt pack unpack)
 
-Create both a send an recv function from a stream, as with `make-send` and `make-recv`.
Community Examples

spork/msg/make-recv function source
(make-recv stream &opt unpack)
+Create both a send an recv function from a stream, as with `make-send` and `make-recv`.

spork/msg/make-recv function source
(make-recv stream &opt unpack)
 
-Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.
Community Examples

spork/msg/make-send function source
(make-send stream &opt pack)
+Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.

spork/msg/make-send function source
(make-send stream &opt pack)
 
-Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Community Examples

spork/netrepl/client function source
(client &opt host port name)
+Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.

spork/netrepl/client function source
(client &opt host port name)
 
-Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".
Community Examples

spork/netrepl/default-host string source
Default host to run server on and connect to.
Community Examples

spork/netrepl/default-port string source
Default port to run the net repl.
Community Examples

spork/netrepl/server function source
(server &opt host port env cleanup welcome-msg)
+Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".

spork/netrepl/default-host string source
Default host to run server on and connect to.

spork/netrepl/default-port string source
Default port to run the net repl.

spork/netrepl/server function source
(server &opt host port env cleanup welcome-msg)
 
-Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.
Community Examples

spork/netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
+Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.

spork/netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
 
-Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Community Examples

spork/path/abspath function source
(posix/abspath path)
+Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.

spork/path/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

spork/path/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/basename function source
(posix/basename path)
+Check if a path is absolute.

spork/path/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/delim string source
Platform delimiter
Community Examples

spork/path/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

spork/path/delim string source
Platform delimiter

spork/path/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/join function source
(posix/join & els)
+Get the file extension for a path.

spork/path/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

spork/path/normalize function source
(posix/normalize path)
+Join path elements together.

spork/path/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/posix/abspath function source
(posix/abspath path)
+Split a path into its parts.

spork/path/posix/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/posix/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

spork/path/posix/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/posix/basename function source
(posix/basename path)
+Check if a path is absolute.

spork/path/posix/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/posix/delim string source
Platform delimiter
Community Examples

spork/path/posix/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

spork/path/posix/delim string source
Platform delimiter

spork/path/posix/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/posix/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/posix/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/posix/join function source
(posix/join & els)
+Get the file extension for a path.

spork/path/posix/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

spork/path/posix/normalize function source
(posix/normalize path)
+Join path elements together.

spork/path/posix/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/posix/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/posix/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/posix/relpath function source
(posix/relpath source target)
+Split a path into its parts.

spork/path/posix/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/posix/sep string source
Platform separator
Community Examples

spork/path/relpath function source
(posix/relpath source target)
+Get the relative path between two subpaths.

spork/path/posix/sep string source
Platform separator

spork/path/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/sep string source
Platform separator
Community Examples

spork/path/win32/abspath function source
(win32/abspath path)
+Get the relative path between two subpaths.

spork/path/sep string source
Platform separator

spork/path/win32/abspath function source
(win32/abspath path)
 
-Coerce a path to be absolute.
Community Examples

spork/path/win32/abspath? function source
(win32/abspath? path)
+Coerce a path to be absolute.

spork/path/win32/abspath? function source
(win32/abspath? path)
 
-Check if a path is absolute.
Community Examples

spork/path/win32/basename function source
(win32/basename path)
+Check if a path is absolute.

spork/path/win32/basename function source
(win32/basename path)
 
-Gets the base file name of a path.
Community Examples

spork/path/win32/delim string source
Platform delimiter
Community Examples

spork/path/win32/dirname function source
(win32/dirname path)
+Gets the base file name of a path.

spork/path/win32/delim string source
Platform delimiter

spork/path/win32/dirname function source
(win32/dirname path)
 
-Gets the directory name of a path.
Community Examples

spork/path/win32/ext function source
(ext path)
+Gets the directory name of a path.

spork/path/win32/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

spork/path/win32/join function source
(win32/join & els)
+Get the file extension for a path.

spork/path/win32/join function source
(win32/join & els)
 
-Join path elements together.
Community Examples

spork/path/win32/normalize function source
(win32/normalize path)
+Join path elements together.

spork/path/win32/normalize function source
(win32/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

spork/path/win32/parts function source
(win32/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

spork/path/win32/parts function source
(win32/parts path)
 
-Split a path into its parts.
Community Examples

spork/path/win32/relpath function source
(win32/relpath source target)
+Split a path into its parts.

spork/path/win32/relpath function source
(win32/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

spork/path/win32/sep string source
Platform separator
Community Examples

spork/rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
+Get the relative path between two subpaths.

spork/path/win32/sep string source
Platform separator

spork/rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
 
-Begin raw terminal functionality. Return a stream that can be read from to get input.
Community Examples

spork/rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
+Begin raw terminal functionality. Return a stream that can be read from to get input.

spork/rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
 
-Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.
Community Examples

spork/rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
+Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.

spork/rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
 
-A handler that a user can use to handle ctrl-z from input to suspend the current process.
Community Examples

spork/rawterm/end cfunction source
(rawterm/end)
+A handler that a user can use to handle ctrl-z from input to suspend the current process.

spork/rawterm/end cfunction source
(rawterm/end)
 
-End raw terminal functionality.
Community Examples

spork/rawterm/getch cfunction source
(rawterm/getch &opt into)
+End raw terminal functionality.

spork/rawterm/getch cfunction source
(rawterm/getch &opt into)
 
-Get a byte of input from stdin, without blocking if possible. Returns a buffer.
Community Examples

spork/rawterm/isatty cfunction source
(rawterm/isatty)
+Get a byte of input from stdin, without blocking if possible. Returns a buffer.

spork/rawterm/isatty cfunction source
(rawterm/isatty)
 
-Check if the current stdin is a tty.
Community Examples

spork/rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
+Check if the current stdin is a tty.

spork/rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
 
-Measure the monospace width of a string.
Community Examples

spork/rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
+Measure the monospace width of a string.

spork/rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
 
-Get the monospace width of a rune. Returns either 0, 1, or 2.
Community Examples

spork/rawterm/size cfunction source
(rawterm/size)
+Get the monospace width of a rune. Returns either 0, 1, or 2.

spork/rawterm/size cfunction source
(rawterm/size)
 
-Get the number of rows and columns visible in the terminal as tuple [rows cols]
Community Examples

spork/rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
+Get the number of rows and columns visible in the terminal as tuple [rows cols]

spork/rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
 
-Get a byte slice that will fit into a number of columns.
Community Examples

spork/regex/compile function source
(compile pattern)
+Get a byte slice that will fit into a number of columns.

spork/regex/compile function source
(compile pattern)
 
-Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.
Community Examples

spork/regex/find function source
(find reg text &opt start)
+Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.

spork/regex/find function source
(find reg text &opt start)
 
-Similar to peg/find, but for regexes.
Community Examples

spork/regex/find-all function source
(find-all reg text &opt start)
+Similar to peg/find, but for regexes.

spork/regex/find-all function source
(find-all reg text &opt start)
 
-Similar to peg/find-all, but for regexes.
Community Examples

spork/regex/match function source
(match reg text &opt start)
+Similar to peg/find-all, but for regexes.

spork/regex/match function source
(match reg text &opt start)
 
-Similar to peg/match, but for regexes.
Community Examples

spork/regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.
Community Examples

spork/regex/replace function source
(replace reg rep text &opt start)
+Similar to peg/match, but for regexes.

spork/regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.

spork/regex/replace function source
(replace reg rep text &opt start)
 
-Similar to peg/replace, but for regexes.
Community Examples

spork/regex/replace-all function source
(replace-all reg rep text &opt start)
+Similar to peg/replace, but for regexes.

spork/regex/replace-all function source
(replace-all reg rep text &opt start)
 
-Similar to peg/replace-all, but for regexes.
Community Examples

spork/regex/source function source
(source pattern)
+Similar to peg/replace-all, but for regexes.

spork/regex/source function source
(source pattern)
 
-Compile a subset of regex to PEG source code.
Community Examples

spork/rpc/client function source
(client &opt host port name)
+Compile a subset of regex to PEG source code.

spork/rpc/client function source
(client &opt host port name)
 
-Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.
Community Examples

spork/rpc/default-host string source
Default host to run server on and connect to.
Community Examples

spork/rpc/default-port string source
Default port to run the net repl.
Community Examples

spork/rpc/server function source
(server functions &opt host port workers-per-connection)
+Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.

spork/rpc/default-host string source
Default host to run server on and connect to.

spork/rpc/default-port string source
Default port to run the net repl.

spork/rpc/server function source
(server functions &opt host port workers-per-connection)
 
-Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Community Examples

spork/schema/make-predicate function source
(make-predicate schema)
+Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.

spork/schema/make-predicate function source
(make-predicate schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `predicate`.
Community Examples

spork/schema/make-validator function source
(make-validator schema)
+Generate a function that can be used to validate a data structure. This is the function form of `predicate`.

spork/schema/make-validator function source
(make-validator schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `validator`.
Community Examples

spork/schema/predicate macro source
(predicate pattern)
+Generate a function that can be used to validate a data structure. This is the function form of `validator`.

spork/schema/predicate macro source
(predicate pattern)
 
-Make a validation predicate given a certain schema.
Community Examples

spork/schema/validator macro source
(validator pattern)
+Make a validation predicate given a certain schema.

spork/schema/validator macro source
(validator pattern)
 
-Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Community Examples

spork/services/*current-manager* keyword source
The currently running service manager, if there is one
Community Examples

spork/services/*current-service* keyword source
The currently running service, if there is one
Community Examples

spork/services/add-service function source
(add-service service-name main-function & args)
+Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.

spork/services/*current-manager* keyword source
The currently running service manager, if there is one

spork/services/*current-service* keyword source
The currently running service, if there is one

spork/services/add-service function source
(add-service service-name main-function & args)
 
-Spawn a service
Community Examples

spork/services/all-services function source
(all-services)
+Spawn a service

spork/services/all-services function source
(all-services)
 
-Get a list of running services
Community Examples

spork/services/get-manager function source
(get-manager)
+Get a list of running services

spork/services/get-manager function source
(get-manager)
 
-Get the current manager. If no manager exists, create one.
Community Examples

spork/services/get-service function source
(get-service)
+Get the current manager. If no manager exists, create one.

spork/services/get-service function source
(get-service)
 
-Get the current service. If not in a service, raise an error
Community Examples

spork/services/make-manager function source
(make-manager &opt log-dir)
+Get the current service. If not in a service, raise an error

spork/services/make-manager function source
(make-manager &opt log-dir)
 
-Group a number of fibers into a single object for structured concurrency. Also includes utilities for running services like servers in the background.
Community Examples

spork/services/print-all function source
(print-all &opt filter-fn)
+Group a number of fibers into a single object for structured concurrency. Also includes utilities for running services like servers in the background.

spork/services/print-all function source
(print-all &opt filter-fn)
 
-Print a table of all running services.
Community Examples

spork/services/remove-service function source
(remove-service service-name)
+Print a table of all running services.

spork/services/remove-service function source
(remove-service service-name)
 
-Remove a service
Community Examples

spork/services/set-title function source
(set-title title)
+Remove a service

spork/services/set-title function source
(set-title title)
 
-Set a textual description of the service to describe what it is doing currently
Community Examples

spork/services/start-service function source
(start-service service-name)
+Set a textual description of the service to describe what it is doing currently

spork/services/start-service function source
(start-service service-name)
 
-Start or restart a service
Community Examples

spork/services/stop-service function source
(stop-service service-name &opt reason)
+Start or restart a service

spork/services/stop-service function source
(stop-service service-name &opt reason)
 
-Stop a running service
Community Examples

spork/services/wait function source
(wait)
+Stop a running service

spork/services/wait function source
(wait)
 
-Once a number of services have been spawned, call `wait` to block the fiber until the manager is canceled. This lets a manager fiber behave as a service itself.
Community Examples

spork/sh/copy function source
(copy src dest)
+Once a number of services have been spawned, call `wait` to block the fiber until the manager is canceled. This lets a manager fiber behave as a service itself.

spork/sh/copy function source
(copy src dest)
 
 Copy a file or directory recursively from one location to another.
-Expects input to be unix style paths
Community Examples

spork/sh/copy-file function source
(copy-file src-path dst-path)
+Expects input to be unix style paths

spork/sh/copy-file function source
(copy-file src-path dst-path)
 
-Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.
Community Examples

spork/sh/create-dirs function source
(create-dirs dir-path)
+Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.

spork/sh/create-dirs function source
(create-dirs dir-path)
 
-Create all directories in path specified as string including itself.
Community Examples

spork/sh/devnull function source
(devnull)
+Create all directories in path specified as string including itself.

spork/sh/devnull function source
(devnull)
 
-get the /dev/null equivalent of the current platform as an open file
Community Examples

spork/sh/escape function source
(escape & args)
+get the /dev/null equivalent of the current platform as an open file

spork/sh/escape function source
(escape & args)
 
-Output a string with all arguments correctly quoted
Community Examples

spork/sh/exec function source
(exec & args)
+Output a string with all arguments correctly quoted

spork/sh/exec function source
(exec & args)
 
-Execute command specified by args returning it's exit code
Community Examples

spork/sh/exec-fail function source
(exec-fail & args)
+Execute command specified by args returning it's exit code

spork/sh/exec-fail function source
(exec-fail & args)
 
-Execute command specified by args, fails when command exits with non-zero exit code
Community Examples

spork/sh/exec-slurp function source
(exec-slurp & args)
+Execute command specified by args, fails when command exits with non-zero exit code

spork/sh/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of command specified by args and return it trimmed in a string.
Community Examples

spork/sh/exec-slurp-all function source
(exec-slurp-all & args)
+Read stdout of command specified by args and return it trimmed in a string.

spork/sh/exec-slurp-all function source
(exec-slurp-all & args)
 
 Read stdout and stderr of subprocess and return it trimmed in a struct with :err and :out containing the output as string.
-This will also return the exit code under the :status key.
Community Examples

spork/sh/exists? function source
(exists? path)
+This will also return the exit code under the :status key.

spork/sh/exists? function source
(exists? path)
 
-Check if the given file or directory exists. (Follows symlinks)
Community Examples

spork/sh/list-all-files function source
(list-all-files dir &opt into)
+Check if the given file or directory exists. (Follows symlinks)

spork/sh/list-all-files function source
(list-all-files dir &opt into)
 
-List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.
Community Examples

spork/sh/make-new-file function source
(make-new-file file-path &opt mode)
+List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.

spork/sh/make-new-file function source
(make-new-file file-path &opt mode)
 
-Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).
Community Examples

spork/sh/rm function source
(rm path)
+Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).

spork/sh/rm function source
(rm path)
 
-Remove a directory and all sub directories recursively.
Community Examples

spork/sh/scan-directory function source
(scan-directory dir func)
+Remove a directory and all sub directories recursively.

spork/sh/scan-directory function source
(scan-directory dir func)
 
-Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.
Community Examples

spork/sh/split function source
(split s)
+Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.

spork/sh/split function source
(split s)
 
-Split a string into 'sh like' tokens, returns nil if unable to parse the string.
Community Examples

spork/tarray/buffer cfunction
(tarray/buffer array|size)
+Split a string into 'sh like' tokens, returns nil if unable to parse the string.

spork/tarray/buffer cfunction
(tarray/buffer array|size)
 
-Return typed array buffer or create a new buffer.
Community Examples

spork/tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
+Return typed array buffer or create a new buffer.

spork/tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
 
-Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.
Community Examples

spork/tarray/length cfunction
(tarray/length array|buffer)
+Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.

spork/tarray/length cfunction
(tarray/length array|buffer)
 
-Return typed array or buffer size.
Community Examples

spork/tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
+Return typed array or buffer size.

spork/tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
 
-Create new typed array.
Community Examples

spork/tarray/properties cfunction
(tarray/properties array)
+Create new typed array.

spork/tarray/properties cfunction
(tarray/properties array)
 
-Return typed array properties as a struct.
Community Examples

spork/tarray/slice cfunction
(tarray/slice tarr &opt start end)
+Return typed array properties as a struct.

spork/tarray/slice cfunction
(tarray/slice tarr &opt start end)
 
-Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.
Community Examples

spork/tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
+Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.

spork/tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
 
-Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Community Examples

spork/tasker/all-tasks function source
(all-tasks tasker &opt detailed)
+Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.

spork/tasker/all-tasks function source
(all-tasks tasker &opt detailed)
 
-Get an array of all task ids for which there is still data on disk. If `detailed` is truthy, return full task metadata instead of ids.
Community Examples

spork/tasker/cancel-task function source
(cancel-task tasker task-id)
+Get an array of all task ids for which there is still data on disk. If `detailed` is truthy, return full task metadata instead of ids.

spork/tasker/cancel-task function source
(cancel-task tasker task-id)
 
-Cancel a queued or running task.
Community Examples

spork/tasker/close-queues function source
(close-queues tasker)
+Cancel a queued or running task.

spork/tasker/close-queues function source
(close-queues tasker)
 
-Prevent any tasks from being added to queues. When an executor finishes it's current job, if there are any, it will terminate. When all executors complete, the call to `run-executors` will complete.
Community Examples

spork/tasker/default-expiration number source
Default expiration time (1 day)
Community Examples

spork/tasker/default-priority number source
Default task priority
Community Examples

spork/tasker/default-task-directory string source
Default location of task records
Community Examples

spork/tasker/err-file-name string source
Name of the file for logging errors
Community Examples

spork/tasker/max-priority number source
Maximum allowed priority (lower priority tasks will execute first)
Community Examples

spork/tasker/min-priority number source
Minimum allowed priority (lower priority tasks will execute first)
Community Examples

spork/tasker/new-tasker function source
(new-tasker &opt task-directory queues queue-size)
+Prevent any tasks from being added to queues. When an executor finishes it's current job, if there are any, it will terminate. When all executors complete, the call to `run-executors` will complete.

spork/tasker/default-expiration number source
Default expiration time (1 day)

spork/tasker/default-priority number source
Default task priority

spork/tasker/default-task-directory string source
Default location of task records

spork/tasker/err-file-name string source
Name of the file for logging errors

spork/tasker/max-priority number source
Maximum allowed priority (lower priority tasks will execute first)

spork/tasker/min-priority number source
Minimum allowed priority (lower priority tasks will execute first)

spork/tasker/new-tasker function source
(new-tasker &opt task-directory queues queue-size)
 
-Create queues and various settings to run tasks. Create a new tasker table.
Community Examples

spork/tasker/out-file-name string source
Name of the file for general logging
Community Examples

spork/tasker/queue-task function source
(queue-task tasker argv &opt note priority qname timeout expiration input)
+Create queues and various settings to run tasks. Create a new tasker table.

spork/tasker/out-file-name string source
Name of the file for general logging

spork/tasker/queue-task function source
(queue-task tasker argv &opt note priority qname timeout expiration input)
 
-Add a task specification to a queue. Supply an argv string array that will be used to invoke s a subprocess. The optional `note` parameter is just a textual note for task trackingv. The `priority` parameter should be an integer between 0 and 9 inclusive, default is 4. Lower priority jobs in the same queue will be executed by higher priority. Use input to pass in generic, unstructured input to a task.
Community Examples

spork/tasker/run-cleanup function source
(run-cleanup tasker)
+Add a task specification to a queue. Supply an argv string array that will be used to invoke s a subprocess. The optional `note` parameter is just a textual note for task trackingv. The `priority` parameter should be an integer between 0 and 9 inclusive, default is 4. Lower priority jobs in the same queue will be executed by higher priority. Use input to pass in generic, unstructured input to a task.

spork/tasker/run-cleanup function source
(run-cleanup tasker)
 
-Delete old expired jobs saved on disk
Community Examples

spork/tasker/run-executors function source
(run-executors tasker &opt workers-per-queue pre-task post-task)
+Delete old expired jobs saved on disk

spork/tasker/run-executors function source
(run-executors tasker &opt workers-per-queue pre-task post-task)
 
-Start a number of executors to run tasks as with `tasker/spawn-executors`, and then wait for all executors to complete.
Community Examples

spork/tasker/spawn-executors function source
(spawn-executors tasker &opt qnames workers-per-queue pre-task post-task)
+Start a number of executors to run tasks as with `tasker/spawn-executors`, and then wait for all executors to complete.

spork/tasker/spawn-executors function source
(spawn-executors tasker &opt qnames workers-per-queue pre-task post-task)
 
-Start a number of executors to run tasks. Tasks can be added to a queue by calling queue-task. A single tasker object can make multiple calls to spawn-executors.
Community Examples

spork/tasker/statuses tuple source
A tuple of all possible statuses that a task can have.
Community Examples

spork/tasker/task-file function source
(task-file tasker task-id &opt file-name)
+Start a number of executors to run tasks. Tasks can be added to a queue by calling queue-task. A single tasker object can make multiple calls to spawn-executors.

spork/tasker/statuses tuple source
A tuple of all possible statuses that a task can have.

spork/tasker/task-file function source
(task-file tasker task-id &opt file-name)
 
-Get a log file for a path. By default, will get a path to out.log.
Community Examples

spork/tasker/task-meta-name string source
Name of the task metadata file
Community Examples

spork/tasker/task-status function source
(task-status tasker task-id)
+Get a log file for a path. By default, will get a path to out.log.

spork/tasker/task-meta-name string source
Name of the task metadata file

spork/tasker/task-status function source
(task-status tasker task-id)
 
-Look up the status of a given task by id.
Community Examples

spork/temple/add-loader function source
(add-loader)
+Look up the status of a given task by id.

spork/temple/add-loader function source
(add-loader)
 
-Adds the custom template loader to Janet's module/loaders and update module/paths.
Community Examples

spork/temple/base-env table source
Base environment for rendering
Community Examples

spork/temple/compile function source
(compile str)
+Adds the custom template loader to Janet's module/loaders and update module/paths.

spork/temple/base-env table source
Base environment for rendering

spork/temple/compile function source
(compile str)
 
 Compile a Temple template into a function which will return a
 rendered buffer.
 
 The resulting function should receive the template arguments in the
-&keys format.
Community Examples

spork/temple/create function source
(create source &opt where)
+&keys format.

spork/temple/create function source
(create source &opt where)
 
-Compile a template string into a function. Optionally provide a location where the source is from to improve debugging. Returns the template function.
Community Examples

spork/test/assert macro source
(assert x &opt e)
+Compile a template string into a function. Optionally provide a location where the source is from to improve debugging. Returns the template function.

spork/test/assert macro source
(assert x &opt e)
 
-Override's the default assert with some nice error handling.
Community Examples

spork/test/assert-docs function source
(assert-docs path)
+Override's the default assert with some nice error handling.

spork/test/assert-docs function source
(assert-docs path)
 
 Assert that all symbols, when module on the path is required,
-have proper doc string
Community Examples

spork/test/assert-error macro source
(assert-error msg & forms)
+have proper doc string

spork/test/assert-error macro source
(assert-error msg & forms)
 
-Test passes if forms error.
Community Examples

spork/test/assert-no-error macro source
(assert-no-error msg & forms)
+Test passes if forms error.

spork/test/assert-no-error macro source
(assert-no-error msg & forms)
 
-Test passes if forms do not error.
Community Examples

spork/test/assert-not macro source
(assert-not x &opt e)
+Test passes if forms do not error.

spork/test/assert-not macro source
(assert-not x &opt e)
 
-Invert assert.
Community Examples

spork/test/capture-stderr macro source
(capture-stderr & body)
+Invert assert.

spork/test/capture-stderr macro source
(capture-stderr & body)
 
 Runs the form and captures stderr. Returns tuple with result of the form
-and a string with captured stderr.
Community Examples

spork/test/capture-stdout macro source
(capture-stdout & body)
+and a string with captured stderr.

spork/test/capture-stdout macro source
(capture-stdout & body)
 
 Runs the form and captures stdout. Returns tuple with result of the form
-and a string with captured stdout.
Community Examples

spork/test/end-suite function source
(end-suite)
+and a string with captured stdout.

spork/test/end-suite function source
(end-suite)
 
-Ends test suite, prints summary and exits if any have failed.
Community Examples

spork/test/start-suite function source
(start-suite &opt name)
+Ends test suite, prints summary and exits if any have failed.

spork/test/start-suite function source
(start-suite &opt name)
 
-Starts test suite.
Community Examples

spork/test/suppress-stderr macro source
(suppress-stderr & body)
+Starts test suite.

spork/test/suppress-stderr macro source
(suppress-stderr & body)
 
-Suppreses stdout from the body
Community Examples

spork/test/suppress-stdout macro source
(suppress-stdout & body)
+Suppreses stdout from the body

spork/test/suppress-stdout macro source
(suppress-stdout & body)
 
-Suppreses stdout from the body
Community Examples

spork/test/timeit macro source
(timeit form &opt tag)
+Suppreses stdout from the body

spork/test/timeit macro source
(timeit form &opt tag)
 
 Time the execution of `form` using `os/clock` before and after,
 and print the result to stdout. returns: result of executing `form`.
-Uses `tag` (default "Elapsed time:") to tag the printout.
Community Examples

spork/test/timeit-loop macro source
(timeit-loop head & body)
+Uses `tag` (default "Elapsed time:") to tag the printout.

spork/test/timeit-loop macro source
(timeit-loop head & body)
 
 Similar to `loop`, but outputs performance statistics after completion.
 Additionally defines a `:timeout` verb to iterate continuously for a given
 number of seconds. If the first form of `body` is a bytes, it will be taken
-as a custom tag.
Community Examples

spork/utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
+as a custom tag.

spork/utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
 
-Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].
Community Examples

spork/utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
+Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].

spork/utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
 
-Encode a Unicode codepoint into the end of a buffer.
Community Examples

spork/utf8/prefix->width cfunction source
(utf8/prefix->width c)
+Encode a Unicode codepoint into the end of a buffer.

spork/utf8/prefix->width cfunction source
(utf8/prefix->width c)
 
-Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Community Examples

spork/zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
+Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.

spork/zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
 
-Add a byte sequence to the zip writer.
Community Examples

spork/zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
+Add a byte sequence to the zip writer.

spork/zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
 
-Add a file to the zip writer.
Community Examples

spork/zip/compress cfunction source
(zip/compress bytes &opt level into)
+Add a file to the zip writer.

spork/zip/compress cfunction source
(zip/compress bytes &opt level into)
 
-Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.
Community Examples

spork/zip/decompress cfunction source
(zip/decompress bytes &opt into)
+Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.

spork/zip/decompress cfunction source
(zip/decompress bytes &opt into)
 
-Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.
Community Examples

spork/zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
+Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.

spork/zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
 
-Extract a file from the zip archive, either to memory or to a file on disk.
Community Examples

spork/zip/file-directory? cfunction source
(zip/file-directory? reader idx)
+Extract a file from the zip archive, either to memory or to a file on disk.

spork/zip/file-directory? cfunction source
(zip/file-directory? reader idx)
 
-Check if a file index is a directory.
Community Examples

spork/zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
+Check if a file index is a directory.

spork/zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
 
-Check if a file is encrypted inside an archive.
Community Examples

spork/zip/file-supported? cfunction source
(zip/file-supported? reader idx)
+Check if a file is encrypted inside an archive.

spork/zip/file-supported? cfunction source
(zip/file-supported? reader idx)
 
-Check if a file is supported with this verstion of miniz.
Community Examples

spork/zip/get-filename cfunction source
(zip/get-filename reader idx)
+Check if a file is supported with this verstion of miniz.

spork/zip/get-filename cfunction source
(zip/get-filename reader idx)
 
-Convert a file index index in the archive to a filename.
Community Examples

spork/zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
+Convert a file index index in the archive to a filename.

spork/zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
 
-Get the index of a particular filename in the archive.
Community Examples

spork/zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
+Get the index of a particular filename in the archive.

spork/zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
 
-Read a byte sequence as a zip archive. Returns a new zip reader.
Community Examples

spork/zip/read-file cfunction source
(zip/read-file filename &opt flags)
+Read a byte sequence as a zip archive. Returns a new zip reader.

spork/zip/read-file cfunction source
(zip/read-file filename &opt flags)
 
-Read a file as a zip archive. Returns a new zip reader.
Community Examples

spork/zip/reader-close cfunction source
(zip/reader-close reader)
+Read a file as a zip archive. Returns a new zip reader.

spork/zip/reader-close cfunction source
(zip/reader-close reader)
 
-Close a reader and free related memory.
Community Examples

spork/zip/reader-count cfunction source
(zip/reader-count reader)
+Close a reader and free related memory.

spork/zip/reader-count cfunction source
(zip/reader-count reader)
 
-Get the number of files inside the zip archive. The files can be indexed 
Community Examples

spork/zip/stat cfunction source
(zip/stat reader idx)
+Get the number of files inside the zip archive. The files can be indexed 

spork/zip/stat cfunction source
(zip/stat reader idx)
 
 Get stat information of file. Returns a new struct with the following fields:
 
@@ -742,17 +742,17 @@ 

Spork

* :comment * :internal-attr * :external-attr -
Community Examples

spork/zip/version cfunction source
(zip/version)
+

spork/zip/version cfunction source
(zip/version)
 
-Get the version string of the underlying miniz library.
Community Examples

spork/zip/write-buffer cfunction source
(zip/write-buffer)
+Get the version string of the underlying miniz library.

spork/zip/write-buffer cfunction source
(zip/write-buffer)
 
-Create a new zip archive writer that write to memory.
Community Examples

spork/zip/write-file cfunction source
(zip/write-file dest-path)
+Create a new zip archive writer that write to memory.

spork/zip/write-file cfunction source
(zip/write-file dest-path)
 
-Create a new zip archive writer that will write into an archive file.
Community Examples

spork/zip/writer-close cfunction source
(zip/writer-close writer)
+Create a new zip archive writer that will write into an archive file.

spork/zip/writer-close cfunction source
(zip/writer-close writer)
 
-Close a ZipWriter.
Community Examples

spork/zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
+Close a ZipWriter.

spork/zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
 
-Finalize a writer, writing any zip files to disk. Return the writer.
Community Examples
+Finalize a writer, writing any zip files to disk. Return the writer.
Parser Module Argument Parsing diff --git a/static/1.34.0/api/spork/json.html b/static/1.34.0/api/spork/json.html index e374e5cc..b6b968ef 100644 --- a/static/1.34.0/api/spork/json.html +++ b/static/1.34.0/api/spork/json.html @@ -122,9 +122,9 @@

Index

json/decode json/encode


json/decode cfunction
(json/decode json-source &opt keywords nils)
 
-Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.
Community Examples

json/encode cfunction
(json/encode x &opt tab newline buf)
+Returns a janet object after parsing JSON. If keywords is truthy, string keys will be converted to keywords. If nils is truthy, null will become nil instead of the keyword :null.

json/encode cfunction
(json/encode x &opt tab newline buf)
 
-Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
Community Examples
+Encodes a janet value in JSON (utf-8). tab and newline are optional byte sequence which are used to format the output JSON. if buf is provided, the formated JSON is append to buf instead of a new buffer. Returns the modifed buffer.
HTTP Framework Math extended diff --git a/static/1.34.0/api/spork/math.html b/static/1.34.0/api/spork/math.html index 61f6d9ae..f832d55e 100644 --- a/static/1.34.0/api/spork/math.html +++ b/static/1.34.0/api/spork/math.html @@ -123,160 +123,160 @@

Index

math/add math/add-to-mean math/approx-eq math/bernoulli-distribution math/binominal-coeficient math/binominal-distribution math/check-probability math/chi-squared-distribution-table math/cols math/cumulative-std-normal-probability math/det math/dot math/epsilon math/extent math/factor math/factorial math/geometric-mean math/get-only-el math/harmonic-mean math/ident math/interquartile-range math/invmod math/jacobi math/linear-regression math/linear-regression-line math/median math/median-absolute-deviation math/minor math/mode math/mop math/mul math/mulmod math/next-prime math/perm math/permutation-test math/permutations math/poisson-distribution math/powmod math/prime? math/primes math/quantile math/quantile-rank math/quantile-rank-sorted math/quantile-sorted math/quickselect math/relative-err math/root-mean-square math/rows math/sample-correlation math/sample-covariance math/sample-skewness math/sample-standard-deviation math/sample-variance math/scalar math/shuffle-in-place math/size math/sop math/standard-deviation math/standard-normal-table math/sum-compensated math/sum-nth-power-deviations math/swap math/t-test math/t-test-2 math/trans math/variance math/z-score math/zero


math/add function source
(add m a)
 
 Add `a` to matrix `m` where it can be matrix or scalar.
-Matrix `m` is mutated.
Community Examples

math/add-to-mean function source
(add-to-mean m n v)
+Matrix `m` is mutated.

math/add-to-mean function source
(add-to-mean m n v)
 
-Adds new value `v` to mean `m` from `n` values.
Community Examples

math/approx-eq function source
(approx-eq a e &opt t)
+Adds new value `v` to mean `m` from `n` values.

math/approx-eq function source
(approx-eq a e &opt t)
 
 Approximate equality between actual number `a`
 and expected number `e`. Default tolerance `t`
-is `epsilon`.
Community Examples

math/bernoulli-distribution function source
(bernoulli-distribution p)
+is `epsilon`.

math/bernoulli-distribution function source
(bernoulli-distribution p)
 
-Creates Bernoulli distribution from popability `p` in the tuple.
Community Examples

math/binominal-coeficient function source
(binominal-coeficient n k)
+Creates Bernoulli distribution from popability `p` in the tuple.

math/binominal-coeficient function source
(binominal-coeficient n k)
 
 Computes binominal coeficient from set of size `n`
-and sample size `k`.
Community Examples

math/binominal-distribution function source
(binominal-distribution t p)
+and sample size `k`.

math/binominal-distribution function source
(binominal-distribution t p)
 
 Creates binominal distribution from trials `t`
-and probability `p` in the tuple.
Community Examples

math/check-probability function source
(check-probability p)
+and probability `p` in the tuple.

math/check-probability function source
(check-probability p)
 
-Asserts that probability in in the [0 1] range.
Community Examples

math/chi-squared-distribution-table struct source
Chi Squared distribution table.
Community Examples

math/cols function source
(cols m)
+Asserts that probability in in the [0 1] range.

math/chi-squared-distribution-table struct source
Chi Squared distribution table.

math/cols function source
(cols m)
 
-Returns numbers of columns of matrix `m`.
Community Examples

math/cumulative-std-normal-probability function source
(cumulative-std-normal-probability z)
+Returns numbers of columns of matrix `m`.

math/cumulative-std-normal-probability function source
(cumulative-std-normal-probability z)
 
-Computes standard normal probability for `y`.
Community Examples

math/det function source
(det m)
+Computes standard normal probability for `y`.

math/det function source
(det m)
 
-Computes determinant of matrix `m`.
Community Examples

math/dot function source
(dot mx my)
+Computes determinant of matrix `m`.

math/dot function source
(dot mx my)
 
-Computes dot product of matrices or vectors `x` and `y`.
Community Examples

math/epsilon number source
Epsilon constant
Community Examples

math/extent function source
(extent xs)
+Computes dot product of matrices or vectors `x` and `y`.

math/epsilon number source
Epsilon constant

math/extent function source
(extent xs)
 
-Returns the minimum & maximum number in an `xs` as tuple.
Community Examples

math/factor function source
(factor n)
+Returns the minimum & maximum number in an `xs` as tuple.

math/factor function source
(factor n)
 
-Returns an array containing the prime factors of `n`.
Community Examples

math/factorial function source
(factorial n)
+Returns an array containing the prime factors of `n`.

math/factorial function source
(factorial n)
 
-Returns factorial of `n`.
Community Examples

math/geometric-mean function source
(geometric-mean xs)
+Returns factorial of `n`.

math/geometric-mean function source
(geometric-mean xs)
 
-Gets the geometric mean from `xs`.
Community Examples

math/get-only-el macro source
(get-only-el m)
+Gets the geometric mean from `xs`.

math/get-only-el macro source
(get-only-el m)
 
 Convenience macro for geting first element
-from first row of the two dimensional array `m`.
Community Examples

math/harmonic-mean function source
(harmonic-mean xs)
+from first row of the two dimensional array `m`.

math/harmonic-mean function source
(harmonic-mean xs)
 
-Gets the harmonic mean from `xs`.
Community Examples

math/ident function source
(ident c)
+Gets the harmonic mean from `xs`.

math/ident function source
(ident c)
 
-Creates identity matrix with `c` x `c` size.
Community Examples

math/interquartile-range function source
(interquartile-range xs)
+Creates identity matrix with `c` x `c` size.

math/interquartile-range function source
(interquartile-range xs)
 
-Gets the interquartile range from `xs`.
Community Examples

math/invmod cfunction source
(math/invmod a m)
+Gets the interquartile range from `xs`.

math/invmod cfunction source
(math/invmod a m)
 
-Modular multiplicative inverse of `a` mod `m`. Both arguments must be integer. The return value has the same type as `m`. If no inverse exists, returns `math/nan` instead.
Community Examples

math/jacobi cfunction source
(math/jacobi a m)
+Modular multiplicative inverse of `a` mod `m`. Both arguments must be integer. The return value has the same type as `m`. If no inverse exists, returns `math/nan` instead.

math/jacobi cfunction source
(math/jacobi a m)
 
-Computes the Jacobi Symbol (a|m).
Community Examples

math/linear-regression function source
(linear-regression coords)
+Computes the Jacobi Symbol (a|m).

math/linear-regression function source
(linear-regression coords)
 
 Computes the slope `:m` and y-intercept `:b`
-of the function in the struct from set of coordinates.
Community Examples

math/linear-regression-line function source
(linear-regression-line {:m m :b b})
+of the function in the struct from set of coordinates.

math/linear-regression-line function source
(linear-regression-line {:m m :b b})
 
-Constructs function from struct returned by linear regression.
Community Examples

math/median function source
(median xs)
+Constructs function from struct returned by linear regression.

math/median function source
(median xs)
 
-Gets the median value from `xs`
Community Examples

math/median-absolute-deviation function source
(median-absolute-deviation xs)
+Gets the median value from `xs`

math/median-absolute-deviation function source
(median-absolute-deviation xs)
 
-Gets median absolute deviation from `xs`.
Community Examples

math/minor function source
(minor m x y)
+Gets median absolute deviation from `xs`.

math/minor function source
(minor m x y)
 
-Computes minor matrix of matrix `m` and `x`, `y`.
Community Examples

math/mode function source
(mode xs)
+Computes minor matrix of matrix `m` and `x`, `y`.

math/mode function source
(mode xs)
 
-Gets the mode value from `xs`.
Community Examples

math/mop function source
(mop m op a)
+Gets the mode value from `xs`.

math/mop function source
(mop m op a)
 
 Mutates every cell of the matrix `m` with `op`
-and corresponding cell from matrix arg `a`.
Community Examples

math/mul function source
(mul m a)
+and corresponding cell from matrix arg `a`.

math/mul function source
(mul m a)
 
 Multiply matrix `m` with `a` which can be matrix or vector.
-Matrix `m` is mutated.
Community Examples

math/mulmod cfunction source
(math/mulmod a b m)
+Matrix `m` is mutated.

math/mulmod cfunction source
(math/mulmod a b m)
 
-Modular multiplication of `a` and `b` mod `m`. All arguments must be integer. The return value has the same type as `m`.
Community Examples

math/next-prime function source
(next-prime n)
+Modular multiplication of `a` and `b` mod `m`. All arguments must be integer. The return value has the same type as `m`.

math/next-prime function source
(next-prime n)
 
-Returns the next prime number strictly larger than `n`.
Community Examples

math/perm function source
(perm m)
+Returns the next prime number strictly larger than `n`.

math/perm function source
(perm m)
 
-Computes permanent of the matrix `m`.
Community Examples

math/permutation-test function source
(permutation-test xs ys &opt a k)
+Computes permanent of the matrix `m`.

math/permutation-test function source
(permutation-test xs ys &opt a k)
 
 Conducts a permutation test to determine if two data sets
 `xs` and `ys` are *significantly* different from each other.
 You can use alternative hypotesis `a`, which defaults to `:two-side`,
 with `:greater` and `:lesser` being the other two options.
 The last optional argument is `k` number of values
-in permutation distribution
Community Examples

math/permutations function source
(permutations s &opt k)
+in permutation distribution

math/permutations function source
(permutations s &opt k)
 
-Returns permutations of length `k` from members of `s`
Community Examples

math/poisson-distribution function source
(poisson-distribution lambda)
+Returns permutations of length `k` from members of `s`

math/poisson-distribution function source
(poisson-distribution lambda)
 
-Creates Poisson distribution from `lambda` in tuple.
Community Examples

math/powmod cfunction source
(math/powmod a b m)
+Creates Poisson distribution from `lambda` in tuple.

math/powmod cfunction source
(math/powmod a b m)
 
-Modular exponentiation of `a` to the power of `b` mod `m`. All arguments must be integer. The return value has the same type as `m`.
Community Examples

math/prime? function source
(prime? n)
+Modular exponentiation of `a` to the power of `b` mod `m`. All arguments must be integer. The return value has the same type as `m`.

math/prime? function source
(prime? n)
 
-A primality test, deterministic for all `n` less than 2^63.
Community Examples

math/primes function source
(primes)
+A primality test, deterministic for all `n` less than 2^63.

math/primes function source
(primes)
 
-A boundless prime number generator.
Community Examples

math/quantile function source
(quantile xs p)
+A boundless prime number generator.

math/quantile function source
(quantile xs p)
 
-Gets the quantile value from `xs` at `p` from unsorted population.
Community Examples

math/quantile-rank function source
(quantile-rank xs p)
+Gets the quantile value from `xs` at `p` from unsorted population.

math/quantile-rank function source
(quantile-rank xs p)
 
-Gets the quantile rank of value `v` from unsorted `xs`.
Community Examples

math/quantile-rank-sorted function source
(quantile-rank-sorted xs v)
+Gets the quantile rank of value `v` from unsorted `xs`.

math/quantile-rank-sorted function source
(quantile-rank-sorted xs v)
 
-Gets the quantile rank of value `v` from sorted `xs`.
Community Examples

math/quantile-sorted function source
(quantile-sorted xs p)
+Gets the quantile rank of value `v` from sorted `xs`.

math/quantile-sorted function source
(quantile-sorted xs p)
 
-Gets the quantile value from `xs` at `p` from sorted population.
Community Examples

math/quickselect function source
(quickselect arr k &opt left right)
+Gets the quantile value from `xs` at `p` from sorted population.

math/quickselect function source
(quickselect arr k &opt left right)
 
 Rearrange items in `arr` so that all items in `[left, k]` range
 are the smallest.
 The `k`-th element will have the `(k - left + 1)`-th smallest value
 in `[left, right]`.
-Mutates `arr`.
Community Examples

math/relative-err function source
(relative-err a e)
+Mutates `arr`.

math/relative-err function source
(relative-err a e)
 
 Gets the relative err between actual number `a`
-and expected number `e`.
Community Examples

math/root-mean-square function source
(root-mean-square xs)
+and expected number `e`.

math/root-mean-square function source
(root-mean-square xs)
 
-Gets the root mean square from `xs`.
Community Examples

math/rows function source
(rows m)
+Gets the root mean square from `xs`.

math/rows function source
(rows m)
 
-Returns numbers of rows of matrix `m`.
Community Examples

math/sample-correlation function source
(sample-correlation xs ys)
+Returns numbers of rows of matrix `m`.

math/sample-correlation function source
(sample-correlation xs ys)
 
-Gets the sample correlation between `xs` and `ys`.
Community Examples

math/sample-covariance function source
(sample-covariance xs ys)
+Gets the sample correlation between `xs` and `ys`.

math/sample-covariance function source
(sample-covariance xs ys)
 
-Gets the sample covariance between `xs` and `ys`.
Community Examples

math/sample-skewness function source
(sample-skewness xs)
+Gets the sample covariance between `xs` and `ys`.

math/sample-skewness function source
(sample-skewness xs)
 
-Gets the sample skeweness from the `xs`.
Community Examples

math/sample-standard-deviation function source
(sample-standard-deviation xs)
+Gets the sample skeweness from the `xs`.

math/sample-standard-deviation function source
(sample-standard-deviation xs)
 
-Gets sample standard deviation from `xs`.
Community Examples

math/sample-variance function source
(sample-variance xs)
+Gets sample standard deviation from `xs`.

math/sample-variance function source
(sample-variance xs)
 
-Get the sample variance from `xs`.
Community Examples

math/scalar function source
(scalar c s)
+Get the sample variance from `xs`.

math/scalar function source
(scalar c s)
 
-Creates scalar `s` matrix with `c` x `c` size.
Community Examples

math/shuffle-in-place function source
(shuffle-in-place xs)
+Creates scalar `s` matrix with `c` x `c` size.

math/shuffle-in-place function source
(shuffle-in-place xs)
 
 Generate random permutation of the array `xs`
-which is shuffled in place.
Community Examples

math/size function source
(size m)
+which is shuffled in place.

math/size function source
(size m)
 
-Returns tuple with the matrix `m` size [rows cols].
Community Examples

math/sop function source
(sop m op & a)
+Returns tuple with the matrix `m` size [rows cols].

math/sop function source
(sop m op & a)
 
 Mutates every cell of the matrix `m` with `op`
-and variadic args `a`.
Community Examples

math/standard-deviation function source
(standard-deviation xs)
+and variadic args `a`.

math/standard-deviation function source
(standard-deviation xs)
 
-Gets the standard deviation from `ds`.
Community Examples

math/standard-normal-table tuple source
Computed standard normal table.
Community Examples

math/sum-compensated function source
(sum-compensated xs)
+Gets the standard deviation from `ds`.

math/standard-normal-table tuple source
Computed standard normal table.

math/sum-compensated function source
(sum-compensated xs)
 
-Returns sum of the members of `xs` with Kahan-Babushka algorithm.
Community Examples

math/sum-nth-power-deviations function source
(sum-nth-power-deviations xs n)
+Returns sum of the members of `xs` with Kahan-Babushka algorithm.

math/sum-nth-power-deviations function source
(sum-nth-power-deviations xs n)
 
-Get the sum of deviations to the n power.
Community Examples

math/swap function source
(swap arr i j)
+Get the sum of deviations to the n power.

math/swap function source
(swap arr i j)
 
 Swaps members with indices `i` and `j` of arr.
-Noop when `i` equals `j`.
Community Examples

math/t-test function source
(t-test xs expv)
+Noop when `i` equals `j`.

math/t-test function source
(t-test xs expv)
 
 Computes one sample t-test comparing the mean of `xs`
-to known value `expv`.
Community Examples

math/t-test-2 function source
(t-test-2 xs ys &opt d)
+to known value `expv`.

math/t-test-2 function source
(t-test-2 xs ys &opt d)
 
 Computes two sample t-test of two samples `xs` and `ys`
-with difference optional `d` which defaults to 0.
Community Examples

math/trans function source
(trans m)
+with difference optional `d` which defaults to 0.

math/trans function source
(trans m)
 
-Returns a new transposed matrix from `m`.
Community Examples

math/variance function source
(variance xs)
+Returns a new transposed matrix from `m`.

math/variance function source
(variance xs)
 
-Get the variance from the `xs`.
Community Examples

math/z-score function source
(z-score x m d)
+Get the variance from the `xs`.

math/z-score function source
(z-score x m d)
 
 Gets the standard score for number `x` from mean `m`
-and standard deviation `d`.
Community Examples

math/zero function source
(zero c &opt r)
+and standard deviation `d`.

math/zero function source
(zero c &opt r)
 
 Creates vector of length `c`, or matrix if `r`
-is provided, and fills it with zeros.
Community Examples
+is provided, and fills it with zeros.

JSON Miscellaneous Functions diff --git a/static/1.34.0/api/spork/misc.html b/static/1.34.0/api/spork/misc.html index 69673be7..56747ec9 100644 --- a/static/1.34.0/api/spork/misc.html +++ b/static/1.34.0/api/spork/misc.html @@ -122,99 +122,99 @@

Index

misc/always misc/antepenultimate misc/binary-search misc/binary-search-by misc/caperr misc/capout misc/cond-> misc/cond->> misc/dedent misc/defs misc/dfs misc/do-def misc/do-var misc/format-table misc/gett misc/insert-sorted misc/insert-sorted-by misc/int->string misc/int/ misc/log misc/make misc/make-id misc/map-keys misc/map-keys-flat misc/map-vals misc/merge-sorted misc/merge-sorted-by misc/penultimate misc/print-table misc/randomize-array misc/second misc/select-keys misc/set* misc/string->int misc/table-filter misc/third misc/trim-prefix misc/trim-suffix misc/until misc/vars


misc/always function source
(always x)
 
-Return a function that discards any arguments and always returns `x`.
Community Examples

misc/antepenultimate function source
(antepenultimate xs)
+Return a function that discards any arguments and always returns `x`.

misc/antepenultimate function source
(antepenultimate xs)
 
-Get the third-to-last element from an indexed data structure.
Community Examples

misc/binary-search macro source
(binary-search x arr &opt <?)
+Get the third-to-last element from an indexed data structure.

misc/binary-search macro source
(binary-search x arr &opt <?)
 
 Returns the index of `x` in a sorted array or tuple or the index of
 the next item if `x` is not present. This is the correct insert index
 for `x` within `arr`. If a `<?` comparator is given, the search uses
-that to compare elements, otherwise uses `<`.
Community Examples

misc/binary-search-by macro source
(binary-search-by x arr f)
+that to compare elements, otherwise uses `<`.

misc/binary-search-by macro source
(binary-search-by x arr f)
 
 Returns the index of `x` in an array or tuple which has been sorted
 by a mapping function `f`, or the index of the next item if `x` is not
-present. This is the correct insert index for `x` within `arr`.
Community Examples

misc/caperr macro source
(caperr & body)
+present. This is the correct insert index for `x` within `arr`.

misc/caperr macro source
(caperr & body)
 
 Captures the standart error output of the variadic `body` and returns it
-as a buffer.
Community Examples

misc/capout macro source
(capout & body)
+as a buffer.

misc/capout macro source
(capout & body)
 
 Captures the standart output of the variadic `body` and returns it as
-a buffer.
Community Examples

misc/cond-> macro source
(cond-> val & clauses)
+a buffer.

misc/cond-> macro source
(cond-> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs with condition and operation to which the `val`,
 is put as first argument. All conditions are tried and
 for truthy conditions the operation is executed.
-Returns the value mutated if any condition is truthy.
Community Examples

misc/cond->> macro source
(cond->> val & clauses)
+Returns the value mutated if any condition is truthy.

misc/cond->> macro source
(cond->> val & clauses)
 
 Threading conditional macro. It takes `val` to mutate,
 and `clauses` pairs of condition and operation to which the `val`,
 is put as last argument. All conditions are tried and
 for truthy the operation is ran.
-Returns mutated value if any condition is truthy.
Community Examples

misc/dedent function source
(dedent & xs)
+Returns mutated value if any condition is truthy.

misc/dedent function source
(dedent & xs)
 
 Remove indentation after concatenating the arguments. Works by removing
 leading whitespace, and then removing that same pattern of whitepsace after
-new lines.
Community Examples

misc/defs macro source
(defs & bindings)
+new lines.

misc/defs macro source
(defs & bindings)
 
-Defines many constants as in let `bindings`, but without creating new scope.
Community Examples

misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
+Defines many constants as in let `bindings`, but without creating new scope.

misc/dfs function source
(dfs data visit-leaf &opt node-before node-after get-children seen)
 
 Do a depth first, pre-order traversal over a data structure.
 Also allow for callbacks before and after visiting the children
 of a node. Also allow for a custom `get-children` function to
 change traversal as needed. Will detect cycles if an empty table
 is passed as the `seen` parameter, which is used to cached values
-that have been visited.
Community Examples

misc/do-def macro source
(do-def c d & body)
+that have been visited.

misc/do-def macro source
(do-def c d & body)
 
 Convenience macro for defining constant named `c` with value `d` before `body`
 and returning it after evaluating `body`, that presumably modifies
-the `c` refered content. For example buffer, table or array.
Community Examples

misc/do-var macro source
(do-var v d & body)
+the `c` refered content. For example buffer, table or array.

misc/do-var macro source
(do-var v d & body)
 
 Convenience macro for defining varible named `v` with value `d` before `body`
-and returning it after evaluating `body`, that presumably modifies `v`.
Community Examples

misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
+and returning it after evaluating `body`, that presumably modifies `v`.

misc/format-table function source
(format-table buf-into data &opt columns header-mapping column-mapping)
 
-Same as print-table but pushes table into a buffer.
Community Examples

misc/gett macro source
(gett ds & keys)
+Same as print-table but pushes table into a buffer.

misc/gett macro source
(gett ds & keys)
 
-Recursive macro (get). Similar to get-in, but keys are variadic argument.
Community Examples

misc/insert-sorted function source
(insert-sorted arr <? & xs)
+Recursive macro (get). Similar to get-in, but keys are variadic argument.

misc/insert-sorted function source
(insert-sorted arr <? & xs)
 
 Insert elements in `arr` such that it remains sorted by the comparator. If
-`arr` is not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
+`arr` is not sorted beforehand, the results are undefined. Returns `arr`.

misc/insert-sorted-by function source
(insert-sorted-by arr f & xs)
 
 Insert elements in `arr` such that it remains sorted by the value returned
 when `f` is called with the element, comparing the values with `<`. If `arr` is
-not sorted beforehand, the results are undefined. Returns `arr`.
Community Examples

misc/int->string function source
(int->string int &opt base)
+not sorted beforehand, the results are undefined. Returns `arr`.

misc/int->string function source
(int->string int &opt base)
 
-Stringify an integer in a particular base. Defaults to decimal (base 10).
Community Examples

misc/int/ function source
(int/ & xs)
+Stringify an integer in a particular base. Defaults to decimal (base 10).

misc/int/ function source
(int/ & xs)
 
-Perform integer division.
Community Examples

misc/log macro source
(log level & args)
+Perform integer division.

misc/log macro source
(log level & args)
 
 Print to a dynamic binding stream if that stream is set, otherwise do
 nothing. Evaluate to nil.
 For example, `(log :err "value error: %V" my-value)` will print
-to `(dyn :err)` only if `(dyn :err)` has been set.
Community Examples

misc/make macro source
(make prototype & pairs)
+to `(dyn :err)` only if `(dyn :err)` has been set.

misc/make macro source
(make prototype & pairs)
 
 Convenience macro for creating new table from even number of kvs pairs in a variadic `table-or-pairs`
 arguments and setting its prototype to `prototype`.
-Factory function for creating new objects from prototypes.
Community Examples

misc/make-id function source
(make-id &opt prefix)
+Factory function for creating new objects from prototypes.

misc/make-id function source
(make-id &opt prefix)
 
 Create a random, printable keyword id with 10 bytes of entropy
-with an optional prefix.
Community Examples

misc/map-keys function source
(map-keys f data)
+with an optional prefix.

misc/map-keys function source
(map-keys f data)
 
 Returns new table with function `f` applied to `data`'s
-keys recursively.
Community Examples

misc/map-keys-flat function source
(map-keys-flat f data)
+keys recursively.

misc/map-keys-flat function source
(map-keys-flat f data)
 
 Returns new table with function `f` applied to `data`'s
-keys without recursing.
Community Examples

misc/map-vals function source
(map-vals f data)
+keys without recursing.

misc/map-vals function source
(map-vals f data)
 
-Returns new table with function `f` applied to `data`'s values.
Community Examples

misc/merge-sorted function source
(merge-sorted a b &opt <?)
+Returns new table with function `f` applied to `data`'s values.

misc/merge-sorted function source
(merge-sorted a b &opt <?)
 
 Merges two sorted arrays so that the result remains sorted, using an optional comparator.
-If no comparator is given, `<` is used.
Community Examples

misc/merge-sorted-by function source
(merge-sorted-by a b f)
+If no comparator is given, `<` is used.

misc/merge-sorted-by function source
(merge-sorted-by a b f)
 
 Merges two sorted arrays so that result remains sorted when `f` is called on each element,
-comparing the values with `<`.
Community Examples

misc/penultimate function source
(penultimate xs)
+comparing the values with `<`.

misc/penultimate function source
(penultimate xs)
 
-Get the second-to-last element from an indexed data structure.
Community Examples

misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
+Get the second-to-last element from an indexed data structure.

misc/print-table function source
(print-table data &opt columns header-mapping column-mapping)
 
 Iterate through the rows of a data structure and print a table in a human
 readable way, with padding and heading information. Can optionally provide
@@ -222,37 +222,37 @@ 

Index for each row. Lastly, a `header-mapping` dictionary can be provided that changes the printed header names by mapping column keys to the desired header name. If no mapping is found, then the column key will be used as -the header name. Returns nil.

Community Examples

misc/randomize-array function source
(randomize-array arr &opt rng)
+the header name. Returns nil.

misc/randomize-array function source
(randomize-array arr &opt rng)
 
 Randomizes array using the fisher-yates shuffle, takes an optional random
-number generator.
Community Examples

misc/second function source
(second xs)
+number generator.

misc/second function source
(second xs)
 
-Get the second element from an indexed data structure.
Community Examples

misc/select-keys function source
(select-keys data keyz)
+Get the second element from an indexed data structure.

misc/select-keys function source
(select-keys data keyz)
 
-Returns new table with selected `keyz` from dictionary `data`.
Community Examples

misc/set* macro source
(set* tgts exprs)
+Returns new table with selected `keyz` from dictionary `data`.

misc/set* macro source
(set* tgts exprs)
 
 Parallel `set` function. Takes a list of targets and
 expressions, evaluates all the expressions, and then
 assigns them to the targets. Each target can be a variable
-or a 2-tuple, just like in the normal `set` special form.
Community Examples

misc/string->int function source
(string->int str &opt base)
+or a 2-tuple, just like in the normal `set` special form.

misc/string->int function source
(string->int str &opt base)
 
 Parse an integer in the given base. Defaults to decimal (base 10). Differs
-from scan-number in that this does not recognize floating point notation.
Community Examples

misc/table-filter function source
(table-filter pred dict)
+from scan-number in that this does not recognize floating point notation.

misc/table-filter function source
(table-filter pred dict)
 
 Filter a key-value structure info a table. Semantics are the same as for
 built-in `filter`, except that `pred` takes two arguments (key and value.)
-Does not consider prototypes.
Community Examples

misc/third function source
(third xs)
+Does not consider prototypes.

misc/third function source
(third xs)
 
-Get the third element from an indexed data structure.
Community Examples

misc/trim-prefix function source
(trim-prefix prefix str)
+Get the third element from an indexed data structure.

misc/trim-prefix function source
(trim-prefix prefix str)
 
-Trim the specified prefix of a string if it has one
Community Examples

misc/trim-suffix function source
(trim-suffix suffix str)
+Trim the specified prefix of a string if it has one

misc/trim-suffix function source
(trim-suffix suffix str)
 
-Trim the specified suffix of a string if it has one
Community Examples

misc/until macro source
(until cnd & body)
+Trim the specified suffix of a string if it has one

misc/until macro source
(until cnd & body)
 
 Repeat `body` while the `cnd` is false.
-Equivalent to (while (not cnd) ;body).
Community Examples

misc/vars macro source
(vars & bindings)
+Equivalent to (while (not cnd) ;body).

misc/vars macro source
(vars & bindings)
 
-Defines many variables as in let `bindings`, but without creating new scope.
Community Examples
+Defines many variables as in let `bindings`, but without creating new scope.
Math extended NetREPL diff --git a/static/1.34.0/api/spork/msg.html b/static/1.34.0/api/spork/msg.html index ce47ce2f..f4c86998 100644 --- a/static/1.34.0/api/spork/msg.html +++ b/static/1.34.0/api/spork/msg.html @@ -122,11 +122,11 @@

Index

msg/make-proto msg/make-recv msg/make-send


msg/make-proto function source
(make-proto stream &opt pack unpack)
 
-Create both a send an recv function from a stream, as with `make-send` and `make-recv`.
Community Examples

msg/make-recv function source
(make-recv stream &opt unpack)
+Create both a send an recv function from a stream, as with `make-send` and `make-recv`.

msg/make-recv function source
(make-recv stream &opt unpack)
 
-Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.
Community Examples

msg/make-send function source
(make-send stream &opt pack)
+Get a function that, when invoked, gets the next message from a readable stream. Provide an optional unpack function that will parse the received buffer.

msg/make-send function source
(make-send stream &opt pack)
 
-Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Community Examples
+Create a function that when called with a msgs sends that msg. Provide an optional pack function that will convert a message to a string.
Shell Utilities Test diff --git a/static/1.34.0/api/spork/netrepl.html b/static/1.34.0/api/spork/netrepl.html index a7cf2a87..3bb63700 100644 --- a/static/1.34.0/api/spork/netrepl.html +++ b/static/1.34.0/api/spork/netrepl.html @@ -122,11 +122,11 @@

Index

netrepl/client netrepl/default-host netrepl/default-port netrepl/server netrepl/server-single


netrepl/client function source
(client &opt host port name)
 
-Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".
Community Examples

netrepl/default-host string source
Default host to run server on and connect to.
Community Examples

netrepl/default-port string source
Default port to run the net repl.
Community Examples

netrepl/server function source
(server &opt host port env cleanup welcome-msg)
+Connect to a repl server. The default host is "127.0.0.1" and the default port is "9365".

netrepl/default-host string source
Default host to run server on and connect to.

netrepl/default-port string source
Default port to run the net repl.

netrepl/server function source
(server &opt host port env cleanup welcome-msg)
 
-Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.
Community Examples

netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
+Start a repl server. The default host is "127.0.0.1" and the default port is "9365". Calling this will start a TCP server that exposes a repl into the given env. If no env is provided, a new env will be created per connection. If env is a function, that function will be invoked with the name and stream on each connection to generate an environment. `cleanup` is an optional function that will be called for each stream after closing if provided. `welcome-msg` is an optional string or function (welcome-msg client-name) to generate a message to print for the client on connection.

netrepl/server-single function source
(server-single &opt host port env cleanup welcome-msg)
 
-Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Community Examples
+Short-hand for serving up a a repl that has a single environment table in it. `env` must be a proper env table, not a function as is possible in netrepl/server.
Miscellaneous Functions Path Utilities diff --git a/static/1.34.0/api/spork/path.html b/static/1.34.0/api/spork/path.html index f44b79e3..269f2025 100644 --- a/static/1.34.0/api/spork/path.html +++ b/static/1.34.0/api/spork/path.html @@ -122,59 +122,59 @@

Index

path/abspath path/abspath? path/basename path/delim path/dirname path/ext path/join path/normalize path/parts path/posix/abspath path/posix/abspath? path/posix/basename path/posix/delim path/posix/dirname path/posix/ext path/posix/join path/posix/normalize path/posix/parts path/posix/relpath path/posix/sep path/relpath path/sep path/win32/abspath path/win32/abspath? path/win32/basename path/win32/delim path/win32/dirname path/win32/ext path/win32/join path/win32/normalize path/win32/parts path/win32/relpath path/win32/sep


path/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

path/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/basename function source
(posix/basename path)
+Check if a path is absolute.

path/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

path/delim string source
Platform delimiter
Community Examples

path/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

path/delim string source
Platform delimiter

path/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/ext function source
(ext path)
+Gets the directory name of a path.

path/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/join function source
(posix/join & els)
+Get the file extension for a path.

path/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

path/normalize function source
(posix/normalize path)
+Join path elements together.

path/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

path/posix/abspath function source
(posix/abspath path)
+Split a path into its parts.

path/posix/abspath function source
(posix/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/posix/abspath? function source
(posix/abspath? path)
+Coerce a path to be absolute.

path/posix/abspath? function source
(posix/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/posix/basename function source
(posix/basename path)
+Check if a path is absolute.

path/posix/basename function source
(posix/basename path)
 
-Gets the base file name of a path.
Community Examples

path/posix/delim string source
Platform delimiter
Community Examples

path/posix/dirname function source
(posix/dirname path)
+Gets the base file name of a path.

path/posix/delim string source
Platform delimiter

path/posix/dirname function source
(posix/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/posix/ext function source
(ext path)
+Gets the directory name of a path.

path/posix/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/posix/join function source
(posix/join & els)
+Get the file extension for a path.

path/posix/join function source
(posix/join & els)
 
-Join path elements together.
Community Examples

path/posix/normalize function source
(posix/normalize path)
+Join path elements together.

path/posix/normalize function source
(posix/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/posix/parts function source
(posix/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/posix/parts function source
(posix/parts path)
 
-Split a path into its parts.
Community Examples

path/posix/relpath function source
(posix/relpath source target)
+Split a path into its parts.

path/posix/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/posix/sep string source
Platform separator
Community Examples

path/relpath function source
(posix/relpath source target)
+Get the relative path between two subpaths.

path/posix/sep string source
Platform separator

path/relpath function source
(posix/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/sep string source
Platform separator
Community Examples

path/win32/abspath function source
(win32/abspath path)
+Get the relative path between two subpaths.

path/sep string source
Platform separator

path/win32/abspath function source
(win32/abspath path)
 
-Coerce a path to be absolute.
Community Examples

path/win32/abspath? function source
(win32/abspath? path)
+Coerce a path to be absolute.

path/win32/abspath? function source
(win32/abspath? path)
 
-Check if a path is absolute.
Community Examples

path/win32/basename function source
(win32/basename path)
+Check if a path is absolute.

path/win32/basename function source
(win32/basename path)
 
-Gets the base file name of a path.
Community Examples

path/win32/delim string source
Platform delimiter
Community Examples

path/win32/dirname function source
(win32/dirname path)
+Gets the base file name of a path.

path/win32/delim string source
Platform delimiter

path/win32/dirname function source
(win32/dirname path)
 
-Gets the directory name of a path.
Community Examples

path/win32/ext function source
(ext path)
+Gets the directory name of a path.

path/win32/ext function source
(ext path)
 
-Get the file extension for a path.
Community Examples

path/win32/join function source
(win32/join & els)
+Get the file extension for a path.

path/win32/join function source
(win32/join & els)
 
-Join path elements together.
Community Examples

path/win32/normalize function source
(win32/normalize path)
+Join path elements together.

path/win32/normalize function source
(win32/normalize path)
 
-Normalize a path. This removes . and .. in the path, as well as empty path elements.
Community Examples

path/win32/parts function source
(win32/parts path)
+Normalize a path. This removes . and .. in the path, as well as empty path elements.

path/win32/parts function source
(win32/parts path)
 
-Split a path into its parts.
Community Examples

path/win32/relpath function source
(win32/relpath source target)
+Split a path into its parts.

path/win32/relpath function source
(win32/relpath source target)
 
-Get the relative path between two subpaths.
Community Examples

path/win32/sep string source
Platform separator
Community Examples
+Get the relative path between two subpaths.

path/win32/sep string source
Platform separator
NetREPL Raw Terminal Functionality diff --git a/static/1.34.0/api/spork/rawterm.html b/static/1.34.0/api/spork/rawterm.html index 8a1be029..14a5d4d9 100644 --- a/static/1.34.0/api/spork/rawterm.html +++ b/static/1.34.0/api/spork/rawterm.html @@ -122,25 +122,25 @@

Index

rawterm/begin rawterm/buffer-traverse rawterm/ctrl-z rawterm/end rawterm/getch rawterm/isatty rawterm/monowidth rawterm/rune-monowidth rawterm/size rawterm/slice-monowidth


rawterm/begin cfunction source
(rawterm/begin &opt on-winch)
 
-Begin raw terminal functionality. Return a stream that can be read from to get input.
Community Examples

rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
+Begin raw terminal functionality. Return a stream that can be read from to get input.

rawterm/buffer-traverse cfunction source
(rawterm/buffer-traverse bytes index delta &opt skip-zerowidth)
 
-Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.
Community Examples

rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
+Move to a new position in a buffer from index by incrementing by `delta` codepoints. Can also skip zero-width codepoints if desired.

rawterm/ctrl-z cfunction source
(rawterm/ctrl-z)
 
-A handler that a user can use to handle ctrl-z from input to suspend the current process.
Community Examples

rawterm/end cfunction source
(rawterm/end)
+A handler that a user can use to handle ctrl-z from input to suspend the current process.

rawterm/end cfunction source
(rawterm/end)
 
-End raw terminal functionality.
Community Examples

rawterm/getch cfunction source
(rawterm/getch &opt into)
+End raw terminal functionality.

rawterm/getch cfunction source
(rawterm/getch &opt into)
 
-Get a byte of input from stdin, without blocking if possible. Returns a buffer.
Community Examples

rawterm/isatty cfunction source
(rawterm/isatty)
+Get a byte of input from stdin, without blocking if possible. Returns a buffer.

rawterm/isatty cfunction source
(rawterm/isatty)
 
-Check if the current stdin is a tty.
Community Examples

rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
+Check if the current stdin is a tty.

rawterm/monowidth cfunction source
(rawterm/monowidth bytes &opt start-index end-index)
 
-Measure the monospace width of a string.
Community Examples

rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
+Measure the monospace width of a string.

rawterm/rune-monowidth cfunction source
(rawterm/rune-monowidth rune)
 
-Get the monospace width of a rune. Returns either 0, 1, or 2.
Community Examples

rawterm/size cfunction source
(rawterm/size)
+Get the monospace width of a rune. Returns either 0, 1, or 2.

rawterm/size cfunction source
(rawterm/size)
 
-Get the number of rows and columns visible in the terminal as tuple [rows cols]
Community Examples

rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
+Get the number of rows and columns visible in the terminal as tuple [rows cols]

rawterm/slice-monowidth cfunction source
(rawterm/slice-monowidth bytes columns &opt start-index into)
 
-Get a byte slice that will fit into a number of columns.
Community Examples
+Get a byte slice that will fit into a number of columns.
Path Utilities Regular Expression PEG Syntax diff --git a/static/1.34.0/api/spork/regex.html b/static/1.34.0/api/spork/regex.html index 5a11751b..e8ce3250 100644 --- a/static/1.34.0/api/spork/regex.html +++ b/static/1.34.0/api/spork/regex.html @@ -125,19 +125,19 @@

Index

regex/compile regex/find regex/find-all regex/match regex/peg regex/replace regex/replace-all regex/source


regex/compile function source
(compile pattern)
 
-Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.
Community Examples

regex/find function source
(find reg text &opt start)
+Compile a subset of regex to a PEG if pattern is a string. If pattern is a PEG, will return the PEG as is.

regex/find function source
(find reg text &opt start)
 
-Similar to peg/find, but for regexes.
Community Examples

regex/find-all function source
(find-all reg text &opt start)
+Similar to peg/find, but for regexes.

regex/find-all function source
(find-all reg text &opt start)
 
-Similar to peg/find-all, but for regexes.
Community Examples

regex/match function source
(match reg text &opt start)
+Similar to peg/find-all, but for regexes.

regex/match function source
(match reg text &opt start)
 
-Similar to peg/match, but for regexes.
Community Examples

regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.
Community Examples

regex/replace function source
(replace reg rep text &opt start)
+Similar to peg/match, but for regexes.

regex/peg core/peg source
Peg used to generate peg source code from a regular expression string.

regex/replace function source
(replace reg rep text &opt start)
 
-Similar to peg/replace, but for regexes.
Community Examples

regex/replace-all function source
(replace-all reg rep text &opt start)
+Similar to peg/replace, but for regexes.

regex/replace-all function source
(replace-all reg rep text &opt start)
 
-Similar to peg/replace-all, but for regexes.
Community Examples

regex/source function source
(source pattern)
+Similar to peg/replace-all, but for regexes.

regex/source function source
(source pattern)
 
-Compile a subset of regex to PEG source code.
Community Examples
+Compile a subset of regex to PEG source code.
Raw Terminal Functionality Remote Procedure Calls diff --git a/static/1.34.0/api/spork/rpc.html b/static/1.34.0/api/spork/rpc.html index 01212822..fcbb33f1 100644 --- a/static/1.34.0/api/spork/rpc.html +++ b/static/1.34.0/api/spork/rpc.html @@ -122,9 +122,9 @@

Index

rpc/client rpc/default-host rpc/default-port rpc/server


rpc/client function source
(client &opt host port name)
 
-Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.
Community Examples

rpc/default-host string source
Default host to run server on and connect to.
Community Examples

rpc/default-port string source
Default port to run the net repl.
Community Examples

rpc/server function source
(server functions &opt host port workers-per-connection)
+Create an RPC client. The default host is "127.0.0.1" and the default port is "9366". Returns a table of async functions that can be used to make remote calls. This table also contains a :close function that can be used to close the connection.

rpc/default-host string source
Default host to run server on and connect to.

rpc/default-port string source
Default port to run the net repl.

rpc/server function source
(server functions &opt host port workers-per-connection)
 
-Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Community Examples
+Create an RPC server. The default host is "127.0.0.1" and the default port is "9366". Also must take a dictionary of functions that clients can call.
Regular Expression PEG Syntax Schema diff --git a/static/1.34.0/api/spork/schema.html b/static/1.34.0/api/spork/schema.html index c154b233..79272a9f 100644 --- a/static/1.34.0/api/spork/schema.html +++ b/static/1.34.0/api/spork/schema.html @@ -122,13 +122,13 @@

Index

schema/make-predicate schema/make-validator schema/predicate schema/validator


schema/make-predicate function source
(make-predicate schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `predicate`.
Community Examples

schema/make-validator function source
(make-validator schema)
+Generate a function that can be used to validate a data structure. This is the function form of `predicate`.

schema/make-validator function source
(make-validator schema)
 
-Generate a function that can be used to validate a data structure. This is the function form of `validator`.
Community Examples

schema/predicate macro source
(predicate pattern)
+Generate a function that can be used to validate a data structure. This is the function form of `validator`.

schema/predicate macro source
(predicate pattern)
 
-Make a validation predicate given a certain schema.
Community Examples

schema/validator macro source
(validator pattern)
+Make a validation predicate given a certain schema.

schema/validator macro source
(validator pattern)
 
-Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Community Examples
+Make a validation function of one argument. A validation function will throw an error on validation failure, otherwise, it will return the argument.
Remote Procedure Calls Shell Utilities diff --git a/static/1.34.0/api/spork/sh.html b/static/1.34.0/api/spork/sh.html index 6b004599..445db5a4 100644 --- a/static/1.34.0/api/spork/sh.html +++ b/static/1.34.0/api/spork/sh.html @@ -123,36 +123,36 @@

Index

sh/copy sh/copy-file sh/create-dirs sh/devnull sh/escape sh/exec sh/exec-fail sh/exec-slurp sh/exec-slurp-all sh/exists? sh/list-all-files sh/make-new-file sh/rm sh/scan-directory sh/split


sh/copy function source
(copy src dest)
 
 Copy a file or directory recursively from one location to another.
-Expects input to be unix style paths
Community Examples

sh/copy-file function source
(copy-file src-path dst-path)
+Expects input to be unix style paths

sh/copy-file function source
(copy-file src-path dst-path)
 
-Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.
Community Examples

sh/create-dirs function source
(create-dirs dir-path)
+Copy a file from source to destination. Creates all directories in the path to the destination file if they do not exist.

sh/create-dirs function source
(create-dirs dir-path)
 
-Create all directories in path specified as string including itself.
Community Examples

sh/devnull function source
(devnull)
+Create all directories in path specified as string including itself.

sh/devnull function source
(devnull)
 
-get the /dev/null equivalent of the current platform as an open file
Community Examples

sh/escape function source
(escape & args)
+get the /dev/null equivalent of the current platform as an open file

sh/escape function source
(escape & args)
 
-Output a string with all arguments correctly quoted
Community Examples

sh/exec function source
(exec & args)
+Output a string with all arguments correctly quoted

sh/exec function source
(exec & args)
 
-Execute command specified by args returning it's exit code
Community Examples

sh/exec-fail function source
(exec-fail & args)
+Execute command specified by args returning it's exit code

sh/exec-fail function source
(exec-fail & args)
 
-Execute command specified by args, fails when command exits with non-zero exit code
Community Examples

sh/exec-slurp function source
(exec-slurp & args)
+Execute command specified by args, fails when command exits with non-zero exit code

sh/exec-slurp function source
(exec-slurp & args)
 
-Read stdout of command specified by args and return it trimmed in a string.
Community Examples

sh/exec-slurp-all function source
(exec-slurp-all & args)
+Read stdout of command specified by args and return it trimmed in a string.

sh/exec-slurp-all function source
(exec-slurp-all & args)
 
 Read stdout and stderr of subprocess and return it trimmed in a struct with :err and :out containing the output as string.
-This will also return the exit code under the :status key.
Community Examples

sh/exists? function source
(exists? path)
+This will also return the exit code under the :status key.

sh/exists? function source
(exists? path)
 
-Check if the given file or directory exists. (Follows symlinks)
Community Examples

sh/list-all-files function source
(list-all-files dir &opt into)
+Check if the given file or directory exists. (Follows symlinks)

sh/list-all-files function source
(list-all-files dir &opt into)
 
-List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.
Community Examples

sh/make-new-file function source
(make-new-file file-path &opt mode)
+List the files in the given directory recursively. Return the paths to all files found, relative to the current working directory if the given path is a relative path, or as an absolute path otherwise.

sh/make-new-file function source
(make-new-file file-path &opt mode)
 
-Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).
Community Examples

sh/rm function source
(rm path)
+Create and open a file, creating all the directories leading to the file if they do not exist, and return it. By default, open as a writable file (mode is `:w`).

sh/rm function source
(rm path)
 
-Remove a directory and all sub directories recursively.
Community Examples

sh/scan-directory function source
(scan-directory dir func)
+Remove a directory and all sub directories recursively.

sh/scan-directory function source
(scan-directory dir func)
 
-Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.
Community Examples

sh/split function source
(split s)
+Scan a directory recursively, applying the given function on all files and directories in a depth-first manner. This function has no effect if the directory does not exist.

sh/split function source
(split s)
 
-Split a string into 'sh like' tokens, returns nil if unable to parse the string.
Community Examples
+Split a string into 'sh like' tokens, returns nil if unable to parse the string.

Schema Simple Messaging Protocol diff --git a/static/1.34.0/api/spork/tarray.html b/static/1.34.0/api/spork/tarray.html index 54bd971b..f75102aa 100644 --- a/static/1.34.0/api/spork/tarray.html +++ b/static/1.34.0/api/spork/tarray.html @@ -122,19 +122,19 @@

Index

tarray/buffer tarray/copy-bytes tarray/length tarray/new tarray/properties tarray/slice tarray/swap-bytes


tarray/buffer cfunction
(tarray/buffer array|size)
 
-Return typed array buffer or create a new buffer.
Community Examples

tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
+Return typed array buffer or create a new buffer.

tarray/copy-bytes cfunction
(tarray/copy-bytes src sindex dst dindex &opt count)
 
-Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.
Community Examples

tarray/length cfunction
(tarray/length array|buffer)
+Copy count elements (default 1) of src array from index sindex to dst array at position dindex memory can overlap.

tarray/length cfunction
(tarray/length array|buffer)
 
-Return typed array or buffer size.
Community Examples

tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
+Return typed array or buffer size.

tarray/new cfunction
(tarray/new type size &opt stride offset tarray|buffer)
 
-Create new typed array.
Community Examples

tarray/properties cfunction
(tarray/properties array)
+Create new typed array.

tarray/properties cfunction
(tarray/properties array)
 
-Return typed array properties as a struct.
Community Examples

tarray/slice cfunction
(tarray/slice tarr &opt start end)
+Return typed array properties as a struct.

tarray/slice cfunction
(tarray/slice tarr &opt start end)
 
-Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.
Community Examples

tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
+Takes a slice of a typed array from start to end. The range is half open, [start, end). Indexes can also be negative, indicating indexing from the end of the end of the typed array. By default, start is 0 and end is the size of the typed array. Returns a new janet array.

tarray/swap-bytes cfunction
(tarray/swap-bytes src sindex dst dindex &opt count)
 
-Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Community Examples
+Swap count elements (default 1) between src array from index sindex and dst array at position dindex memory can overlap.
Test UTF8 diff --git a/static/1.34.0/api/spork/test.html b/static/1.34.0/api/spork/test.html index c2304cde..b7a6e06b 100644 --- a/static/1.34.0/api/spork/test.html +++ b/static/1.34.0/api/spork/test.html @@ -122,39 +122,39 @@

Index

test/assert test/assert-docs test/assert-error test/assert-no-error test/assert-not test/capture-stderr test/capture-stdout test/end-suite test/start-suite test/suppress-stderr test/suppress-stdout test/timeit test/timeit-loop


test/assert macro source
(assert x &opt e)
 
-Override's the default assert with some nice error handling.
Community Examples

test/assert-docs function source
(assert-docs path)
+Override's the default assert with some nice error handling.

test/assert-docs function source
(assert-docs path)
 
 Assert that all symbols, when module on the path is required,
-have proper doc string
Community Examples

test/assert-error macro source
(assert-error msg & forms)
+have proper doc string

test/assert-error macro source
(assert-error msg & forms)
 
-Test passes if forms error.
Community Examples

test/assert-no-error macro source
(assert-no-error msg & forms)
+Test passes if forms error.

test/assert-no-error macro source
(assert-no-error msg & forms)
 
-Test passes if forms do not error.
Community Examples

test/assert-not macro source
(assert-not x &opt e)
+Test passes if forms do not error.

test/assert-not macro source
(assert-not x &opt e)
 
-Invert assert.
Community Examples

test/capture-stderr macro source
(capture-stderr & body)
+Invert assert.

test/capture-stderr macro source
(capture-stderr & body)
 
 Runs the form and captures stderr. Returns tuple with result of the form
-and a string with captured stderr.
Community Examples

test/capture-stdout macro source
(capture-stdout & body)
+and a string with captured stderr.

test/capture-stdout macro source
(capture-stdout & body)
 
 Runs the form and captures stdout. Returns tuple with result of the form
-and a string with captured stdout.
Community Examples

test/end-suite function source
(end-suite)
+and a string with captured stdout.

test/end-suite function source
(end-suite)
 
-Ends test suite, prints summary and exits if any have failed.
Community Examples

test/start-suite function source
(start-suite &opt name)
+Ends test suite, prints summary and exits if any have failed.

test/start-suite function source
(start-suite &opt name)
 
-Starts test suite.
Community Examples

test/suppress-stderr macro source
(suppress-stderr & body)
+Starts test suite.

test/suppress-stderr macro source
(suppress-stderr & body)
 
-Suppreses stdout from the body
Community Examples

test/suppress-stdout macro source
(suppress-stdout & body)
+Suppreses stdout from the body

test/suppress-stdout macro source
(suppress-stdout & body)
 
-Suppreses stdout from the body
Community Examples

test/timeit macro source
(timeit form &opt tag)
+Suppreses stdout from the body

test/timeit macro source
(timeit form &opt tag)
 
 Time the execution of `form` using `os/clock` before and after,
 and print the result to stdout. returns: result of executing `form`.
-Uses `tag` (default "Elapsed time:") to tag the printout.
Community Examples

test/timeit-loop macro source
(timeit-loop head & body)
+Uses `tag` (default "Elapsed time:") to tag the printout.

test/timeit-loop macro source
(timeit-loop head & body)
 
 Similar to `loop`, but outputs performance statistics after completion.
 Additionally defines a `:timeout` verb to iterate continuously for a given
 number of seconds. If the first form of `body` is a bytes, it will be taken
-as a custom tag.
Community Examples
+as a custom tag.
Simple Messaging Protocol Typed Arrays diff --git a/static/1.34.0/api/spork/utf8.html b/static/1.34.0/api/spork/utf8.html index da27b76f..2bf6c450 100644 --- a/static/1.34.0/api/spork/utf8.html +++ b/static/1.34.0/api/spork/utf8.html @@ -122,11 +122,11 @@

Index

utf8/decode-rune utf8/encode-rune utf8/prefix->width


utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
 
-Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].
Community Examples

utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
+Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].

utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
 
-Encode a Unicode codepoint into the end of a buffer.
Community Examples

utf8/prefix->width cfunction source
(utf8/prefix->width c)
+Encode a Unicode codepoint into the end of a buffer.

utf8/prefix->width cfunction source
(utf8/prefix->width c)
 
-Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Community Examples
+Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Typed Arrays Zip Files diff --git a/static/1.34.0/api/spork/zip.html b/static/1.34.0/api/spork/zip.html index 1543b75d..fcc30c2c 100644 --- a/static/1.34.0/api/spork/zip.html +++ b/static/1.34.0/api/spork/zip.html @@ -122,33 +122,33 @@

Index

zip/add-bytes zip/add-file zip/compress zip/decompress zip/extract zip/file-directory? zip/file-encrypted? zip/file-supported? zip/get-filename zip/locate-file zip/read-bytes zip/read-file zip/reader-close zip/reader-count zip/stat zip/version zip/write-buffer zip/write-file zip/writer-close zip/writer-finalize


zip/add-bytes cfunction source
(zip/add-bytes writer path data &opt comment flags)
 
-Add a byte sequence to the zip writer.
Community Examples

zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
+Add a byte sequence to the zip writer.

zip/add-file cfunction source
(zip/add-file writer path filename &opt comment flags)
 
-Add a file to the zip writer.
Community Examples

zip/compress cfunction source
(zip/compress bytes &opt level into)
+Add a file to the zip writer.

zip/compress cfunction source
(zip/compress bytes &opt level into)
 
-Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.
Community Examples

zip/decompress cfunction source
(zip/decompress bytes &opt into)
+Compress data and write to a buffer. Different compression levels can be used - higher compression levels trade smaller output with longer compression times. Returns `into`. If `into` not provided, a new buffer is created.

zip/decompress cfunction source
(zip/decompress bytes &opt into)
 
-Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.
Community Examples

zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
+Decompress data and write to a buffer. If an `into` buffer is not provided, a new buffer will be created.

zip/extract cfunction source
(zip/extract reader idx-or-filename &opt into flags)
 
-Extract a file from the zip archive, either to memory or to a file on disk.
Community Examples

zip/file-directory? cfunction source
(zip/file-directory? reader idx)
+Extract a file from the zip archive, either to memory or to a file on disk.

zip/file-directory? cfunction source
(zip/file-directory? reader idx)
 
-Check if a file index is a directory.
Community Examples

zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
+Check if a file index is a directory.

zip/file-encrypted? cfunction source
(zip/file-encrypted? reader idx)
 
-Check if a file is encrypted inside an archive.
Community Examples

zip/file-supported? cfunction source
(zip/file-supported? reader idx)
+Check if a file is encrypted inside an archive.

zip/file-supported? cfunction source
(zip/file-supported? reader idx)
 
-Check if a file is supported with this verstion of miniz.
Community Examples

zip/get-filename cfunction source
(zip/get-filename reader idx)
+Check if a file is supported with this verstion of miniz.

zip/get-filename cfunction source
(zip/get-filename reader idx)
 
-Convert a file index index in the archive to a filename.
Community Examples

zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
+Convert a file index index in the archive to a filename.

zip/locate-file cfunction source
(zip/locate-file reader path &opt comment flags)
 
-Get the index of a particular filename in the archive.
Community Examples

zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
+Get the index of a particular filename in the archive.

zip/read-bytes cfunction source
(zip/read-bytes bytes &opt flags)
 
-Read a byte sequence as a zip archive. Returns a new zip reader.
Community Examples

zip/read-file cfunction source
(zip/read-file filename &opt flags)
+Read a byte sequence as a zip archive. Returns a new zip reader.

zip/read-file cfunction source
(zip/read-file filename &opt flags)
 
-Read a file as a zip archive. Returns a new zip reader.
Community Examples

zip/reader-close cfunction source
(zip/reader-close reader)
+Read a file as a zip archive. Returns a new zip reader.

zip/reader-close cfunction source
(zip/reader-close reader)
 
-Close a reader and free related memory.
Community Examples

zip/reader-count cfunction source
(zip/reader-count reader)
+Close a reader and free related memory.

zip/reader-count cfunction source
(zip/reader-count reader)
 
-Get the number of files inside the zip archive. The files can be indexed 
Community Examples

zip/stat cfunction source
(zip/stat reader idx)
+Get the number of files inside the zip archive. The files can be indexed 

zip/stat cfunction source
(zip/stat reader idx)
 
 Get stat information of file. Returns a new struct with the following fields:
 
@@ -165,17 +165,17 @@ 

Index * :comment * :internal-attr * :external-attr -

Community Examples

zip/version cfunction source
(zip/version)
+

zip/version cfunction source
(zip/version)
 
-Get the version string of the underlying miniz library.
Community Examples

zip/write-buffer cfunction source
(zip/write-buffer)
+Get the version string of the underlying miniz library.

zip/write-buffer cfunction source
(zip/write-buffer)
 
-Create a new zip archive writer that write to memory.
Community Examples

zip/write-file cfunction source
(zip/write-file dest-path)
+Create a new zip archive writer that write to memory.

zip/write-file cfunction source
(zip/write-file dest-path)
 
-Create a new zip archive writer that will write into an archive file.
Community Examples

zip/writer-close cfunction source
(zip/writer-close writer)
+Create a new zip archive writer that will write into an archive file.

zip/writer-close cfunction source
(zip/writer-close writer)
 
-Close a ZipWriter.
Community Examples

zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
+Close a ZipWriter.

zip/writer-finalize cfunction source
(zip/writer-finalizer writer)
 
-Finalize a writer, writing any zip files to disk. Return the writer.
Community Examples
+Finalize a writer, writing any zip files to disk. Return the writer.
UTF8 String Module diff --git a/static/1.35.0/api/spork/utf8.html b/static/1.35.0/api/spork/utf8.html index c56aeeb5..2a4444b5 100644 --- a/static/1.35.0/api/spork/utf8.html +++ b/static/1.35.0/api/spork/utf8.html @@ -124,11 +124,11 @@

Index

utf8/decode-rune utf8/encode-rune utf8/prefix->width


utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
 
-Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].
Community Examples

utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
+Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].

utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
 
-Encode a Unicode codepoint into the end of a buffer.
Community Examples

utf8/prefix->width cfunction source
(utf8/prefix->width c)
+Encode a Unicode codepoint into the end of a buffer.

utf8/prefix->width cfunction source
(utf8/prefix->width c)
 
-Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Community Examples
+Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Typed Arrays Zip Files diff --git a/static/1.36.0/api/spork/utf8.html b/static/1.36.0/api/spork/utf8.html index 3be048f9..7722b9dc 100644 --- a/static/1.36.0/api/spork/utf8.html +++ b/static/1.36.0/api/spork/utf8.html @@ -126,11 +126,11 @@

Index

utf8/decode-rune utf8/encode-rune utf8/prefix->width


utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
 
-Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].
Community Examples

utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
+Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].

utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
 
-Encode a Unicode codepoint into the end of a buffer.
Community Examples

utf8/prefix->width cfunction source
(utf8/prefix->width c)
+Encode a Unicode codepoint into the end of a buffer.

utf8/prefix->width cfunction source
(utf8/prefix->width c)
 
-Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Community Examples
+Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Typed Arrays Zip Files diff --git a/static/1.37.1/api/spork/utf8.html b/static/1.37.1/api/spork/utf8.html index 05f524e8..b294bfde 100644 --- a/static/1.37.1/api/spork/utf8.html +++ b/static/1.37.1/api/spork/utf8.html @@ -128,11 +128,11 @@

Index

utf8/decode-rune utf8/encode-rune utf8/prefix->width


utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
 
-Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].
Community Examples

utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
+Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].

utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
 
-Encode a Unicode codepoint into the end of a buffer.
Community Examples

utf8/prefix->width cfunction source
(utf8/prefix->width c)
+Encode a Unicode codepoint into the end of a buffer.

utf8/prefix->width cfunction source
(utf8/prefix->width c)
 
-Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Community Examples
+Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Typed Arrays Zip Files diff --git a/static/1.38.0/api/spork/utf8.html b/static/1.38.0/api/spork/utf8.html index a664e3a8..699dcff3 100644 --- a/static/1.38.0/api/spork/utf8.html +++ b/static/1.38.0/api/spork/utf8.html @@ -130,11 +130,11 @@

Index

utf8/decode-rune utf8/encode-rune utf8/prefix->width


utf8/decode-rune cfunction source
(utf8/decode-rune buf &opt start)
 
-Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].
Community Examples

utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
+Read a UTF-8 encoded Unicode codepoint from the buffer which starts at the given index. Returns a tuple [value width], where width = number of bytes consumed. If at the end of buffer or the buffer contains malformed UTF-8, returns [nil 0].

utf8/encode-rune cfunction source
(utf8/encode-rune rune &opt buf)
 
-Encode a Unicode codepoint into the end of a buffer.
Community Examples

utf8/prefix->width cfunction source
(utf8/prefix->width c)
+Encode a Unicode codepoint into the end of a buffer.

utf8/prefix->width cfunction source
(utf8/prefix->width c)
 
-Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.
Community Examples
+Given the first byte in an UTF-8 sequence, get the number of bytes that the codepoint sequence takes up, including the prefix byte.