Murga-Projects Forums
can u support this feature? - Printable Version

+- Murga-Projects Forums (
+-- Forum: Project Forums (/forumdisplay.php?fid=1)
+--- Forum: MurgaLua - General (/forumdisplay.php?fid=2)
+--- Thread: can u support this feature? (/showthread.php?tid=355)

can u support this feature? - jyf1987 - 11-17-2008 08:37 PM

as i have said on the last post,some package that i dont need,like when i wrote a console program,then i dont need gui package,else when i wrote a text processing program,then i dont need socket package ,etc
i see the current murgaLua interpreter can compile the script to an binari file,that's very powerful,then can u support an feature like this:
let people can diy which packages will in the interpreter,and then make a new interpreter,this feature will suit for many people i think

RE: can u support this feature? - mikshaw - 11-18-2008 03:10 AM

One of the main goals of murgaLua is to have uniform functionality on all supported platforms. Once you give users the choice to disable unwanted features you enter territory where scripts are no longer fully compatable with other users.
I had asked about this earlier. I typically don't use anything more than fltk, lfs, and the standard lua packages, and generally only use other people's scripts for reference, so I agree that it would be useful. You *can* edit the Makefile to build murgaLua with certain packages disabled, but I don't know offhand how to do it.

If you want to write a console program, you could use regular Lua and load whatever external modules you need at runtime.

RE: can u support this feature? - asafp - 11-18-2008 03:53 PM

Poor John. Can't please everyone. I could make a case for adding a lot more to murgaLua since it's not very big. A dwarf compared to Python and a helluva lot easier to manage. On the other hand, I could see the advantages of a "lite" murgaLua without FLTK. I don't know how big FLTK is, but I suspect it may be the largest component.

jyf1987, you might want to take a look at some of the other flavors of Lua out there. In particular, Lua AIO (all in one) and L-Bia (builtin program). I think it might be possible to take those two together and build a custom (roll your own) Lua interpreter with the pieces you want in one executable. And you can do this without makefiles and compiling C programs. Unfortunately, L-Bia doesn't seem to be completely functional yet.

RE: can u support this feature? - jyf1987 - 11-19-2008 12:24 AM

asafp as u have said L-Bia doesn't seem to be completely functional yet,so i try Lua AIO,the problem of Lua AIO is they load module from out file like *.dll or *.so while murgaLua just include them in the interpreter,that's why i am very love murgaLua,and the second is Lua AIO seems bigger on filesize,i dont know c programming,so i dont know why murgaLua support the some feature but much smaller on filesize

RE: can u support this feature? - asafp - 11-19-2008 02:17 AM

With Lua AIO, you only need to distribute the .so/.dll files that are required by your application. So, I think if you did the math on the AIO interpreter (.EXE) plus the .DLLs that are used in murgaLua, I think the sizes would be comparable. If you only distribute the interpreter and the .so/.dll files required for your application, the AIO solution should be smaller.

I agree that amongst murgaLua's many virtues, the fact that it's all contained in a single file is probably it's greatest strength. That and I don't have to boink around with makefiles.