LUA-Script

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
OrangeJuice
User
User
Posts: 24
Joined: Sat Jul 24, 2010 11:56 am

LUA-Script

Post by OrangeJuice »

I would really love if LUA (http://www.lua.org/) was included in PureBasic as an scripting engine, that is, not as a means to write PureBasic Programs in LUA, but to have a native PureBasic way to instantiate an/multiple LUA interpreter/interpreters and let it run Custom scripts.

That way it would be easy to write script expandable PureBasic applications.
I'm aware of the fact that there was once an external Library for that, but it was Windows only unfortunately.

LUA is distributed under the MIT license, so from a licensing perspective it wouldn't be a problem to integrate.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: LUA-Script

Post by DoubleDutch »

Good idea.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: LUA-Script

Post by IdeasVacuum »

I have only used it on the Windows Platform but I find LUA to be a really nice language.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
max_aigneraigner@web.de
User
User
Posts: 67
Joined: Sun Nov 02, 2008 10:37 pm
Location: Bavaria
Contact:

Re: LUA-Script

Post by max_aigneraigner@web.de »

but.. isn't there already an userlib?
Lua Purebasic Download

it's for pb 4.0 but it should work fine with pb 4.5 aswell, i hope. (it did with pb 4.4)
good luck. I hope it's not all german (but I don't think so..^^)
3D Projects
A ship is safest in the harbor, but that is not what ships are built for.
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Re: LUA-Script

Post by X »

Does that library work well in both 32bit and 64bit compilers?
jamirokwai
Enthusiast
Enthusiast
Posts: 796
Joined: Tue May 20, 2008 2:12 am
Location: Cologne, Germany
Contact:

Re: LUA-Script

Post by jamirokwai »

Hi,

is LUA available (and usable) with Linux and Mac OS X?
If so, I'd like to see some kind of support for LUA in PB...
Regards,
JamiroKwai
OrangeJuice
User
User
Posts: 24
Joined: Sat Jul 24, 2010 11:56 am

Re: LUA-Script

Post by OrangeJuice »

The Userlib is Win32 only, not in development for years and for an old version.
Little John
Addict
Addict
Posts: 4777
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: LUA-Script

Post by Little John »

jamirokwai wrote:is LUA available (and usable) with Linux and Mac OS X?
The Lua website writes:
"Lua is distributed in a small package and builds out-of-the-box in all platforms that have an ANSI/ISO C compiler."

Regards, Little John
Seymour Clufley
Addict
Addict
Posts: 1264
Joined: Wed Feb 28, 2007 9:13 am
Location: London

Re: LUA-Script

Post by Seymour Clufley »

But why LUA?
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
User avatar
max_aigneraigner@web.de
User
User
Posts: 67
Joined: Sun Nov 02, 2008 10:37 pm
Location: Bavaria
Contact:

Re: LUA-Script

Post by max_aigneraigner@web.de »

Lua is very fast.
you can easily update your software by changing the lua-code instead of recompiling the whole exe etc.
you can use your lua-skills in plenty other software that use lua skripts (for example you can use lua in the leadwerks engine aswell etc)
but the major positive aspekt is - in my opinion - that you can change your running software just by writing some codelines into your program (without compiling).

Here is a link of who and how/why uses Lua
3D Projects
A ship is safest in the harbor, but that is not what ships are built for.
OrangeJuice
User
User
Posts: 24
Joined: Sat Jul 24, 2010 11:56 am

Re: LUA-Script

Post by OrangeJuice »

Not to mention it is insanely small and likely not much pain to support.
It is one of the most widely used scripting languages in game development, powering titles such as the Far Cry/Crysis franchise and World of Warcraft.
Post Reply