diff --git a/doc/sphinx/reference/console.rst b/doc/sphinx/reference/console.rst index 9b5da77a8ac4ae46d3d17112d4e49a02ef9c3778..697ba4d7a2dc3287aaeba7c0d2cecda8377e1012 100644 --- a/doc/sphinx/reference/console.rst +++ b/doc/sphinx/reference/console.rst @@ -50,23 +50,22 @@ host/port. ... 198.18.44.44:3301> -- prompt is telling us that server is remote -.. function:: listen(host, port) +.. function:: listen(URI) - Listen on host:port. The primary way of listening for incoming requests - is via the host and port, or :ref:`URI`, specified in ``box.cfg{listen=...}``. - The alternative way of listening is via the host and port, or URI, + Listen on URI. The primary way of listening for incoming requests + is via the connection-information string, or :ref:`URI`, specified in ``box.cfg{listen=...}``. + The alternative way of listening is via the URI specified in ``console.listen(...)``. This alternative way is called "administrative" or simply "admin port". The listening is usually over a local host with a Unix socket, - specified as host = 'unix/', port = 'path/to/something.sock'. + specified with host = 'unix/', port = 'path/to/something.sock'. - :param string host: - :param number port: + :param string uri: - The "admin" address is the port or :ref:`URI` to listen on for administrative + The "admin" address is the :ref:`URI` to listen on for administrative connections. It has no default value, so it must be specified if connections will occur via telnet. It is not used unless assigned a - value. The parameters may be expressed with :ref:`URI` = Universal Resource + value. The parameters are expressed with :ref:`URI` = Universal Resource Identifier format, for example "unix://unix_domain_socket", or as a numeric TCP port. Connections are often made with telnet. A typical port value is 3313. diff --git a/doc/sphinx/reference/fun.rst b/doc/sphinx/reference/fun.rst new file mode 100644 index 0000000000000000000000000000000000000000..6fbbd21b6f0bc82b2af3c4170e8bfdc31d2e8c0d --- /dev/null +++ b/doc/sphinx/reference/fun.rst @@ -0,0 +1,35 @@ +------------------------------------------------------------------------------- + Package `fun` +------------------------------------------------------------------------------- + +Lua fun, also known as the Lua Functional Library, takes advantage +of the features of LuaJIT to help users create complex functions. +Inside the package are "sequence processors" such as +map, filter, reduce, zip -- they take a user-written function as +an argument and run it against every element in a sequence, which +can be faster or more convenient than a user-written loop. +Inside the package are "generators" such as range, tabulate, and +rands -- they return a bounded or boundless series of values. +Within the package are "reducers", "filters", "composers" ... +or, in short, all the important features found in languages like +Standard ML, Haskell, or Erlang. + +The full documentation is `On the luafun section of github`_. +However, the first chapter can be skipped because installation +is already done, it's inside Tarantool. All that is needed is the usual require request. +After that, all the operations described in the +Lua fun manual will work, provided they are preceded by the +name returned by the require request. +For example: + +.. code-block:: lua + + localhost> fun = require('fun') + localhost> for _k, a in fun.range(3) do print(a) end + 1 + 2 + 3 + --- + ... + +.. _On the luafun section of github: http://rtsisyk.github.io/luafun diff --git a/doc/sphinx/reference/index.rst b/doc/sphinx/reference/index.rst index 51d438df2b40b9a205b54dd21cd4e0db07d8f17d..e35d0cacec447808609fb6a0774552d98946d5d9 100644 --- a/doc/sphinx/reference/index.rst +++ b/doc/sphinx/reference/index.rst @@ -19,6 +19,7 @@ console log tap + fun pickle other expirationd