of     1   

Little_Brother
#184134851Monday, February 22, 2016 8:10 AM GMT

Hey guys, I thought I'd start a discussion topic. I'm not much of a game creator, so bare with me. I've been a C programmer for many years, I've since been learning x86 Asm, I'll be fluent in a while. So tell me, how do you justify using such an objectively high level, comparitively useless language such as Lua? I don't mean to offend anyone, but the language is honestly unimpressive. That said, if you'd prefer this thread can also be about x86 Asm or C, which I am very experienced with.
spinywind
#184134880Monday, February 22, 2016 8:12 AM GMT

because its what roblox uses... and this a scripters forum on roblox...
AnonyAnonymous
#184134954Monday, February 22, 2016 8:16 AM GMT

The actual use depends entirely on preference and necessity. If you prefer to manipulate hardware functionality on a more direct level, Assembly/C is excellent to utilize. Nonetheless, the majority of individuals seem to prefer high-level abstraction, which is often much more "accessible" to beginners than low-level instructions. Given the simplicity of Lua, I would not consider it reasonable to compare the language to low/middle languages such as C or Assembly.
mudkip99
#184135993Monday, February 22, 2016 9:24 AM GMT

Well, for starters, who would willingly subject themselves program in assembly when you could use C? Even CE majors at my school (who do a lot of low-level hardware programming) pretty much only use C. Second, I do code in C/C++ (learning the latter right now), and was 'forced' to learn some ARM assembly for a low-level programming class I took last semester, and I program in Lua because it's fairly simple, pretty fun to code in, and it's what Roblox uses, and this IS a scripting forum on Roblox. Third, the purpose of scripting languages is to be simple. A lot of people at my school who are working on their third or fourth year game projects implement Lua or Python into their engines to implement gameplay because it can make a lot of the workflow go faster. Yes, you lose a lot of power moving over to a scripting language from a "real" programming language, but it certainly has it's places.
chimmihc
#184136086Monday, February 22, 2016 9:33 AM GMT

Lua is not meant to replace "lower level" langauges.
chimmihc
#184136568Monday, February 22, 2016 10:20 AM GMT

"Currently, many programming languages are concerned with how to help you write programs with hundreds of thousands of lines. For that, they offer you packages, namespaces, complex type systems, a myriad of constructions, and thousands of documentation pages to be studied. Lua does not try to help you write programs with hundreds of thousands of lines. Instead, Lua tries to help you solve your problem with only hundreds of lines, or even less. To achieve this aim, Lua relies on extensibility, like many other languages. Unlike most other languages, however, Lua is easily extended not only with software written in Lua itself, but also with software written in other languages, such as C and C++. Lua was designed, from the beginning, to be integrated with software written in C and other conventional languages. This duality of languages brings many benefits. Lua is a tiny and simple language, partly because it does not try to do what C is already good for, such as sheer performance, low-level operations, or interface with third-party software. Lua relies on C for those tasks. What Lua does offer is what C is not good for: a good distance from the hardware, dynamic structures, no redundancies, ease of testing and debugging. For that, Lua has a safe environment, automatic memory management, and great facility to handle strings and other kinds of data with dynamic size. More than being an extensible language, Lua is also a glue language. Lua supports a component-based approach to software development, where we create an application by gluing together existing high-level components. Usually, these components are written in a compiled, statically typed language, such as C or C++; Lua is the glue that we use to compose and connect those components. Usually, the components (or objects) represent more concrete, low-level concepts (such as widgets and data structures) that are not subject to many changes during program development and that take the bulk of the CPU time of the final program. Lua gives the final shape of the application, which will probably change a lot during the life cycle of the product. However, unlike other glue technologies, Lua is a full-fledged language as well. Therefore, we can use Lua not only to glue components, but also to adapt and reshape them, or even to create whole new components. Of course, Lua is not the only scripting language around. There are other languages that you can use for more or less the same purposes, such as Perl, Tcl, Ruby, Forth, and Python. The following features set Lua apart from these languages; although other languages share some of these features with Lua, no other language offers a similar profile: Extensibility: Lua's extensibility is so remarkable that many people regard Lua not as a language, but as a kit for building domain-specific languages. Lua has been designed from scratch to be extended, both through Lua code and through external C code. As a proof of concept, it implements most of its own basic functionality through external libraries. It is really easy to interface Lua with C/C++ and other languages, such as Fortran, Java, Smalltalk, Ada, and even with other scripting languages. Simplicity: Lua is a simple and small language. It has few (but powerful) concepts. This simplicity makes Lua easy to learn and contributes for a small implementation. Its complete distribution (source code, manual, plus binaries for some platforms) fits comfortably in a floppy disk. Efficiency: Lua has a quite efficient implementation. Independent benchmarks show Lua as one of the fastest languages in the realm of scripting (interpreted) languages. Portability: When we talk about portability, we are not talking about running Lua both on Windows and on Unix platforms. We are talking about running Lua on all platforms we have ever heard about: NextStep, OS/2, PlayStation II (Sony), Mac OS-9 and OS X, BeOS, MS-DOS, IBM mainframes, EPOC, PalmOS, MCF5206eLITE Evaluation Board, RISC OS, plus of course all flavors of Unix and Windows. The source code for each of these platforms is virtually the same. Lua does not use conditional compilation to adapt its code to different machines; instead, it sticks to the standard ANSI (ISO) C. That way, usually you do not need to adapt it to a new environment: If you have an ANSI C compiler, you just have to compile Lua, out of the box. A great part of the power of Lua comes from its libraries. This is not by chance. One of the main strengths of Lua is its extensibility through new types and functions. Many features contribute to this strength. Dynamic typing allows a great degree of polymorphism. Automatic memory management simplifies interfaces, because there is no need to decide who is responsible for allocating and deallocating memory, or how to handle overflows. Higher-order functions and anonymous functions allow a high degree of parametrization, making functions more versatile. Lua comes with a small set of standard libraries. When installing Lua in a strongly limited environment, such as embedded processors, it may be wise to choose carefully which libraries you need. Moreover, if the limitations are hard, it is easy to go inside the libraries' source code and choose one by one which functions should be kept. Remember, however, that Lua is rather small (even with all standard libraries) and in most systems you can use the whole package without any concerns." ~ http://www.lua.org/pil/p1.html
9661
#184136887Monday, February 22, 2016 10:52 AM GMT

because you can't make games with C on roblox. honestly I think C is better. but you cant make games with C on roblox
oni0n
#184137330Monday, February 22, 2016 11:25 AM GMT

chim did you type all of that good god, man #code cout << "Truth shall sit upon the lips of a dying man" << endl; //Matthew Arnold
9661
#184139395Monday, February 22, 2016 1:08 PM GMT

@oni0n he copied it off lua.org
oni0n
#184143812Monday, February 22, 2016 4:12 PM GMT

o i c #code cout << "Truth shall sit upon the lips of a dying man" << endl; //Matthew Arnold
DrHaximus
#184146700Monday, February 22, 2016 5:38 PM GMT

onion your siggy uses bad C++ practices, remove it at once or face the consequences >using the entire std namespace >using endl, flushing the stream
oni0n
#184146732Monday, February 22, 2016 5:38 PM GMT

no nerd #code cout << "Proof by analogy is fraud" << endl; //Bjarne Stroustrup

    of     1