
WERE YOU REDIRECTED HERE? The Official Lua4Delphi website is currently under development. This page serves as a temporary location from which you can find out more information on the project, and what it can do for you!
This page is to serve as a short description of Lua4Delphi and its features. You can read the incredibly long details on this blog post.
THIS PROJECT IS NOT RELATED TO THE ABANDONED ONE ON SOURCEFORGE!
Download Lua4Delphi
Full release details (including SVN URL and credentials) can be found in this article.
Lua4Delphi Implementation Examples
The best way to understand what Lua4Delphi is, how it works, and what it can do for you is simply to take a look at some Implementation Examples.
Part 1 – Registering Globals, Reading Globals, Registering and calling Delphi methods from Lua.
This page is due to be removed…
The official Lua4Delphi website is in development, and (once launched) this page will be removed.

February 9, 2011 at 1:36 pm
pretty good news~
Pingback: Lua4Delphi Fundraiser | Reinvent The Wheel
October 20, 2011 at 3:52 pm
Right now we are using another project for our need of scripting inside a in memory DB.
We would like to try to test this Lua4Delphi projects, regarding its performances.
Is it possible?
October 20, 2011 at 4:11 pm
I can make this available to you quite soon. Right now I’m doing wrapper unit generation passes, testing them, tweaking the code model and regenerating. The reason for this level of “attention to detail” is that producing the best code model to register Delphi Types with Lua is actually very difficult (a lot more than I ever considered back when I began this project).
I am remarkably close to being able to provide a pre-release “working copy” to those whom donated during the fundraiser, and at this time I’ll happily provide a pre-release copy for your company to play with! I know you’ll be impressed, even without the Professional version’s automated tools to drastically speed up and simplify integration!
With version 1 (which I won’t release because it was frighteningly difficult to integrate into your own applications) I managed to make property value retrieval and assignment so fast the profiling tool could not even measure it (it just provided its minimum value of 1ns for even a loop of 100 operations). This same degree of performance (most likely even improved further) will be seen in Version 2.
The performance of String Parsing Operations in Lua absolutely defeats that of Delphi-compiled applications themselves, so much so that comparing the two is like comparing apples and oranges: they are worlds apart!
I’ve added your e-mail address to my list of test requests, and I’ll e-mail you with a copy as soon as I’m ready to make it available!
December 1, 2011 at 10:45 pm
I’d like to get a version 2 also, even the pre-released version in order to test it with delphi 2010 and soon for XE. Tell you a few of my plans, I’m made a framework using lua for VoIP application (FreeSwith proyect, google it); but now I’d to compile my framework into a Dll or something like that in order to spread the framework. Your proyect sounds to interesting.
Regards
Arturo Monroy
December 2, 2011 at 2:01 am
If you’ve already got your Lua bindings in place, you can easily make it into a DLL… just remember to export a Lua-compliant cdecl function called “luaopen_” (replace “” with the filename you give to the DLL. Add an aliased export with the name “luaopen” to the same function.
Bingo! When you call require(“mylib”) from Lua, it’ll mount your DLL and execute that luaopen_ function, in which you provide the initial code to register your bindings
October 25, 2011 at 7:32 am
Thank you really much. If I would find out about the project before I would for sure try to push my boss to get into the foundraiser. But unluckily I just found it.
Right now we are using another product that is quite impressive too: it is a in memory compiler to ASM, but it is not open source and i’m feeling we will have problems in the future to find support for it if the company will close. Being a one-man-company it is a probable future for it.
Thank you really much!
October 27, 2011 at 12:31 pm
I can’t find download .
October 27, 2011 at 1:01 pm
That’s because it’s not available yet (as it says on this page)!
October 28, 2011 at 8:14 am
Thanks for Simon Stuart. Let’s Look forward to it.
October 30, 2011 at 5:25 am
what time we can use lua4delphi?
October 30, 2011 at 8:00 am
Objective is to release before christmas!
October 30, 2011 at 12:42 pm
Great,thanks for Simon Stuart.
October 30, 2011 at 4:44 pm
Sorry it can’t be available right now… however, version 1 (which has been complete for almost a year now) is so difficult to integrate into a project, and requires so much code to do the most basic things, for the sake of everyone I just cannot release that.
It’s worth the wait, I promise you that!
Version 2, however, is a work of art (even if I say so myself)
December 29, 2011 at 9:48 pm
Please, hurry up
im waiting for this for ages!
December 29, 2011 at 11:46 pm
Hit another major milestone with this less than an hour ago… related to the massive change I’ve made enabling you to choose your linkage type (Static, Dynamic or Embedded).
Moving it along right now (just took a moment to check my comments)
December 30, 2011 at 11:00 am
Great
i dont want to look like an inpatient guy but, your’s lua4delphi is more important for me than ever… my life almost depends on it
January 2, 2012 at 1:39 am
It’s coming as fast as I can get it ready! Easy to use = hard to develop
January 2, 2012 at 12:16 am
http://stackoverflow.com/questions/8696249/fmx-form-in-a-dll-firemonkey-delphi im Talibek
the same project about the form/dll is the same im waiting for your lua4delphi.
January 2, 2012 at 1:39 am
I’ve spent all of xmas and new year (and every day between) working on nothing but Lua4Delphi… it’s getting there!
January 2, 2012 at 2:15 pm
hey! Simon! dont overwork your self!! im counting on it BUT i dont want to have you on my conscience… Family first, then work!
January 2, 2012 at 2:39 pm
No such thing as “overwork” when you’re doing something you love
January 4, 2012 at 1:05 pm
whats the estimated time till release??
January 15, 2012 at 2:21 pm
Set the date as February 1st, at whatever state of completion it is at on that date…. reason being is that it is essentially functional enough at this point for people to start using.
January 15, 2012 at 4:42 pm
thats wayy to long for me… need to stick to lua5.1 delphi wrapper…
January 15, 2012 at 6:31 pm
What functionality do you require specifically? Just passing values between Lua and Delphi, calling Delphi functions from Lua, and Lua functions from Delphi? Or do you require the full Class Wrappers to expose entire Delphi objects to Lua?
January 18, 2012 at 12:41 pm
I start with Dennis D. Spreen (http://www.spreendigital.de/blog) TLua wrapper to Lua5.1 ) : I can’t wait february for my work.
I’m using Lua in multi (delphi) threads and I’m developping synchronization between them (based on TSemaphore, TMutex, TEvent, … objects)
I’m interrested to port them to lua4delphi if they is a svn (git, mercurial or other) repository for collaborative work
January 19, 2012 at 4:41 am
Simon will Lua4Delphi 2 support Interfaces and DLL loading and linking inside lua scripts?
January 19, 2012 at 12:59 pm
You can use the “Alien” module for Lua, which allows you to load/link DLLs from your Lua scripts…. or you can link the DLLs from your Delphi app and expose their methods to Lua.
January 20, 2012 at 1:08 am
Excellent, And what about Interfaces (IInterface or IDispatch and descendants) types?
Will this be supported in the future?
January 20, 2012 at 1:11 am
That depends what you mean, exactly…
Remember: Interfaces don’t have an Implementation! They’re just a prototype to be used within a Class. Since those classes themselves can be registered with Lua, you’re already able to use the implemented form of those Interfaces.
What I am adding at the moment is the ability to explicitly append the methods defined by an Interface to a qualifying Object Instance’ metatable… this should then meet even the most complex usage scenario for Interfaces from Lua
January 20, 2012 at 6:03 pm
Seems quite interesting.
Wel i was thinking when working with a modular appliction and you have DLLs, then you will want to manage an api to do some work.
This could be also usefull when working with dlls that are not made in delphi and that erturn interfaces.
For example in the script (pascal)
var IGIS: IGIS_Api {interface}
IGIS_layer: IGIS_Layer;
begin
{start pseudocode}
1) load the dll that contains a GIS Api.
2)/bind the method GetGisApi method to the one existing in the dll. GetGisApi resturn an interface for TGIS_API
{end pseudocode}
IGIS := GetGisApi; {returns an instance created inside the dll}
IGIS_Layer := IGIS.GetLayer(‘MyLayer’);
IGIS.DoSomething;
end;
Maybe not for now, but its a powerfull feature that some time could be included. Most of the delphi scripter I have seen (PaxScript, PaxCompiler, TMS Scripter Stuido).
I use TMS Scripter studio, not the most powerfull or faster, but it has a way to use interfaces inside the scripts. Obviously all the Interfaces should be inherited form IDispatch and all classes that you want to use in your scripts as interfaces should implement a TObjectDispatch or inherited from it, and use the {$METHODINFO ON} and {$METHODINFO OFF} before and after the class declaration.
Don’t know exactly what is the function of {$METHODINFO ON} and {$METHODINFO OFF}, I’m an ignorant, but it is also used when wanted to work with JavaScript and the TWebBrowser and link methods and classes to and from Delphi.
I don’t declare/define the interfaces and their respective classes in the scripts, they are declared at the program side and consumed in the script.
Should be a good feature to add later
Just wanted to give my two cents
Keep doing the nice job you’re doing.
February 2, 2012 at 4:06 pm
Any new on a release date? I’m eager to start using this
.
February 3, 2012 at 9:05 pm
See latest post please!
Pingback: /*Prog*/ Delphi-Neftalí /*finProg*/ » Una quincena más… (08/02/2012)