Lua Matthew Spain | Kerry Zhao. Agenda Overview of Lua Language Details Application Areas Demo Conclusion.

Slides:



Advertisements
Similar presentations
Statement-Level Control Structures
Advertisements

Lua By: Michael Coffman Peter Sussman. History Lua means ‘moon’ in Portuguese First appeared in 1993 Created by Roberto Ierusalimschy, Luiz Henrique de.
Java Basic Training HaiNH - FQA. Agenda Introduction to Java Java Programming Environment Language Fundamental Object Oriented Programming with Java.
The Java Programming Language
Python By Steve Wright. What is Python? Simple, powerful, GP scripting language Simple, powerful, GP scripting language Object oriented Object oriented.
Chapter 8: Introduction to High-level Language Programming Invitation to Computer Science, C++ Version, Third Edition.
Mini-Pascal Compiling Mini-Pascal (MPC) language
Chapter 8: Introduction to High-level Language Programming Invitation to Computer Science, C++ Version, Third Edition.
Advanced OOP MCS-3 OOP BSCS-3 Lecture # 1
CSE 380 – Computer Game Programming Scripting and Lua Lua.
+ Java vs. Javascript Jessi Style. + Java Compiled Can stand on its own Written once, run anywhere Two-stage debugging Java is an Object Oriented Programming.
CS 355 – Programming Languages
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
Chapter 8 High-Level Programming Languages (modified by Erin Chambers)
High-Level Programming Languages: C++
CSU0014 Assembly Languages Homepage: Textbook: Kip R. Irvine, Assembly Language for Intel-Based Computers,
1 Perl Perl basics Perl Elements Arrays and Hashes Control statements Operators OOP in Perl.
PYTHON. Python is a high-level, interpreted, interactive and object- oriented scripting language. Python was designed to be highly readable which uses.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
ASP.NET Programming with C# and SQL Server First Edition Chapter 3 Using Functions, Methods, and Control Structures.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages.
Lua: The Programming Language. Some Things that Need to be Said Because of increasing demand for customizable applications, the trend nowadays is to split.
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
1 System Administration Introduction to Scripting, Perl Session 3 – Sat 10 Nov 2007 References:  chapter 1, The Unix Programming Environment, Kernighan.
 JAVA Compilation and Interpretation  JAVA Platform Independence  Building First JAVA Program  Escapes Sequences  Display text with printf  Data.
Prepared by: Elsy Torres Shajida Berry Siobhan Westby.
Expressions and Statements. Expressions Literals and identifiers are expressions More complex expressions are built from simple expressions by the application.
Games Development 2 Lua Scripting CO3301 Week 6. Contents Introducing Lua –Comparison with Python Lua Language Overview Interfacing Lua with C++
Fantasy && Smart 吴航.  Some concepts  Differences between Lua & C++  Application.
Fall 2004CSI University of Ottawa Introduction to PHP Basic principles and syntax.
COP4020 Programming Languages Names, Scopes, and Bindings Prof. Xin Yuan.
Perl Language Yize Chen CS354. History Perl was designed by Larry Wall in 1987 as a text processing language Perl has revised several times and becomes.
Saeed Ghanbartehrani Summer 2015 Lecture Notes #5: Programming Structures IE 212: Computational Methods for Industrial Engineering.
John Imboden. What is Lua  Embeddable scripting language  Creators: Roberto Lerusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes  Designed.
CSC 110 Using Python [Reading: chapter 1] CSC 110 B 1.
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
RUBY by Ryan Chase.
 Control Flow statements ◦ Selection statements ◦ Iteration statements ◦ Jump statements.
Fall 2004CSI University of Ottawa Introduction to PHP Basic principles and syntax.
Scheme in Scheme 2. What’s next  Adding set!  Dynamic vs. lexical variable scope  Extending mcscheme v1 with libraries  Can mcscheme execute mcscheme?
Ada, Scheme, R Emory Wingard. Ada History Department of Defense in search of high level language around Requirements drafted for the language.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
Perl Ed Finegan. Overview of Pearl Perl is a high-level programming language written by Larry Wall. It derives from the C programming language and to.
4 - Conditional Control Structures CHAPTER 4. Introduction A Program is usually not limited to a linear sequence of instructions. In real life, a programme.
Imperative Programming Statements and invariants.
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
Lua for TerraME: A Short Introduction Pedro Ribeiro de Andrade Münster, 2013.
Bash Jerome Lewis Kelly Benson Andrew Kimble. Overview  Shell Language (UNIX based)  Paradigms – Command, Scripting  Has ability to read straight from.
Python Programming Language by Vasu Chetty. Origins of Python Created by: Guido van Rossum, a Dutch Programmer Created during: Christmas Break, 1989 Created.
Prepared by Mustafa CAMURLI.  Lua was created in 1993 by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, members of the Computer.
Ruby Tien Ho and Brandon Hostetter. Overview ▸ Object-oriented, functional, imperative, and reflective ▸ Interpreted language ▸ Influenced by Perl, Smalltalk,
CSCE 343 – Programming Language Concepts Welcome!.
Introdução a Linguagem de Modelagem TerraML Dr. Tiago Garcia de Senna Carneiro TerraLAB - Laboratório INPE/UFOP para Simulação e Modelagem dos Sistemas.
Lua for TerraME: A Short Introduction Pedro Ribeiro de Andrade São José dos Campos, 2011.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Cody Scoggins, Dion de Jong, Victor Reynolds References:  902/is-lua-interesting-from-a- programming-language-design-
CS314 – Section 5 Recitation 9
Object Oriented Programming in
The need for Programming Languages
“Under the hood”: Angry Birds Maze
Chapter 3: Decisions and Loops
بسم الله الرحمن الرحیم.
Lua for TerraME: A Short Introduction
Introduction to C Programming Language
Typescript Programming Languages
What is Lua? Brandon Burgess Csc 415.
Catharine West Bo Aye Saljin LaRocca references
JavaScript CS 4640 Programming Languages for Web Applications
Presentation transcript:

Lua Matthew Spain | Kerry Zhao

Agenda Overview of Lua Language Details Application Areas Demo Conclusion

Overview

History Made by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes in 1993 Members of Tecgraf, PUC-Rio in Brazil Brazil had trade barriers making it hard to buy software from abroad

Release Timeline Jul Lua 1.0 Jul Lua 1.1 (first public release), paper Feb Lua 2.1 (first free commercial release) Nov Lua 4.0, no built-in functions Apr Lua 5.0, multithreading, full lexical scoping Dec Lua 5.2, current version

Language Influences Replaces o DEL (data-entry language) o SOL (simple object language) Scheme Modula

Resources code.google.com/p/luaforwindows luadist.org Plugins for most popular IDEs

Language Details

Function High-level scripting language Lightweight - interpreter about 180k Embedded language - C API

Execution Interpreter compiles to bytecode for Lua VM Very fast, usually compiled at run-time Programs can be compiled in advance to skip overhead Portable, builds on anything with a C compiler

Paradigms Multi-paradigm Imperative Functional Not object-oriented, but object-like constructs can be made using tables and metatables

Lexical/Syntactical Fun

Reserved Keywords and break do else elseif end false for function goto if in local nil not or repeat return then true until while

Types nil boolean numbers strings tables functions userdata threads

Control Flow if...then…else…elseif…end for...do...end while…do...end repeat...until

Assignment “multiple” assignment o a, b, c = “this is multiple assignment”, “yep”  i.e. a = “this is multiple assignment”, b = “yep”, c = nil o a, b = b, a  a and b have swapped values o a = a or b  if not a, a = b

Tables EVERYTHING IS A TABLE

Typing and scope Strongly typed Dynamic typing local keyword specifies non-globals Symbol table easily accessible

Special features Metatables Closures Special allowance for object oriented programmers

Metatables None by default, added with setmetatable Metamethods include: o add o sub o mul o div o mod o pow o unm o concat o len o eq o lt o le o index o newindex o call

Closures a function inside of a function inner function has access to local variables of the outside function

Object-oriented Features No classes, only prototypes Syntactic sugar for methods: function table.func(self, args) can be written as table:func(args)

Application Areas

GAMING Notables include World of Warcraft, FarCry, the CryENGINE2, Garry’s Mod, Angry Birds

Application Areas Cont’d IDE’s Operating Systems Plain Text Editors Robotics

Demo

Conclusion

References The Evolution of Lua Programming in Lua, first Edition