Skip to content
Snippets Groups Projects
Commit ea8a03d7 authored by ocelot-inc's avatar ocelot-inc
Browse files

change console, add fun

parent f914ed4a
No related branches found
No related tags found
No related merge requests found
......@@ -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.
-------------------------------------------------------------------------------
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
......@@ -19,6 +19,7 @@
console
log
tap
fun
pickle
other
expirationd
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment