• Complain

Kathleen Peterson - Lua Programming: Syntax, Concepts, and Examples

Here you can read online Kathleen Peterson - Lua Programming: Syntax, Concepts, and Examples full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2021, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

No cover

Lua Programming: Syntax, Concepts, and Examples: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Lua Programming: Syntax, Concepts, and Examples" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Despite being a fast and powerful programming language, Lua is very easy to use and learn. Programmers can easily embed this language into their applications. The basic purpose of Luas development was the creation of an embeddable lightweight scripting language that can be used in a variety of programming activities, such as web applications, image processing, and games.History of LuaA team of 3 members, namely Roberto Ierusalimschy, Waldemar Celes, and Luiz Henrique de Figueiredo, Computer Graphics Technology Group (Tecgraf) created Lua in year 1993 at the Pontifical Catholic University of Rio de Janeiro. The two core foundation stones that led towards the development of Lua were the data configuration and description languages, namely data-entry language (DEL), and Simple Object Language (SOL). Between the years 1992 and 1993 teams at Tecgraf independently developed these two languages for two different projects. Both of these projects were developed at Petrobras Company and were graphical designing tools for engineering applications. However, SOL and DEL lacked flow control structures, and Petrobras realised that there was need to add a full programming feature to these languages. The design of Lua 1.0 was developed in a manner that enabled its object constructors, which were a little bit different from the present time light weight and flexible object constructors. The control structures syntax for Lua was taken from Modula to a great extent (as it consisted of the repeat/until, if, while loops). Part from that, the syntax was also influenced by a number of other languages, these included: CLU, C++, SNOBOL and AWK.The developers of Lua had stated, in one of the articles that was published in Dr. Dobbs Journal, that the decision to use tables as the primary data structure for Lua has been influenced by LISP and Scheme. This is because these languages had lists as their data structure mechanism, which is single and global in nature. Scheme has had increasing influence on the semantics of Lua with the passage of time. This influence can be evidently seen with the inclusion of full lexical scoping and anonymous functions in the language. The release of versions of Lua up till version 5.0 was made under a license that was similar to the BSD license. Afterwards, MIT license was used to make releases. This was applicable from the release of version 5.0.

Kathleen Peterson: author's other books


Who wrote Lua Programming: Syntax, Concepts, and Examples? Find out the surname, the name of the author of the book and a list of all author's works by series.

Lua Programming: Syntax, Concepts, and Examples — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Lua Programming: Syntax, Concepts, and Examples" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make

Lua Programming The Ultimate Beginner's Guide to
Learn Lua Step by Step Fourth edition 2021 By Kathleen Peterson TABLE OF CONTENTS Introduction The audience About the third edition Other resources Certain Typographical Conventions Running examples Acknowledgments PART I Language Chapter 1. Getting Started 1.1. Blocks 1.2. Some lexical conventions 1.3. Global variables 1.4. Separate interpreter Exercises Chapter 2.

Types and values 2.1. Nil 2.2. Boolean 2.3. Numbers 2.4. Strings Literals Long lines Type conversions 2.5. Tables 2.6.

Functions 2.7. userdata and threads Exercises Chapter 3. Expressions 3.1. Arithmetic Operators 3.2. Comparison operators 3.3. Logical operators 3.4.

Concatenation 3.5. Length operator 3.6. Operator Priorities 3.7. Table constructors Exercises Chapter 4. Operators 4.1. Assignment operators 4.2.

Local variables and blocks 4.3. Control structures if then else while repeat Numeric for statement General for statement 4.4. break, return and goto Exercises Chapter 5. Functions 5.1. Multiple Results 5.2. Functions with a variable number of arguments 5.3.

Named arguments Exercises Chapter 6. More about functions 6.1. Closures 6.2. Non-global functions 6.3. Optimization of tail calls Exercises Chapter 7. Iterators and the generic for 7.1.

Iterators and Closures 7.2. Generic for semantics 7.3. Stateless iterators 7.4. Complex State Iterators 7.5. True iterators Exercises Chapter 8. Compilation, Execution, and Errors 8.1.

Compilation 8.2. Precompiled Code 8.3. C code 8.4. Errors 8.5. Error and Exception Handling 8.6. Error messages and call stack Exercises Chapter 9.

Coroutines 9.1. Basics of coroutines 9.2. Channels and Filters 9.3. Coroutines as iterators 9.4. Non-displacing multi-threading Exercises Chapter 10. Completed Examples 10.1.

The problem of eight queens 10.2. The most common words 10.3. Markov chain Exercises PART II Tables and Objects Chapter 11. Data Structures 11.1. Arrays 11.2. Matrices and multidimensional arrays 11.3.

Linked Lists 11.4. Queues and double queues 11.5. Sets and Sets 11.6. Line buffers 11.7. Counts Exercises Chapter 12. Data Files and Persistence 12.1.

Data files 12.2. Serialization Saving tables without loops Saving tables with loops Exercises Chapter 13. Metatables and Metamethods 13.1. Arithmetic metamethods 13.2. Comparison Methods 13.3. Library Metamethods 13.4.

Methods for accessing the table __Index metamethod __Newindex metamethod Default tables Tracking access to a table Read-only tables Exercises Chapter 14. Environment 14.1. Global variables with dynamic names 14.2. Descriptions of global variables 14.3. Non-global environments 14.4. _ENV and load Exercises Chapter 15. _ENV and load Exercises Chapter 15.

Modules and Packages 15.1. Require function Renaming a module Search along the path File crawlers 15.2. The Standard Approach for Writing Lua Modules 15.3. Using environments 15.4. Submodules and Packages Exercises Chapter 16. Object Oriented programming 16.1.

Classes 16.2. Inheritance 16.3. Multiple inheritance 16.4. Hiding 16.5. Single Method Approach Exercises Chapter 17. Weak Tables and Finalizers 17.1.

Weak tables 17.2. Functions with caching 17.3. Object Attributes 17.4. Again tables with default values 17.5. Ephemeral tables 17.6. Finalizers Exercises PART III Standard Libraries Chapter 18.

Math Library Exercises Chapter 19. Library for Bitwise Operations Exercises Chapter 20. Library for Working with Tables 20.1. Insert and remove functions 20.2. Sorting 20.3. Concatenation Exercises Chapter 21.

Library for working with strings 21.1. Basic functions for working with strings 21.2. Functions for working with templates String.find function String.match function String.gsub function String.gmatch function 21.3. Templates 21.4. Grips 21.5. Substitutions URL encoding Replacing tabs 21.6.

Tricky tricks 21.7. Unicode Exercises Chapter 22. Library I / O 22.1. Simple I / O Model 22.2. Full I / O model A small trick to increase performance Binaries 22.3. Other operations with files Exercises Chapter 23.

Library of operating room functions systems 23.1. Date and time 23.2. Other system calls Exercises Chapter 24. Debug Library 24.1. Accessibility (introspection) Accessing Local Variables Access to non-local variables Access to other coroutines 24.2. Hooks 24.3.

Profiling Exercises PART IV WITH API Chapter 25. Overview of the C API 25.1. First example 25.2. Stack Putting items on the stack Referring to items Other stack operations 25.3. Error handling in the C API Handling errors in the application code Error handling in the library code Exercises Chapter 26. Extending Your Application 26.1.

Basics 26.2. Working with tables 26.3. Lua function calls 26.4. Generalized function call Exercises Chapter 27. Calling C from Lua 27.1. Functions on C 27.2.

Continuations 27.3. C modules Exercises Chapter 28. Techniques for writing functions in C 28.1. Working with arrays 28.2. Working with strings 28.3. Saving state in functions on C Register Function related values Function related values used several functions Exercises Chapter 29.

User-Defined Types in C 29.1. User data (userdata) 29.2. Metatables 29.3. Object Oriented Access 29.4. Access as an ordinary array 29.5. Light objects of type userdata (light userdata) Exercises Chapter 30.

Resource Management 30.1. Directory iterator 30.2. XML Parser Exercises Chapter 31. Threads and States 31.1. Numerous threads 31.2. Lua States Exercises INTRODUCTION When Waldemar, Louis, and I started developing Lua in 1993, we could hardly imagine that Lua would spread like that.

On- started as home language for two specific projects, now Lua is widely used in all areas one can get benefits from simple, extensible, portable and efficient scripting language such as embedded systems, mobile devices swarms and, of course, games. We designed Lua from the beginning to integrate with software software written in C / C ++ and other common strange languages. There are many benefits to this integration. Lua is a tiny and simple language, partly because it doesn't tries to do what C is already good at, such as speed, low-level operations and interaction with third-party programs parties. Lua relies on C for these tasks. Lua offers something for which C is not good enough: sufficient distance from the hardware go support, dynamic structures, no redundancy and ease of testing and debugging.

For these purposes, Lua has safe environment, automatic memory management and good possibilities for working with strings and other types resizable data. Some of Lua's strength comes from its libraries. And this is no coincidence. In the end Finally, one of the main strengths of Lua is extensibility. Many language features contribute to this. Dynamic typing tion provides a large degree of polymorphism.

Automatic memory management simplifies interfaces because there is no need to the ability to decide who is responsible for allocating and freeing memory or how to handle overflows. Higher-order functions and anonymous functions allow a high degree of parameterization, making functions more versatile. More than an extensible language, Lua is a glue vayushim (glue) language . Lua supports a component-based approach to software development when we create an application by gluing together existing high-level components. These components are written in a compiled language with a static typing such as C / C ++; Lua is the glue we use use to arrange and connect these components. Usually components (or objects) represent more specific low- tier entities (such as widgets and data structures), which which hardly change during the development of the program and which take up the bulk of the final program execution time.

Lua gives the final form to the application, which is most likely changes a lot during the life of a given software product. However, unlike other "glue" technologies, Lua is is a complete programming language. Therefore we can use Lua not only to "glue" components, but also to adaptation and customization of these components, as well as to create a floor new components. Of course, Lua isn't the only scripting language. Exists other languages you can use for roughly the same goals. Nevertheless, Lua provides a whole set of possibilities, which make him the best choice for many tasks and gives him your unique profile: Extensibility .

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Lua Programming: Syntax, Concepts, and Examples»

Look at similar books to Lua Programming: Syntax, Concepts, and Examples. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Lua Programming: Syntax, Concepts, and Examples»

Discussion, reviews of the book Lua Programming: Syntax, Concepts, and Examples and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.