News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Does Luac work ?
Author Message
chrimo
Member
***


Posts: 94
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #1
Does Luac work ?

Hello Community,

is it possible to compile murgaLua interpreter code like it luac does ?
At standard distribution murgaLuac is not included Big Grin

Thanks for pros and cons
Bye
Christian

07-12-2007 06:02 AM
Find all posts by this user Quote this message in a reply
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #2
RE: Does Luac work ?

I was waiting to see if someone else would respond to this, since I honestly don't know whether or not I understand your question. It sounds like luac might be similar to LuaJIT, which was mentioned here in another post just before you asked your question.
http://www.murga-projects.com/forum/show...php?tid=96
http://luajit.org/

07-13-2007 01:35 PM
Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #3
RE: Does Luac work ?

Hi,

They are a little different, luac compiles lua code to lua bytecode ...

It is not really faster when a program runs, it just allows you to compile scripts into binary files that murgaLua could load ... With this you would loose the source, so I rather keep things running from scripts. What's more there are a couple of issues around implementing it for murgaLua, so its something that I really have no motivation at all to do.

LuaJIT is something I probably WILL be adding, this doesn't change the behavior of murgaLua, but would increase the performance dramatically under some circumstances. So it's on the todo list, but it is low priority (but easy to check out).

The issue with LuaJit is that it is x86 only at the moment, which means that only Windows/Intel-Linux/Intel-Mac would work ... This may not be such a bad thing as these are the only platforms I support right now anyway. There are a few other caveats, and I think my time is better spent looking at other things right now, so we'll see ...

Cheers
JohnM

07-13-2007 05:57 PM
Visit this user's website Find all posts by this user Quote this message in a reply
chrimo
Member
***


Posts: 94
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #4
RE: Does Luac work ?


ReHi,

Yes, LuaJIT just works at X86, but I have to use PPC and SPARC CPU's, too.
Luac is included at lua for many years Big Grin
The advantage of compiled scripts are much faster load and hide some things
from end-users... ;-(
YES, it is true...sometimes you have to hide or secure something to avoid problems at special environments (last week it worked, but today not. I haven't changed anything...)
Luac-Bytecode and Lua-Source can coexist together, if luac exists it is used, else lua...

I've asked for it, because I expect problems with some murgaLua included
extensions...
I try it out myself this weekend Big Grin

Thanks for all your friendly responses

Bye
Christian

07-13-2007 07:04 PM
Find all posts by this user Quote this message in a reply
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #5
RE: Does Luac work ?

chrimo Wrote:
Yes, LuaJIT just works at X86, but I have to use PPC and SPARC CPU's, too.

If you build murgaLua for these architecture I'd be REALLY interested if you could contribute the binaries :-) :-)

chrimo Wrote:
Luac is included at lua for many years Big Grin

I know, but I've never liked it, see below for a solution to your problem though ;-)

chrimo Wrote:
The advantage of compiled scripts are much faster load and hide some things from end-users... ;-(

I found the speed increase to be negligible, but as far as hiding ... Read on ...

chrimo Wrote:
YES, it is true...sometimes you have to hide or secure something to avoid problems at special environments (last week it worked, but today not. I haven't changed anything...)

Lua obfuscates pretty well, that is also an option for you in this scenario (and is what is done with things like Javascript).

chrimo Wrote:
Luac-Bytecode and Lua-Source can coexist together, if luac exists it is used, else lua...

It is that mix that I am trying to avoid, murgaLua WILL load bytecode though, however it has to be plain Lua code.

chrimo Wrote:
I've asked for it, because I expect problems with some murgaLua included extensions...

What do you mean ? And how would this help you with extensions inside murgaLua ? If you want to load plain Lua bytecode into murgaLua you can do that currently, you just have to use the luac compiler bundled with Lua itself (which you already have if you built murgaLua for these other architectures) ... murgaLua is fully compatible with plain Lua bytecode :-)

chrimo Wrote:
I try it out myself this weekend Big Grin

Please let us know how it goes, if I can help with your specific problem I'd be happy to.

chrimo Wrote:
Thanks for all your friendly responses

A feature that I am going to be adding is a murgaLua compiler, but this works completely differently to the Lua compiler ... It produces standalone compressed executables for all platforms. The beauty is that although the source will be completely hidden from end-users and regular tools, it'll be retrievable in it's original form through the use of a specialized de-compiler I will also provide.

Cheers
JohnM

This post was last modified: 07-13-2007 10:49 PM by JohnMurga.

07-13-2007 10:44 PM
Visit this user's website Find all posts by this user Quote this message in a reply
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #6
RE: Does Luac work ?

Quote:
Lua obfuscates pretty well

Do you know of any available examples to see? I'm not one to use obfuscation myself, but I find the concept interesting.

Quote:
YES, it is true...sometimes you have to hide or secure something to avoid problems at special environments

Speaking somewhat idealistically, I don't believe that hiding code is beneficial in any respect other than protecting "intellectual property". Hiding your code only gives you the appearance of security. There is NO security if "special environments" includes a system that does not have proper file permissions and the user logs in as root/administrator. I have no idea what you meant by special, so I can only guess at that. In any case, compiled code is hidden only to those who are not very interested in what's inside.

07-13-2007 11:10 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: