Glossary

This is the place to feel happy and free and ask and answer for the meanings and definitions for strange programmer-words and complicated terminology.
i’ll try and keep the 1st post a full list, the entire Master Glossary.

API : a collection of functions and classes which can be accessed by scripts. (also see: ‘What is an API?’)
Argument : a piece of data that needs to be passed to a script or function. for example, renoise.app():show_status(“Status Message”). here, “Status Message” is the argument for the function ‘show_status’.
Array : a list. for example, list = {a,b,c} but other formats are possible. can be referenced, for example list[1] would give you ‘a’.
Array (Associative) : a list with key-value pairs, for example {{a,1},{b,2},{c,3}}, where you could say that ‘1’ is the key to the value ‘a’, etc. other formats also possible.
Class : a Generic Object, or Blueprint of an Object. if you put oprint(renoise.app()) in the terminal, you will get an overview of the name, functions and properties of the class ‘renoise.app()’.
Constant : a variable which is already defined. for example, renoise.ApplicationWindow.UPPER_FRAME_DISK_BROWSER
Constructor : a special kind of function/method for setting up an object (or creating a class). in the Renoise LUA API, the constructor is _init()
Function : a piece of script which does something. see also: Method.
Method : a function with a context, meaning it is attached to something (an object). for example, the method ‘show_status’ in renoise.app():show_status(“Status Message”) is a small script that shows the argument you give it in the Renoise status bar. a method on an object is often indicated with a colon before its name, but this is not mandatory.
Object : an object is born from a class, and holds its parent’s functions and properties etc.
Property : a place where information is stored. for example, the property .comments of song().comments holds the song-comments. a property is indicated with a dot before its name, as seen in this example.

Types : In LUA, any value has a type. LUA has 8 different types:

  • Boolean : True/False
  • String : some string of characters (including numbers etc), usually enclosed in quotes (" ")
  • Number : represents real (double-precision floating-point) numbers
  • Table : associative array (see ‘Array’ in the Glossary) -object reference
  • Function : function (see ‘Function’ in the Glossary) -object reference
  • Userdata : ? -object reference
  • Thread : ? -object reference
  • Nil : Nil. sorta same as false, but designed to be different from any other value.

Tables, functions, threads, and (full) userdata values are objects: variables do not actually contain these values, only references to them. Assignment, parameter passing, and function returns always manipulate references to such values; these operations do not imply any kind of copy.

Variable : a custom value you assign and use in scripts, and which you can re-assign at any time (hence the name).

nice!

i like that it’s sorted alphabetically :)

some concepts i’ll look further into include (i’ll mark the more important ones for me in bold)

method
http://en.wikipedia.org/wiki/Method_(computer_programming

constructor
http://en.wikipedia.org/wiki/Constructor_(computer_science

deconstructor
http://en.wikipedia.org/wiki/Destructor_(computer_science

General programming stuff like?
Variable
Table
String
Float(ing point number)

Do I remember something about LUA being fully Float with no Integers?

I’m surprised how little there is in useful results for putting lua glossary into Google.

@.xrns: ok i’ll check that out… where did you come across the terms ‘constructor’ and ‘deconstructor’? i’m not a total programming newbie but never heard those terms before.

@kazakore: yeah, the general programming stuff as well. just a simple uncomplicated glossary for terms you might come across.
fun thing is i got the idea for a Glossary from the #! (crunchbang) linux forums, where it was noted by someone how much such a thing could’ve helped him back then. so seems the same is hard to find for Linux as well.

i encountered these concepts at that wikipedia article on methods (in computer programming)

to avoid cluttering your glossary thread too much i’ll start a new thread about it and see if i can dissect some of taktik’s lua snippets for examples

ah, i see the term constructor used here in Classes.lua as well: ```

  • constructor “function MyClass:__init(args)” must be defined for each class,
    or the class can’t be used to instantiate objects
i think a 'constructor' is a term used to describe the way a class is set up, ie. which arguments it must take etc. i think it is not such an important term, but as we come across it now and then will be good to describe it anyway. must research this further though to get more clarity.

to reply to myself here above: yes, rhowaldt, you were right about the constructor thing. you should add it to the Glossary.

i’ve added some extra stuff about value-types to the Glossary as well. some of it gets a bit technical maybe but can’t really explain any better and will be clear with thorough reading and a little experience. also, not really required knowledge for a beginner but still useful in the Glossary, so that’s why.

In the Renoise Lua API, object constructor = __init()

No straightforward destructor, though. That said, destructors are rarely used.

thanks Conner, clear. your tips have made it possible to get a better Glossary definition for Constructor, Class and Object!