Domain: lua.org
Stories and comments across the archive that link to lua.org.
Comments · 125
-
Re:You can talk about this all day, but...
> There's nothing to stop you from cleaning up the function naming. We'd all appreciate it
:-)
You mean the patch or the resulting flamewar on internals:P
> write a custom server in c designed to load modules that serve just the content you want served.
Been there, done that.
> Yes, the function naming in php is crap. Show us a scripting language where it isn't.
lua ;-) -
3D on LUA
This is a great thread. There are so many 3D alternatives out it will be great to see what this thread comes up with. I am only disappointed this topic didn't get rated as a major story on Slashdot.
Not to downplay the benefits of programming in C++, I think it is better to focus game development using scripting language rather than for C++. When I started writing games on the Apple II+ I wrote everything in 6502 assembly but with lores B&W graphics. Today the successful game developer no longer has that luxury. ;-)
Game development now requires imagination, creativity, artistic talent and often times story telling ability in addition to programming talent. IMHO it is better to balance your time developing all the different parts of a game than to waste cycles on the ins and outs of C++ (or assembly). I believe this is why the LUA (open source) scripting language has seen so much success in the development of video games. Games such as Grim Fandango and Escape from Monkey Island published by Lucasarts and Neverwinter Nights and MDK2 developed by Bioware were written in LUA. More information about LUA can be found here: http://www.lua.org/ and here: http://www.gamedev.net/reference/programming/featu res/lua.
There are no less than five (and probably more) major 3D engines tied to LUA: Ogre3D (using Emma3D http://emma3d.sourceforge.net/, Irrlicht http://irrlicht.sourceforge.net/ (using https://sourceforge.net/projects/irrlua/, Apocalyx http://apocalyx.sourceforge.net/, Luxina http://www.luxinia.de/, and Electro http://www.evl.uic.edu/rlk/electro/index.html
I am just getting started learning LUA (for a 2D game - another advantage of learning LUA - the ability to grow) so I make no claims to know which 3D engine is the best. There may be other 3D engines integrated to LUA out there and I would love to hear from other people who have experience developing games using LUA and from people developing 3D games using LUA. -
Re:Dammit
What really needed to be added to Vista is a concept of the "source" of code execution. In the case of UAC there should be the notion of not only the code execution but of the source, such as a keyboard, mouse or other input device. These sources identify execution requests as coming from a HUMAN, and not some nasty zombie pc making virus
IANAP (I Am Not A Programmer), but this concept dinged a little lightbulb over my head with the commonly-used Windows and Mac application known as World of Warcraft. :)
For those unfamiliar, their LUA-based UI system is built around giving users capability to script functions. These can be short macros of native commands and LUA language, or full-fledged addons, made up of 3rd-party LUA code + XML executed by the client and interpreted by the server to run complex functions. The idea is that these macros and addons can lessen the burden of repetitive tasks and make the game more fun. Build your addon, assign it to a key or mouse button, and when that key is pressed or click is registered, the code is run and interpreted. The setup also allows Blizzard to alter the available libraries or functions too, to extend capabilities or limit them from version to version. If they don't like how your addon impacts gameplay, they can (and have, especially with their recent 2.0 release) disable the functions it uses.
Are their hacks that can change how WoW.exe works? Sure, there've been lots of them, and I'm sure there's lots more, but I wouldn't know because I don't seek out or use the hacks (IANALACE - I Am Not A Lame-Ass Cheater Either :) ). Basically though, all legit actions in game are driven by hardware events. You can't run a bot script to run around, follow players and help them while you go eat a sandwich. You need to be there, pressing buttons and clicking the mouse. Thus, there's nothing there that Microsoft couldn't have borrowed from Blizzard functionally. Hardware clicks are client-space, or userland. Anything important is on the server, or kernel space. MS could've used this, but instead, now they check to see if you really meant to do that. Awful design, and something they could've learned to avoid by stealing from one of the most popular applications run on their platform. -
Re:Dear god no.
If we are talking about embeddable scripting languages and Lisp is the point of comparison, I'd prefer Lua over JavaScript, Python and Ruby. Of these four languages, only Lua has tail-call-optimization (though JavaScript 2.0 is slated to have TCO). For a direct comparison to Lisp, I've translated the first chapter of SICP in these scripting languages (as well as some other FP languages): SICP in other PLs
Thanks,
Chris -
Re:Makes more sense than Java
``Also though it is slightly off-topic I also think that Java under GPL would not benefit as much because the model of contribution is really not as easily understood as the OS world.''
With all the complaints about the Java community process being slow and bureaucratic, and the free Java implementations lagging behind in features, I think having a good, open source Java implementation is a Good Thing in it's own right.
Also, I don't know what you mean by the model of contribution for Java not being as easily understood as the OS world. It's not like there aren't any successful open source programming language implementations yet. -
AlternativesIn light of the recent MS/Zend announcement and because I've been suffering PHP for too long, it's time for me to start recoding all my sites. I've been looking for a replacement and I narrowed it down to these contenders:
- Erlang - Do I really want to recode all my apps using tail recursive functions?
- lua - Love the language but there's breakage between versions and poorly maintained libs.
- Haxe - New, I don't do flash. I'm only interested in server side code.
- Pike - Much cleaner and faster than PHP.
What language/runtime combination are other PHP users looking to switch to?
Perl, Python and Ruby zealots need not respond! - Erlang - Do I really want to recode all my apps using tail recursive functions?
-
Re:data description language; Lua vs Guile
Yeah, quite a numeric tower it has, eh?
They address this issue in the book's section on numbers.
It's a scripting language that was designed toward the end of the 20th century. It doesn't need all sorts of integers and whatnot. If you need to care that much about speed, memory consumption, etc, you shouldn't be using an interpreted language in the first place. In the domain for which Lua was designed, tall numeric towers are rice. -
Re:hello world
You got a few things wrong:
0) You need the parentheses on function calls.
False, f("a string") is equivalent to f"a string" and f({a = b}) is equivalent to f{a = b}
a) Only data structure is hash tables
False, lua tables contain both a hash table part and a pure array part. The runtime figures out how to store stuff internally. As a lua programmer, you never need to care, but if you're only using positive integer keys between 1 and N, with few gaps, it will most likely be stored as an array.
e) No semicolon separator
False, there is a semicolon seperator, but in most cases, you don't need it. a = 4 b = 6 can only be interpretered in one way so you don't have to write a = 4; b = 6, even though you can, if you want.
i) An extremely quirky stack based interface to C. Some api's pop their arguments some don't. They should do it the Forth way (words consume their arguments) or not automatically pop anything. Pick one, not both. And please, some simple stack operators (swap, drop, dup, roll, etc.)
Lua's popping of arguments is not really a problem, just read the manual, it's very clearly described how they behave. Also lua does have lots of stack operators, see the manual. lua_pushvalue(L, -1) would correspond to a dup. lua_insert(L, -2) would correspond to a swap. If by drop you mean pop off elements from the stack, see lua_pop. I couldn't find a roll operator, but that is just a series of inserts anyway. Other interesting stack operations are lua_remove, lua_replace. I am sure you can find enough stack operators to get by. -
Re:data description language; Lua vs Guile
Absolutely: The Lua interpreter source code is very clean and well written, and wonderfully portable and platform agnostic.
Here's the source code that you can view online -- there isn't much to it! Four global header files, 19 core C files, 19 core header files, 10 library C files, 1 interpreter C file, and 2 compiler C files. Here is the main loop of the virtual machine -- notice that there are only 38 opcodes!
A great example of some interesting code written in Lua is the Auctioneer add-on for World of Warcraft (screenshots, manual). Here's the index of the Lua sources, and an interesing Lua file that calculates statistics on auction items. This code depends on features provided by the WOW client (implemented in C++ or whatever), as well as other Lua scripts loaded into the client.
One important reason to learn and consider using Lua, is that it's by far one of the fastest and smallest of all the interpreted scripting languages, on the Programming Language Shootout. It totally smokes most other scripting languages.
Here are the ratios of interpreted languages compared to compiled C code, in order of SPEED (the number is how many times slower it is than C, smaller is better unless you make your living by wasting time):
Lua: 6.4; Python: 7.4; Pike: 8.3; Tcl: 8.7; Perl: 9.0; Scheme MzScheme: 11; PHP: 13; Icon: 14; Smalltalk GST: 15; Ruby: 16; JavaScript SpiderMonkey: 32;Here are the ratios of interpreted languages compared to compiled C code, in order of SIZE (the number is how many times bigger it is than C, smaller is better unless you make your living by selling memory):
Lua: 2.5; Haskell GHC: 2.8; SML MLton: 3.4; Python: 4.1; Perl: 4.3; Tcl: 5.1; Icon: 5.4; Ruby: 6.0; C# Mono: 6.3; Pike: 6.8; PHP: 7.1; Oberon-2 OO2C: 7.9; Erlang HiPE: 7.9; Java JDK -server: 9.1; Scheme MzScheme: 9.2; Mozart/Oz: 9.8; Scala: 10; Lisp SBCL: 10; Smalltalk GST: 13; Smalltalk VisualWorks: 15; JavaScript SpiderMonkey: 30;Lua is even better than several compiled languages (like Java) when it comes to its size! Like Java, Lua also has a "just in time" compiler, but that was not used in these benchmarks (although I presume Java's was, because Java did very well with speed but not memory usage).
I think it's laughable that someone would put their time into learning a faddishly popular language like Ruby, but would then not consider learning a technically superior language like Lua, since Ruby scores so badly on these benchmarks compared to Lua, Lua has been around a lot longer than Ruby, and it had already proven itself in many commercial products (like WOW).
Lua really is far ahead of the pack of other languages in many ways, BECAUSE it's so clean and well designed. Plus its licensing terms are excellent, it's extremely portable, easy to embed and integrate with applications, and SWIG supports it well. So it's definitely well worth learning.
-Don
-
Re:data description language; Lua vs Guile
Absolutely: The Lua interpreter source code is very clean and well written, and wonderfully portable and platform agnostic.
Here's the source code that you can view online -- there isn't much to it! Four global header files, 19 core C files, 19 core header files, 10 library C files, 1 interpreter C file, and 2 compiler C files. Here is the main loop of the virtual machine -- notice that there are only 38 opcodes!
A great example of some interesting code written in Lua is the Auctioneer add-on for World of Warcraft (screenshots, manual). Here's the index of the Lua sources, and an interesing Lua file that calculates statistics on auction items. This code depends on features provided by the WOW client (implemented in C++ or whatever), as well as other Lua scripts loaded into the client.
One important reason to learn and consider using Lua, is that it's by far one of the fastest and smallest of all the interpreted scripting languages, on the Programming Language Shootout. It totally smokes most other scripting languages.
Here are the ratios of interpreted languages compared to compiled C code, in order of SPEED (the number is how many times slower it is than C, smaller is better unless you make your living by wasting time):
Lua: 6.4; Python: 7.4; Pike: 8.3; Tcl: 8.7; Perl: 9.0; Scheme MzScheme: 11; PHP: 13; Icon: 14; Smalltalk GST: 15; Ruby: 16; JavaScript SpiderMonkey: 32;Here are the ratios of interpreted languages compared to compiled C code, in order of SIZE (the number is how many times bigger it is than C, smaller is better unless you make your living by selling memory):
Lua: 2.5; Haskell GHC: 2.8; SML MLton: 3.4; Python: 4.1; Perl: 4.3; Tcl: 5.1; Icon: 5.4; Ruby: 6.0; C# Mono: 6.3; Pike: 6.8; PHP: 7.1; Oberon-2 OO2C: 7.9; Erlang HiPE: 7.9; Java JDK -server: 9.1; Scheme MzScheme: 9.2; Mozart/Oz: 9.8; Scala: 10; Lisp SBCL: 10; Smalltalk GST: 13; Smalltalk VisualWorks: 15; JavaScript SpiderMonkey: 30;Lua is even better than several compiled languages (like Java) when it comes to its size! Like Java, Lua also has a "just in time" compiler, but that was not used in these benchmarks (although I presume Java's was, because Java did very well with speed but not memory usage).
I think it's laughable that someone would put their time into learning a faddishly popular language like Ruby, but would then not consider learning a technically superior language like Lua, since Ruby scores so badly on these benchmarks compared to Lua, Lua has been around a lot longer than Ruby, and it had already proven itself in many commercial products (like WOW).
Lua really is far ahead of the pack of other languages in many ways, BECAUSE it's so clean and well designed. Plus its licensing terms are excellent, it's extremely portable, easy to embed and integrate with applications, and SWIG supports it well. So it's definitely well worth learning.
-Don
-
Re:data description language; Lua vs Guile
Absolutely: The Lua interpreter source code is very clean and well written, and wonderfully portable and platform agnostic.
Here's the source code that you can view online -- there isn't much to it! Four global header files, 19 core C files, 19 core header files, 10 library C files, 1 interpreter C file, and 2 compiler C files. Here is the main loop of the virtual machine -- notice that there are only 38 opcodes!
A great example of some interesting code written in Lua is the Auctioneer add-on for World of Warcraft (screenshots, manual). Here's the index of the Lua sources, and an interesing Lua file that calculates statistics on auction items. This code depends on features provided by the WOW client (implemented in C++ or whatever), as well as other Lua scripts loaded into the client.
One important reason to learn and consider using Lua, is that it's by far one of the fastest and smallest of all the interpreted scripting languages, on the Programming Language Shootout. It totally smokes most other scripting languages.
Here are the ratios of interpreted languages compared to compiled C code, in order of SPEED (the number is how many times slower it is than C, smaller is better unless you make your living by wasting time):
Lua: 6.4; Python: 7.4; Pike: 8.3; Tcl: 8.7; Perl: 9.0; Scheme MzScheme: 11; PHP: 13; Icon: 14; Smalltalk GST: 15; Ruby: 16; JavaScript SpiderMonkey: 32;Here are the ratios of interpreted languages compared to compiled C code, in order of SIZE (the number is how many times bigger it is than C, smaller is better unless you make your living by selling memory):
Lua: 2.5; Haskell GHC: 2.8; SML MLton: 3.4; Python: 4.1; Perl: 4.3; Tcl: 5.1; Icon: 5.4; Ruby: 6.0; C# Mono: 6.3; Pike: 6.8; PHP: 7.1; Oberon-2 OO2C: 7.9; Erlang HiPE: 7.9; Java JDK -server: 9.1; Scheme MzScheme: 9.2; Mozart/Oz: 9.8; Scala: 10; Lisp SBCL: 10; Smalltalk GST: 13; Smalltalk VisualWorks: 15; JavaScript SpiderMonkey: 30;Lua is even better than several compiled languages (like Java) when it comes to its size! Like Java, Lua also has a "just in time" compiler, but that was not used in these benchmarks (although I presume Java's was, because Java did very well with speed but not memory usage).
I think it's laughable that someone would put their time into learning a faddishly popular language like Ruby, but would then not consider learning a technically superior language like Lua, since Ruby scores so badly on these benchmarks compared to Lua, Lua has been around a lot longer than Ruby, and it had already proven itself in many commercial products (like WOW).
Lua really is far ahead of the pack of other languages in many ways, BECAUSE it's so clean and well designed. Plus its licensing terms are excellent, it's extremely portable, easy to embed and integrate with applications, and SWIG supports it well. So it's definitely well worth learning.
-Don
-
The lua language
I just discovered Lua and I got my PiL today. Its an fantastic language! It executes faster than perl, php, python and ruby. It is alot smaller, round 200kb, which is less than 1/10 of a minimal php installation and it has a reasonable Licence (MIT).
The main drawback is the lack of good standard libraries and the build system (for lua 5.1) don't support DSO's on linux. Debian has some patches that uses libtool to build it.
There is an interesting projocet named haserl that will allow you to embed lua in html pages.
First Edition of the book is available online
-
lua uses
http://www.lua.org/uses.html list an impressive amount of project (many of them games) using lua.
-
ref book online
Every page has a donation or Amazon link...
Anyways the ref book is online:
http://www.lua.org/manual/5.1/ -
Re:Too bad JavaScript is THE WORST language
Oh yes there is quite a lot about Lua's design that make it inherently much more efficient that JavaScript. Why do you think it's SO MUCH faster and smaller -- mere coincidence?
Have you ever looked at either the Lua source code or the SpiderMonkey source code, or compiled either of them yourself, or are you just pulling that statement out of your ass?
-Don
-
What about Lua?
Lua has got awfully little attention in this discussion. I admit that I haven't tested it yet myself, but got really interested when it was mentioned in the book review Write portable code as the author's tool of choice.
The real surprise, albeit a pleasant one, was the inclusion of Lua; a scripting language designed for platform portability and which seems to have managed to fully mature without making a blip on most geeks radar screens.
I like that Mr. Hook has experience writing portable software. This matched with his authorship of the Portable Open Source Harness (POSH) portability library and his contributions to the Simple Audio Library (SAL) gives a great deal of credence to his writing.
Lua's about page suggests that it could be an even better tool for learning than Python is.
-
What about Lua?
Lua has got awfully little attention in this discussion. I admit that I haven't tested it yet myself, but got really interested when it was mentioned in the book review Write portable code as the author's tool of choice.
The real surprise, albeit a pleasant one, was the inclusion of Lua; a scripting language designed for platform portability and which seems to have managed to fully mature without making a blip on most geeks radar screens.
I like that Mr. Hook has experience writing portable software. This matched with his authorship of the Portable Open Source Harness (POSH) portability library and his contributions to the Simple Audio Library (SAL) gives a great deal of credence to his writing.
Lua's about page suggests that it could be an even better tool for learning than Python is.
-
Re:The way I see things...
Lua users, just a list of users and applications people have never heard of like Lucas Arts (Monkey Island, Grim Fandango) and Blizzard (WOW). A little history demonstrated that Lua is not some "me-too" language either. If you're serious about programming, you've used or at least heard of Lua.
-
Re:The way I see things...
Lua users, just a list of users and applications people have never heard of like Lucas Arts (Monkey Island, Grim Fandango) and Blizzard (WOW). A little history demonstrated that Lua is not some "me-too" language either. If you're serious about programming, you've used or at least heard of Lua.
-
Re:Wow
Perhaps Web 2.0 is tired?
No, PHP is tired. It's now all about Ruby, Python, LISP, and the more obscure but no less interesting Lua, Scala, Qi, OCaml, among others, and various derivatives and frameworks. -
Opinions from a kid that does program
I am a student in my final year of high school. Earlier this year I completed a two year diploma in programming (Java was my major language, but I also learned SQL and various programming and computing concepts), and have done a fair share of Lua scripting, along with basic C++. So I would say that some kids do still program, but we are in the vast minority.
The fact is that today's programs often require several programmers working for extended periods of time to produce anything even remotely impressive. Children's first encounters with the results of programming will most likely be in the form of games (whether they be recreational or educational), and this will be the level of programming to which they become accustomed. As such, when they learn how to print "Hello World" onto the screen for the first time, they are often less than ecstatic. When they learn that creating a fully functional GUI might take a bit more time and effort, all interest that they had in the wonderful world of programming often disappears.
This, coupled with the fact that most Computer Studies teachers can barely program, let alone teach programming, provides little incentive for kids to learn how to do anything themselves (my teacher, for one, has never taught the class the basics of OOP, and most students are afraid to ask a question, lest the teacher launch into an hour-long lecture on everything *other* than the subject of the question, and how Microsoft is the source of all his problems).
The problem is that most children are used to instant visual results, and have neither the time nor the patience to achieve those results from scratch (especially when doing so would result in comments such as "you should rather be picking up ladies, har har"). From my experience, most schools do not cater to these children either. They teach programming to those who are already willing to invest a lot of time and energy into it, and not to those who have a passing interest (there were over 60 people in my grade studying computers two years ago, now there are about 9).
I became interested in programming seriously about 5 or 6 years ago, in anticipation of the scripting that would be possible with Neverwinter Nights. I found that most teachers were less than eager to teach me a lot more about programming, and was forced to pursue my interests on my own (which, to say the least, was not very easy).
I think that, as games include the possibility for modification via scripting (NWN and WoW are just two examples), we will start seeing more and more kids interested in programming. Granted, there may be a learning curve involved, and the scripting can be a (sometimes) watered-down version of the real thing, but it can provide the instant result that will keep kids interested and the subject and wanting more.
-
Re:Totally fresh in programming
I hate to nit-pick, but it's worth noting that Lua is entirely platform-independent, requiring only an ANSI C compiler to build the complete interpreter and compiler set.
-
Lua!From the about box:
Lua the programming languageIt's cool to see folks like adobe using nifty languages like Lua. I've never used Lua but have been intrigued by it.
Anyone know how Lua is used in Lightroom?
-c
-
Lua
Everywhere I turn, there's someone saying I should use Lua. Anyway...
My shop is firmly into J2EE, and we get a great deal of service out of the JBoss container and also the relational database object idiom of Hibernate. There are plenty of things to not like about Java, but most of the criticism against it seems to come from a point of view that's not well informed about the power that Java has for certain kinds of applications.
Oh well, the people who participate in this kind of discussion are those who have time for it, I guess. -
Bad acronym
Made me instantly think of the Lua programming language.
-
Re:Is programming getting much harder?
-
Re:Python is nice but consider LUA for game script
Multithreading in Lua is easy. Lua provides the coroutine facility.
The reason the original post is modded +5 is that Lua really is an excellent game scripting language. Anybody who is looking at stackless Python as a game scripting language should at least know about Lua. -
Python is nice but consider LUA for game scripting
The game company I work for does cross platform console games for XBox, PS2 and GameCube. We use LUA as a scripting language. LUA is a small clean language with simple but powerful syntax. The run time memory footprint is pretty small (~100 kB) which is great when your writing your game for a console with less than 32MB available.
If you are thinking about scripting languages for your games consider LUA. http://www.lua.org/ -
Game Development with Lua, other projects
My officemate literally just purchased Game Development with Lua. It is a neat book.
However, Lua is used for other things, includinge the ion window manager, the SciTE editor, the Elinks text webbrowser and more. -
MISLEADING ARTICLE!!!
"Lua, a light-weight programming language made specifically for enhancing and extending games"
Wrong bitch!
Lua is *not* a language that was specifically made for enhancing games. True, it has a great use in enhancement and extension of games (in fact I use it in my game), but it is used in MANY pieces of software outside gaming. Here is proof.
For the bastards who are too lazy to click the link, here's a sample of the projects that use Lua (outside of gaming)
- Automatic configuration of network devices
- Heart Institute Monitoring Network
- CPC4400 Embedded Switching Platform
- Horus Alarm monitoring software
Unreal script is an example of a language designed specifically for games (or just a game in this case). Lua is not one of them. I would like to encourage the editors to check their submissions over thoroughly and stop mis-educating the Slashdot crowd. Of course, that's probably as likely to happen as Apple is to announce that they're switching back to PowerPC. We can hope, but it probably won't do no good. :( -
Scripting language talk...
From TFA:
When people talk about scripting languages, they often talk about things that are more toward having a developer be able to slap something together rally quickly and get a demo out the door in minutes. How fast the thing runs or how well the thing scales or how large a system you can build tend to be secondary considerations.
...This is nit-picking, I know, but I was under the impression that scripting languages were actually defined by the presence of an actively-running interpreter during execution, making it possible to, e.g., construct and execute statements at runtime with things like PHP's exec() or Lua's do(file|string) functions (see: http://www.lua.org/pil/8.html for discussion on dofile and Lua's status as a scripting language). I wasn't aware that capability for rapid prototyping or language speed had anything to do with it.
Taking that into consideration, then, would Java with JIT qualify as an interpreted or compiled language? I'm not sure, myself---any thoughts?
That aside, a solid interview. Java looks to be pretty interesting; though in its current form it does bug the hell out of me (System.out.println()? Yeah, yeah, OO, but come on, three nested levels of scope just to get to a command line?), its progress has been impressive, and it's an innovative idea.
-
Scripting language talk...
From TFA:
When people talk about scripting languages, they often talk about things that are more toward having a developer be able to slap something together rally quickly and get a demo out the door in minutes. How fast the thing runs or how well the thing scales or how large a system you can build tend to be secondary considerations.
...This is nit-picking, I know, but I was under the impression that scripting languages were actually defined by the presence of an actively-running interpreter during execution, making it possible to, e.g., construct and execute statements at runtime with things like PHP's exec() or Lua's do(file|string) functions (see: http://www.lua.org/pil/8.html for discussion on dofile and Lua's status as a scripting language). I wasn't aware that capability for rapid prototyping or language speed had anything to do with it.
Taking that into consideration, then, would Java with JIT qualify as an interpreted or compiled language? I'm not sure, myself---any thoughts?
That aside, a solid interview. Java looks to be pretty interesting; though in its current form it does bug the hell out of me (System.out.println()? Yeah, yeah, OO, but come on, three nested levels of scope just to get to a command line?), its progress has been impressive, and it's an innovative idea.
-
Lua?
Am I the only one who thought of the Lua programming language when I first saw the article headline?
-
LUA?I realize it's hard to come up with simple names, but it's going to be annoying trying to Google for stuff about Lua soon.
--
Evan (Really nifty language) -
Re:Contrast Japan with Brazil
Your portrayal of the situation in Brazil is at the very least unfair.
The Brazilian government is spending on developing the code base that will save them millions, but I'm sure government management software does not make Slashdot headlines like "a tool for hacking GTK+". Migrating to a Free Software platform does not involve only installing Linux distros; migrating the actual systems that run on top of the platform is the most substantial work.
Brazilian involvement with Free Software started in my home state, Rio Grande do Sul, where the state government started a big push for free software in its IT agency. The systems of the state's public bank were migrated to free software, and its very pleasant sight to see Tux in the ATM's wallpapers. Incidentally, it is also in Rio Grande do Sul that the International Forum on Free Software takes place (and where the World Social Forum was created). The party who was in state government when these initiatives took place has now won the federal elections, so these developments are now starting to take place in national scale. Brazil spends billions every year in proprietary software licenses -- yes, spend money installing free software is a great move, especially in the long run.
In my personal experience as a Brazilian from Rio Grande do Sul, I can say that the development of a culture of Free Software there is as important as funding coding. The Forums served as a great incentive to the FS project I'm involved with, the GoboLinux distribution, a project born in Rio Grande do Sul, Brazil. It was also in the Forums that I was exposed to another Brazilian Free Software project, the Lua language, which I now took part in my MsC project, funded by -- you guess -- the Brazilian government. So there's your "big project the Brazilian government funded on FOSS". Of course, we could use more research grants, but that's a more general problem of low incentive to science R&D (a recurring problem in the so-called Third World). At least, now, the grants are given by the government with the explicit condition that research results are made available under an OSI-approved license. To me, that's a great thing.
-
Where's Lua?
Uh... Where is Lua?
-
Python and XML?
Not that I hate Python and XML or anything, but I'd expect to see something lighter-weight and more extension-oriented, along the lines of Lua (which is accordingly much much more commonly used in commercial games than any other non-proprietary scripting language).
-
Re:Not the First Time
Another good example of python use in a game is Eve.
However lua has firmly taken the industry now. World of warcraft comes with a huge xml/lua based UI and tons of mods exist.
Painkiller, Massive assault, Monkey islands are all prominently putting lua symbols in their games. -
Re:Heh
-
Re:How much RAM?
How much physical RAM does Python require? Could its heap be squeezed onto something small like the GBA (32K RAM, comparatively unlimited ROM)?
The GBA has more RAM than that. It has 32 KB that is so-called "in-chip Work RAM", but according to these specs it also has 256 KB of on-chip work RAM. I'm not sure what the difference is, but I'm sure it can be worked with. After all, people have a gimped-out version of Linux (uClinux) running on the GBA, I'm sure a gimped out port of Pippy could work.
Pippy, you say? While you really couldn't run full-blown, real-deal Python, you could run Pippy, which is a much pared down version of Python for Palm OS. According to the Pippy README, "modern" POS devices have 256 KB of RAM. It may say 16 MB on the box, but that is storage, not heap. If it can be done on POS, it should be doable on the GBA. With the resources of the GBA, Lua would probably be a better fit, though.
It also would probably be possible to have a game pack that had more RAM, and then use it to extend the GBA's RAM, perhaps 8 MB. The GB can address 32 MB total. So, between RAM and storage, you could get a lot in a cart that the GBA could access.
Then... you right a hybrid multi-key/chording keyboard using the buttons on the GBA so you can program it on the device! Or, you could just do what's easier all around and buy a PDA. Even a cheap, older Pocket PC would do. I can run Python+Tkiner, Python+win32, Perl/Tk- not just CLI perl, but a GUI and all- on my old iPAQ 3650. It owns, even. -
Lua
Lua rocks.
-
Quantian articleI own the quantian.org domain. The following is from my article on the Quantian Distribution. Here is a brief run down of links, programs, and other goodies in Quantian.
- R, including several add-on packages (such as tseries, RODBC, coda, mcmcpack, gtkdevice, rgtk, rquantlib, qtl, dbi, rmysql), out-of-the box support for the powerful ESS modes for XEmacs as well as the Ggobi visualisation program;
- A complete teTeX, TeX, and LaTeX setup for scientific publishing, along with TeXmacs and LyX for wysiwyg editing;
- Perl and Python with loads of add-ons, plus ruby, tcl, Lua, and Scientific and Numeric Python;
- The Emacs and Vim editors, as well as Gnumeric, kate, Koffice, jed, joe, nedit and zile;
- Octave, with add-on packages octave-forge, octave-sp, octave-epstk, and matwrap;
- Computer-algebra systems Maxima, Pari/GP, GAP, GiNaC and YaCaS;
- the QuantLib quantitative finance library including its Python interface;
- GSL, the Gnu Scientific Library (GSL) including example binaries;
- The GNU compiler suite comprising gcc, g77, g++ compilers;
- the OpenDX, Plotmtv, and Mayavi data visualisation systems;
- it includes apcalc,aribas,autoclass,
-
Re:Lua takes off?http://www.lua.org/uses.html
Looks like it's already passed Mars and is well on it's way to Jupiter
:) -
Parrot
Maybe you should have a look at Parrot? The CVS includes a lot of working and non-working language-implementations which you could have a look at..
I also recommend you to have a look at Lua which is a minimalistic yet beautiful language.. -
Lua
I highly recommend Lua. It's a brilliant language. The code base is clean, portable, and easy to read.
http://www.lua.org
In fact, I recommend you not create a new language at all and just use Lua. It's a deceptively simple language that allows you to extend it through certain meta-constructs to become pretty much anything you need-- from simple data description to full Object-Orientation.
I once read through the entire dragon book with the intention of creating my own language; I gave it all up when I found Lua.
Good stuff. -
A few ideas
First, there are two kinds of small languages:
1. small languages like lua, io, and scheme that are small in the built-in libraries and in the total distro. These three are great places to start- both are small, OOPish, allow higher-order programming by passing classes, objects, functions and methods as objects.
2. Then there are languages that are big in some ways, but small in syntax. Some of these are easier to extend than so-called "little languages." The reason is usually that their syntax is small, in an isolated place, easy to get at, and meant to be modified. The two best examples for this are Smalltalk and Lisp. Both of these languages satisfy your other requirements and really kick ass for extention. Unlike the above languages, the so-called little-languages, most Smalltalk and Lisp dialects have big, useful libraries. Unlike a big fat language like perl or C++, having a useful library doesn't mean that the language is a huge pain in the ass to extend.
Both Lisp and Smalltalk have a number of implementations. I am a big fan of Squeak Smalltalk, though systems like Little Smalltalk or even GNU Smalltalk maybe worth checking out.
A lot of people here have bad feelings about Lisp-like languages. It's a shame, since Scheme, ISLISP (OpenLisp is a great implementation) and Common Lisp are all *very* powerful languages. You can be quite productive with them once you get over the part about whining about parens. But Lisp may very well be the best option here, there is a long history of people writing custom-syntaxes and language extensions. Look up Common Lisp macros- power almost beyond comprehension, a lot of fun to play with, and with an elegance all its own.
There are examples of people writing a C-like syntaxes for various Scheme implementations. IIRC, Gambit-C (a Scheme to C compiler) comes with one. On Cliki, there are a bunch of other alternative Scheme syntaxes listed.
To, one of the big advantages to using a language in the second category is that syntax extension/modification is done in the language itself, rather than in C. With that comes the familiarity of the language you're creating and the other benefits you gain by using a high-level language like Smalltalk or Common Lisp.
Just some thoughts... -
Lua was created in BrazilLua is an open-source scripting language that kicks ass. It was created in Brazil. I wonder if the open-source tendencies mentioned in the Wired article contributed to that.
mhack
-
Re:the GPL is a mine field.
I've had to struggle with this also, but after all is said and done, I'm moving our whole embedded platform to linux.
This has had a few repercussion; namely, we're also doing away with the whole Windows client side of the application and replacing it with a web-app. It turns out that when you have a highly evolved embedded web server, scripting language, and database, an active client becomes unnecessary and can be replaced with a web browser.
By the way, just in case anyone else is doing this, in the embedded space I've found that LAMP (Linux-Apache-MySQL-PHP) can be successfully replaced with LBSL (Linux-BOA-SQLite-LUA).
BOA is a little web server (less than 70KB). It uses the GPL license.
SQLite is a very efficient SQL database (about 200KB if you replace math library functions with an inline function). It is public domain.
LUA is a tiny (about 100-200KB, depending on modules compiled in) scripting language with a very elegant design. The math module can be rewritten to not use the math library. It uses the MIT license.
Each of these pieces of software has a different licenses, with SQLite and LUA basically allowing you to do what you please. BOA improvements must be opened up, however you can add functionality through CGI-like modules, and that will not need to be opened. -
I'd killed Java
-
Re:Cool
There are a couple prototype packages for Squeak. Very handy, especially for Morphic programming.
The most popular proto-based language is Lua. Surprised you didn't mention it. It is used in a lot of games. It has a class system too, but is a lot like NewtonScript. NewtonScript itself is an *awesome* proto language, and it's fun to play with Lua, it being so close in some ways.