🔒 Closed Lua: getting started

Status
Not open for further replies.

Strawberrry

Forum Veteran
Welcome!
Lua is a powerful and fast programming language that is easy to learn and use and to embed into your application.

Lua is designed to be a lightweight embeddable scripting language. It is used for You do not have permission to view the full content of this post. Log in or register now., from games to web applications and image processing.

See the You do not have permission to view the full content of this post. Log in or register now. page for details and some reasons why you should choose Lua.

See what Lua programs look and feel like in the You do not have permission to view the full content of this post. Log in or register now..

Learning
A good place to start learning Lua is the book You do not have permission to view the full content of this post. Log in or register now., available in You do not have permission to view the full content of this post. Log in or register now. and as an You do not have permission to view the full content of this post. Log in or register now.. The first edition is freely available You do not have permission to view the full content of this post. Log in or register now.. See also You do not have permission to view the full content of this post. Log in or register now.based on this book.

The official definition of the Lua language is given in theYou do not have permission to view the full content of this post. Log in or register now..

See the You do not have permission to view the full content of this post. Log in or register now. page and the You do not have permission to view the full content of this post. Log in or register now. for more.

Getting help
Our You do not have permission to view the full content of this post. Log in or register now. is friendly and will most probably help you if you need. Just visit the You do not have permission to view the full content of this post. Log in or register now., the You do not have permission to view the full content of this post. Log in or register now., and You do not have permission to view the full content of this post. Log in or register now..

If you need help in Portuguese, join the You do not have permission to view the full content of this post. Log in or register now. mailing list and visitYou do not have permission to view the full content of this post. Log in or register now..

See also the You do not have permission to view the full content of this post. Log in or register now., the community-maintained You do not have permission to view the full content of this post. Log in or register now. and You do not have permission to view the full content of this post. Log in or register now., and the much longer You do not have permission to view the full content of this post. Log in or register now..

Tools
If you need to complement the standard Lua libraries to handle more complex tasks, the You do not have permission to view the full content of this post. Log in or register now. lists many You do not have permission to view the full content of this post. Log in or register now. for Lua, including tools, libraries, full distributions, and You do not have permission to view the full content of this post. Log in or register now. for several platforms.

You can find many user-contributed modules for Lua in You do not have permission to view the full content of this post. Log in or register now.. See alsoYou do not have permission to view the full content of this post. Log in or register now., a curated list of quality Lua packages and resources.

Try also You do not have permission to view the full content of this post. Log in or register now., a multi-platform distribution of Lua that includes batteries.

Supporting
You can help to You do not have permission to view the full content of this post. Log in or register now. by You do not have permission to view the full content of this post. Log in or register now. published by Lua.org and by You do not have permission to view the full content of this post. Log in or register now..

You can also help to spread the word about Lua by buying Lua products atYou do not have permission to view the full content of this post. Log in or register now..

Installing
Use the You do not have permission to view the full content of this post. Log in or register now. to play with Lua if you don't want to install anything on your computer.

To run Lua programs on your computer, you'll need a standalone Lua interpreter and perhaps some additional Lua libraries. Use your favorite text editor to write your Lua programs. Make sure to save your programs as plain text. If you want an IDE, try You do not have permission to view the full content of this post. Log in or register now..

If you use Windows, try You do not have permission to view the full content of this post. Log in or register now., a multi-platform distribution of the Lua that includes batteries.

If you use Linux or Mac OS X, Lua is either already installed on your system or there is a Lua package for it. Make sure you get the latest release of Lua (currently 5.3.5).

Lua is also quite easy to build from source, as explained below.

Building from source
Lua is very easy to build and install. Just You do not have permission to view the full content of this post. Log in or register now. it and follow theYou do not have permission to view the full content of this post. Log in or register now. in the package.

Here is a simple terminal session that downloads the current release of Lua and builds it in a Linux system:
Code:
curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz
tar zxf lua-5.3.5.tar.gz
cd lua-5.3.5
make linux test
For Mac OS X, use make macosx test. If you don't have curl, try wget.

If you use Windows and want to build Lua from source, there are You do not have permission to view the full content of this post. Log in or register now. in the You do not have permission to view the full content of this post. Log in or register now..

Embedding
To embed Lua into your C or C++ program, you'll need the Lua headers to compile your program and a Lua library to link with it. If you're getting a ready-made Lua package for your platform, you'll probably need the development package as well. Otherwise, just You do not have permission to view the full content of this post. Log in or register now. Lua and add its source directory to your project.

Credits: lua.org
 
Status
Not open for further replies.

About this Thread

  • 4
    Replies
  • 693
    Views
  • 5
    Participants
Last reply from:
ms_Jelly

Online now

Members online
322
Guests online
865
Total visitors
1,187

Forum statistics

Threads
2,275,090
Posts
28,960,586
Members
1,233,588
Latest member
maikera97
Back
Top