Resend: A High Performance Bridge for Lua and Java in Android

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Resend: A High Performance Bridge for Lua and Java in Android

奥斯陆君王
Because the first one is gibberish, so I resend the email.

Luadroid is a high performace bridge for executing java code in lua in amdroid or exectuting lua code in android. Yeah, you can  use luajava or luaj on other platforms. Its syntax is very similar to the original java syntax.

It supports try catch, synchronized, multi-thread, very simple cross-thread communication (auto-copied upvalues and a table like usedata to get and put variables ), autoboxing and auto-unboxing, class extension, interface implementation, class definition and so on. Method deduction and auto table conversion is supported also. Generic info will be considered during table conversion.

If there is no table conversion or function conversion, it will be only 4-5  times slower than java code at most even though the code is jited.If the java code is not jited, the consumption is ignorable. Class extension and definition  are pretty heavy operations cause they need to generate a dex file and load it into the classloader.

GC for objects will be performed once the script is executed. GC for outdated thread is performed in javs gc thread.Note that due to Android O changes, it's no longer possible to test whether a thread is alive by pthread_kill so I use tgkill instead.However, in some extreme and weird cases(too many threads created and destoryed), it's not safe actually.

Both lua and luajit are supported.And the java type long will lose no precision in luajit cause when it will lose its precision, it will be converted to a usedata that overrides common mathmetic operators.

It's my personal project,so I can't make sure there's no bug even though I have performed a lot of tests. If you find any bugs or have any advice, please contact me.

For more information see https://github.com/qtiuto/lua-for-android

Reply | Threaded
Open this post in threaded view
|

Re: Resend: A High Performance Bridge for Lua and Java in Android

Ką Mykolas
$ diff ./first.txt ./second.txt 
1,2c1,3
< Luadroid is a high performace bridge for executing java code in lua in amdroid or exectuting lua code in android. Yeah, you can  
< use luajava or luaj on other platforms. Its syntax is very similar to the original java syntax.
---
> Because the first one is gibberish, so I resend the email.
> Luadroid is a high performace bridge for executing java code in lua in amdroid or exectuting lua code in android. Yeah, you can  use luajava or luaj on other platforms. Its syntax is very similar to the original java syntax.

o_0 What do You mean by "gibberish"?

On Fri, Sep 21, 2018 at 4:19 PM 奥斯陆君王 <[hidden email]> wrote:
Because the first one is gibberish, so I resend the email.

Luadroid is a high performace bridge for executing java code in lua in amdroid or exectuting lua code in android. Yeah, you can  use luajava or luaj on other platforms. Its syntax is very similar to the original java syntax.

It supports try catch, synchronized, multi-thread, very simple cross-thread communication (auto-copied upvalues and a table like usedata to get and put variables ), autoboxing and auto-unboxing, class extension, interface implementation, class definition and so on. Method deduction and auto table conversion is supported also. Generic info will be considered during table conversion.

If there is no table conversion or function conversion, it will be only 4-5  times slower than java code at most even though the code is jited.If the java code is not jited, the consumption is ignorable. Class extension and definition  are pretty heavy operations cause they need to generate a dex file and load it into the classloader.

GC for objects will be performed once the script is executed. GC for outdated thread is performed in javs gc thread.Note that due to Android O changes, it's no longer possible to test whether a thread is alive by pthread_kill so I use tgkill instead.However, in some extreme and weird cases(too many threads created and destoryed), it's not safe actually.

Both lua and luajit are supported.And the java type long will lose no precision in luajit cause when it will lose its precision, it will be converted to a usedata that overrides common mathmetic operators.

It's my personal project,so I can't make sure there's no bug even though I have performed a lot of tests. If you find any bugs or have any advice, please contact me.

For more information see https://github.com/qtiuto/lua-for-android

Reply | Threaded
Open this post in threaded view
|

Re: Resend: A High Performance Bridge for Lua and Java in Android

Sean Conner
It was thus said that the Great Ką Mykolas once stated:

> $ diff ./first.txt ./second.txt
> 1,2c1,3
> < Luadroid is a high performace bridge for executing java code in lua in
> amdroid or exectuting lua code in android. Yeah, you can
> < use luajava or luaj on other platforms. Its syntax is very similar to the
> original java syntax.
> ---
> > Because the first one is gibberish, so I resend the email.
> >
> > Luadroid is a high performace bridge for executing java code in lua in
> amdroid or exectuting lua code in android. Yeah, you can  use luajava or
> luaj on other platforms. Its syntax is very similar to the original java
> syntax.
>
> o_0 What do You mean by "gibberish"?

  When I received the first email, it came as one long paragraph spanning
the entire width of the window, making it hard to read.

  -spc