Corona and loadstring

Why does Corona not support Lua’s loadstring function?

I am aware that iOS doesn’t let you download new code and run it in your app, but that shouldn’t change anything - what about developers who use other frameworks that enable loadstring? Or developers who create their own engine and embed Lua in it?

Without loadstring, I can’t use IDEAL or MoonScript to code in with Corona, which are both something I’d really like to do.

  • Caleb

My bet is that it’s probably because apple’s security checks aren’t capable of analysing dynamically generated code (such as code created using loadstring).
It’s a real pain though, as for serializing libraries for example, i wasn’t able to find any of them both efficient AND not using loadstring…

That’s my question, though - what about developers who have access to loadstring?

As for serialization libraries both efficient and not using loadstring, it’s ironic you would say that. I’m about to (like within a week) release a fast, flexible solution to that named Cyan… (mysterious, eh?)

My bet is that it’s probably because apple’s security checks aren’t capable of analysing dynamically generated code (such as code created using loadstring).
It’s a real pain though, as for serializing libraries for example, i wasn’t able to find any of them both efficient AND not using loadstring…

That’s my question, though - what about developers who have access to loadstring?

As for serialization libraries both efficient and not using loadstring, it’s ironic you would say that. I’m about to (like within a week) release a fast, flexible solution to that named Cyan… (mysterious, eh?)

Can one of the Corona staff answer this, please?

  • C

Because Apple doesn’t permit it and I’m guessing that it’s a significant enough issue that having it in Android would be problematic.  And we don’t build apps for Windows/OS-X so the simulator shouldn’t support features that you can’t use on mobile.

Rob

So then, back to my other question… What about people who create their own solution that might use loadstring?

Please don’t get me wrong on this, I’m just curious :slight_smile:

  • C

We are a small staff and we can’t build in everything.   Supporting something like Moonscript is beyond what we are trying to do. 

Rob

Ahhh… Makes perfect sense. Thanks!

  • C

I recall hearing people talking about moonscript before: https://twitter.com/JAWhye/status/234162948958986240

I don’t know what happened though. I guess JAWhyte would know :slight_smile:

Can one of the Corona staff answer this, please?

  • C

Because Apple doesn’t permit it and I’m guessing that it’s a significant enough issue that having it in Android would be problematic.  And we don’t build apps for Windows/OS-X so the simulator shouldn’t support features that you can’t use on mobile.

Rob

So then, back to my other question… What about people who create their own solution that might use loadstring?

Please don’t get me wrong on this, I’m just curious :slight_smile:

  • C

We are a small staff and we can’t build in everything.   Supporting something like Moonscript is beyond what we are trying to do. 

Rob

Ahhh… Makes perfect sense. Thanks!

  • C

I recall hearing people talking about moonscript before: https://twitter.com/JAWhye/status/234162948958986240

I don’t know what happened though. I guess JAWhyte would know :slight_smile: