Lua with Javascript like sintax LJS

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

Lua with Javascript like sintax LJS

Domingo Alvarez Duarte
Hello !

I'm trying to create an alternative lua/luajit with javascript like syntax:

https://github.com/mingodad/ljs

https://github.com/mingodad/ljsjit

Right now it is lua compatible with a javascript like syntax with
compound/pre/pos increment opertors and "exp ? exp_true : exp_false".

It got code and inspiration from:

https://github.com/ex/Killa

https://github.com/sajonoso/jual

and others.

It has a transpiler lua2ljs that can convert most lua to working ljs.

I'm now trying to add a "switch" statement and after that a "class"
object/constructor.

I would welcome any contribution/critic/review/idea to improve it.

Cheers !



Reply | Threaded
Open this post in threaded view
|

Re: Lua with Javascript like sintax LJS

Sam Pagenkopf
A little confused about these syntax choices, especially with :: ->

What separates ljs from killa? Why didn't you fork killa rather than copy-pasting its code?

On Wed, Dec 5, 2018 at 6:09 AM Domingo Alvarez Duarte <[hidden email]> wrote:
Hello !

I'm trying to create an alternative lua/luajit with javascript like syntax:

https://github.com/mingodad/ljs

https://github.com/mingodad/ljsjit

Right now it is lua compatible with a javascript like syntax with
compound/pre/pos increment opertors and "exp ? exp_true : exp_false".

It got code and inspiration from:

https://github.com/ex/Killa

https://github.com/sajonoso/jual

and others.

It has a transpiler lua2ljs that can convert most lua to working ljs.

I'm now trying to add a "switch" statement and after that a "class"
object/constructor.

I would welcome any contribution/critic/review/idea to improve it.

Cheers !



Reply | Threaded
Open this post in threaded view
|

Re: Lua with Javascript like sintax LJS

Daurnimator
In reply to this post by Domingo Alvarez Duarte
On Wed, 5 Dec 2018 at 04:09, Domingo Alvarez Duarte <[hidden email]> wrote:
> I'm trying to create an alternative lua/luajit with javascript like syntax:
>
> https://github.com/mingodad/ljs

Note that a "ljs" project already exists: http://code.matthewwild.co.uk/ljs/

Reply | Threaded
Open this post in threaded view
|

Re: Lua with Javascript like sintax LJS

Domingo Alvarez Duarte
In reply to this post by Sam Pagenkopf

Hello Sam !

Thanks for reply !

I've contacted the author of Killa and he replied that he is now busy working with C++ and has no time to or incentives to work on Killa.

In my point of view the Killa's author did a great job analyzing the Lua vm and made it zero index based.

Even as I used some of his code in LJS/LJSJIT I did several bug fixes because that code do not work in several cases, I adapted the test from Lua to help detect regressions, I have decided to mantain Lua vm compatibility and one based index to allow me try port several well coded projects and check that my changes behave as expected, like https://github.com/mingodad/ZeroBraneStudioLJS , I also added a compiler warning/error for duplicated variables declaration shadowing/scope dup.

Also I'm applying the syntax over Luajit-2.1/Luajit-2.0.5/lua-5.1/lua-5.2/lua-5.3/lua-5.4 with varying degree of success so far.

Converting luajit lua files I found some bugs that I'm reporting to luajit (thanks for compiler warnings about shadowing variables).

Again I hope I could  explain my reasons to go forward with my own project LJS/LJSJIT instead of join abandoned projects.

Thanks again for your time and attention !

On 10/12/2018 23:00, Sam Pagenkopf wrote:
A little confused about these syntax choices, especially with :: ->

What separates ljs from killa? Why didn't you fork killa rather than copy-pasting its code?

On Wed, Dec 5, 2018 at 6:09 AM Domingo Alvarez Duarte <[hidden email]> wrote:
Hello !

I'm trying to create an alternative lua/luajit with javascript like syntax:

https://github.com/mingodad/ljs

https://github.com/mingodad/ljsjit

Right now it is lua compatible with a javascript like syntax with
compound/pre/pos increment opertors and "exp ? exp_true : exp_false".

It got code and inspiration from:

https://github.com/ex/Killa

https://github.com/sajonoso/jual

and others.

It has a transpiler lua2ljs that can convert most lua to working ljs.

I'm now trying to add a "switch" statement and after that a "class"
object/constructor.

I would welcome any contribution/critic/review/idea to improve it.

Cheers !



Reply | Threaded
Open this post in threaded view
|

Re: Lua with Javascript like sintax LJS

Domingo Alvarez Duarte
In reply to this post by Daurnimator
Hello Daurnimator !

Thank you for reporting it, today is hard to find a not used name for a
project.

I'll try to solve this problem soon.

Cheers !

On 10/12/2018 23:09, Daurnimator wrote:
> On Wed, 5 Dec 2018 at 04:09, Domingo Alvarez Duarte <[hidden email]> wrote:
>> I'm trying to create an alternative lua/luajit with javascript like syntax:
>>
>> https://github.com/mingodad/ljs
> Note that a "ljs" project already exists: http://code.matthewwild.co.uk/ljs/
>

Reply | Threaded
Open this post in threaded view
|

Re: Lua with Javascript like sintax LJS

Domingo Alvarez Duarte
In reply to this post by Sam Pagenkopf

Hello Sam !

I forgot to mention your question about the syntax choice with ":: ->", it's due to not clash with "." and ":" for label, switch, table/json style, ...

I'm open to suggestions about a better choice !

Cheers !

On 10/12/2018 23:00, Sam Pagenkopf wrote:
A little confused about these syntax choices, especially with :: ->

What separates ljs from killa? Why didn't you fork killa rather than copy-pasting its code?

On Wed, Dec 5, 2018 at 6:09 AM Domingo Alvarez Duarte <[hidden email]> wrote:
Hello !

I'm trying to create an alternative lua/luajit with javascript like syntax:

https://github.com/mingodad/ljs

https://github.com/mingodad/ljsjit

Right now it is lua compatible with a javascript like syntax with
compound/pre/pos increment opertors and "exp ? exp_true : exp_false".

It got code and inspiration from:

https://github.com/ex/Killa

https://github.com/sajonoso/jual

and others.

It has a transpiler lua2ljs that can convert most lua to working ljs.

I'm now trying to add a "switch" statement and after that a "class"
object/constructor.

I would welcome any contribution/critic/review/idea to improve it.

Cheers !



Jim
Reply | Threaded
Open this post in threaded view
|

Re: Lua with Javascript like sintax LJS

Jim
In reply to this post by Domingo Alvarez Duarte
On 12/11/18, Domingo Alvarez Duarte <[hidden email]> wrote:
> Thank you for reporting it, today is hard to find a not used name for a project.

maybe you could rename it to just "ls": LuvaScript
:P

Reply | Threaded
Open this post in threaded view
|

Re: Lua with Javascript like sintax LJS

Philippe Verdy
Or "lj" / "ljs" : LJuascript / LuJascript
Or "jl" / "jul" : JulaScript / Juliascript
And why keeping "Script" in the full name ? There's lot of beautiful radicals containing a "j" and "ua" vowels.

"Julia" however is taken for another language (used for scientific data, and interfaced with other languages like Javascript, Lua, Python, Perl, Ruby, R, C, Lisp, Scheme, Fortran, Mathematica, MATLAB...), and it uses the ".jl" extension. It's released with GPL2 and MIT licences. Part of its library is written in Julia itself, the core is written in C, the parser is written in Scheme, its compiler uses the LLVM assembler for its JIT, and some OS integration libraries are in C, and its data intensive computing library (linear algebra on large vectors/matrixes/tensors or statistic distributions) is currently implemented in Fortran (which is still more efficient than current implementations using C/C++ generic libraries). I don't know if it can use massive parallization using GPUs and/or distributed computing.

Le mar. 11 déc. 2018 à 22:57, Jim <[hidden email]> a écrit :
On 12/11/18, Domingo Alvarez Duarte <[hidden email]> wrote:
> Thank you for reporting it, today is hard to find a not used name for a project.

maybe you could rename it to just "ls": LuvaScript
:P

Reply | Threaded
Open this post in threaded view
|

Re: Lua with Javascript like sintax LJS

Egor Skriptunoff-2
On Thu, Dec 13, 2018 at 4:15 PM Philippe Verdy wrote:
LuJascript

LuJaScript
I like this suggestion!
.luja - possible file extension for program files