Changes between Initial Version and Version 2 of Ticket #2926


Ignore:
Timestamp:
08/02/2009 06:42:53 PM (16 years ago)
Author:
Ag. Hatzimanikas
Comment:

Fixed some typos to the description. Also see ticket #2929 for a new Lua Modules page.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2926

    • Property Owner changed from blfs-book@… to Guy Dalziel
    • Property Status newassigned
  • TabularUnified Ticket #2926 – Description

    initial v2  
    11About Lua.
    22
    3 Lua was designed as an extension language and because of this is small. However, this doesn't mean is not rich or it's not expressive (quite the opposite, especially if you know the roots (1) of Roberto Ierusalimschy (the main Lua author) which is Scheme.
     3Lua was designed as an extension language and because of this is small. However, this doesn't mean is not rich or it's not expressive (quite the opposite, especially if you know that Scheme was a source for a major inspiration (1) for Roberto Ierusalimschy (the main Lua author).
    44
    55The Lua project is hosted at http://www.lua.org
     
    77Current version is 5.1.4 and it has no dependencies.
    88
    9 The Lua distribution doesn't provide a configure script, so there are just "make" targets.
    10 To compile Lua we just need to issue, a "make linux" from the top level from the distribution.
     9The Lua distribution doesn't provide a configure script but just a Makefile, so there are just "make" targets.
     10To compile Lua we just need to issue, a "make linux" from the top level off the distribution.
    1111
    12 By default the installation goes into the /usr/local hierarchy, so we need to use the INSTALL_TOP and INSTALL_LIB variables to change that, with
     12By default the installation goes into the /usr/local hierarchy, so we need to use the INSTALL_TOP and INSTALL_LIB variables to change that, with:
    1313
    1414{{{
     
    1616}}}
    1717
    18 Lua ships with an etc/lua.pc file, that also needs some fixing
     18Lua ships with an etc/lua.pc file, that also needs some fixing:
    1919
    2020{{{
     
    25250644 permissions.
    2626
    27 That's it. Using those instructions, here is the package provides analytically
    28 (not so much as expected)
     27That's it. Using those instructions the package provides (analytically):
    2928
    3029{{{
     
    4140/usr/include/lualib.h
    4241}}}
     42(not so much as expected)
    4343
     44Now. As it has been said already, Lua is tiny and minimalist so doesn't provides any batteries with it, like the most scripting languages usually do today and developers are used to have.
    4445
    45 Now. As it has been said already, Lua is tiny and minimalist yet quite expressive,
    46 so doesn't provides any batteries with it, like the most scripting languages usually do
    47 today.
    48 
    49 To overcome this, the Lua community created many excellent modules (to complement the Lua core), which they provide specifics functions.
    50 Like a socket interface (2), or luaposix(3) or modules that offering various bindings, e.g., gui toolkits.
     46To overcome this, the Lua community had created many excellent modules (to complement the Lua core), which they provide specifics functions; like a socket interface (2), or luaposix(3) or modules that offering various bindings, e.g., gui toolkits.
    5147
    5248All these modules (usually are hosted at luaforge.net) are not officially supported.
    5349
    54 A module system was implemented, which is the LuaRocks (4).
     50A package system was implemented, which is the LuaRocks (4).
    5551The purpose of LuaRocks is to (per word) provide a deployment and management system for Lua modules,
    5652something like cpan or RubyGems.
    57 The current release is in first stable version with minor releases with bug-fixes.
    58 The LuaRocks team is on a process  to a 2.* new stable release, with a big difference from current stable.
     53The current release is in the first stable version, with minor releases that offers mainly bug-fixes but with no visible changes in the functionality.
     54The LuaRocks team is on a process to a 2.* new stable release, with a big difference from current stable.
    5955
    60 Currently LuaRocks is installed into /usr/share/lua/5.1/luarocks and by default all the
    61 installed modules goes into /usr/lib/luarocks/rocks hierarchy. The user then
    62 should include a "include luarocks" on top of the script to start using the modules.
     56Currently LuaRocks is installed into /usr/share/lua/5.1/luarocks and by default all the installed modules goes into /usr/lib/luarocks/rocks hierarchy. The user then should include a require("luarocks")" on top of the script to start using the modules.
    6357
    6458That is what is going to change. Modules would be installed to the standard locations,
    6559i.e., LUA_PATH and  LUA_CPATH.
    6660
    67 Now. The above variables are both paths that Lua is searching for modules.
     61Now. The above variables are both paths, that Lua is searching for modules.
    6862
    69 The first is the LUA_PATH, that e.g., for the 5.1.4 release is /usr/share/lua/5.1 and the second is
    70 the LUA_CPATH that is /usr/lib/lua/5.1
     63LUA_PATH for the 5.1.4 release is /usr/share/lua/5.1 and LUA_CPATH is /usr/lib/lua/5.1 (assuming prefix is /usr).
    7164
    72 The simple difference is that in LUA_PATH are located modules which are just plain text files with a .lua extension, and in the UA_CPATH are located modules written in C with embedded Lua code (*.so files).
     65The simple difference between those two, is that in LUA_PATH are located modules which are just plain text files with a .lua extension, and in LUA_CPATH are located modules written in C with embedded Lua code (*.so files).
    7366
    7467Those two variables can be used in runtime, so the user should know about their importance.
     
    7669There is another approach.
    7770
    78 Below are vim sunstitutions to src/luaconf.h which we can applying them before the installation
    79 as the very first step (if I remember well, I've adopted them from a gentoo patch), where we
    80 are defining where Lua will look for the modules, that means in our case under /usr/{lib,share}/lua/5.1.
     71Below are vim substitutions to "src/luaconf.h" which we can apply them before the installation, as the very first step (if I remember well, I've adopted them from a gentoo patch), where we are defining where Lua will search for modules, that means in our case under /usr/{lib,share}/lua/5.1.
    8172
    8273
     
    9384* install and use LuaRocks
    9485
    95 * download and install four/five important and popular Lua modules (I do have the instructions and I can provide them when needed)
     86* download and install some important and popular Lua modules (I do have the instructions and I can provide them when needed)
    9687
    9788
    98 Another thing to know is if we want to build the shared library, liblua.so or just the static liblua.a. If we need to build the shared library we should do a research how the other distributions
    99 do build the shared library. There is also a patch written for 5.1.1, which can still be valid, from Luca Piol in
     89Another thing to know is: Do we want to build the shared library, liblua.so or just the static liblua.a? If we need to build the shared library, we should do a research to see how the other distributions do build the (shared) library. There is also a patch written for 5.1.1, which can still be valid, from Luca Piol at:
    10090 
    101 
    10291http://wiki.linuxfromscratch.org/blfs/attachment/ticket/2173/lua-5.1.1-makeso-1.patch
    10392