This is probably not the appropriate place to ask (I should check the lua-wiki mailing list sometime) but I'm wondering if someone has implemented a language that compiles to LuaJIT 2.0 bytecode?
Alternatively a language that compiles to Lua 5.1 bytecode then decompiled as Lua code, then passed in LuaJIT?
Because Java apparently has lots of languages for its VM (Clojure, Scala, Groovy, etc.) and I was wondering if there was any equivalent.
(General Lua) A language that compiles to LuaJIT 2.0 bytecode?
- substitute541
- Party member
- Posts: 484
- Joined: Fri Aug 24, 2012 9:04 am
- Location: Southern Leyte, Visayas, Philippines
- Contact:
(General Lua) A language that compiles to LuaJIT 2.0 bytecode?
Currently designing themes for WordPress.
Sometimes lurks around the forum.
Sometimes lurks around the forum.
- slime
- Solid Snayke
- Posts: 3166
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: (General Lua) A language that compiles to LuaJIT 2.0 bytecode?
There are a few languages that compile to plain Lua. Moonscript is one example.
In general languages don't target Lua bytecode because said bytecode is system architecture- and Lua version-dependent.
In general languages don't target Lua bytecode because said bytecode is system architecture- and Lua version-dependent.
Re: (General Lua) A language that compiles to LuaJIT 2.0 bytecode?
Do you mean that if I distribute a LÖVE game with the files compiled as LuaJIT (not Lua) bytecode, it won't work in all platforms?slime wrote:In general languages don't target Lua bytecode because said bytecode is system architecture- and Lua version-dependent.
- slime
- Solid Snayke
- Posts: 3166
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: (General Lua) A language that compiles to LuaJIT 2.0 bytecode?
Correct.
LuaJIT 2.0's bytecode is the same for all architectures it supports. It does not support arm64 (the architecture/instruction set used in most - but not all - iOS devices, and some Android devices). LuaJIT 2.1's bytecode is different from 2.0's, and also within LuaJIT 2.1 it has two separate incompatble sets of bytecode: one for most platforms except arm64, and another currently only used for arm64 (but with support in development for x86_64). So just within LuaJIT 2.0/2.1 you already have 3 different incompatible Lua bytecode targets.
LOVE currently uses LuaJIT 2.0 on desktops, and LuaJIT 2.1 on Android and iOS. As soon as LuaJIT 2.1 is officially out of beta, future desktop versions of LOVE will ship with it.
LuaJIT 2.0's bytecode is the same for all architectures it supports. It does not support arm64 (the architecture/instruction set used in most - but not all - iOS devices, and some Android devices). LuaJIT 2.1's bytecode is different from 2.0's, and also within LuaJIT 2.1 it has two separate incompatble sets of bytecode: one for most platforms except arm64, and another currently only used for arm64 (but with support in development for x86_64). So just within LuaJIT 2.0/2.1 you already have 3 different incompatible Lua bytecode targets.
LOVE currently uses LuaJIT 2.0 on desktops, and LuaJIT 2.1 on Android and iOS. As soon as LuaJIT 2.1 is officially out of beta, future desktop versions of LOVE will ship with it.
- technomancy
- Prole
- Posts: 49
- Joined: Thu Oct 29, 2015 8:25 am
- Location: Thailand
- Contact:
Re: (General Lua) A language that compiles to LuaJIT 2.0 bytecode?
I know this isn't quite what you asked, but I am using l2l for a small part of my game: https://github.com/meric/l2l
Instead of compiling to bytecode, it compiles directly to Lua source, which makes it a lot simpler to debug.
Of course Moonscript is the canonical answer to this question, and while it's a very impressive feat, I disagree with a number of the directions it takes.
Sol (no, not *that* Sol) is very close to lua, but with type safety: https://github.com/emilk/sol (Unfortunately it appears abandoned.)
Finally, here's a Forth implementation in Lua: http://angg.twu.net/miniforth-article.html It uses its own bytecode.
Anyway, my game is all about programming, so I am very interested in finding new languages that run on the LuaJIT runtime in order to add more diversity. So far I haven't found a good non-dead candidate for a static language that compiles *to* Lua, but I am considering interoperating with Lily using LuaJIT's FFI: https://jesserayadkins.github.io/lily
Instead of compiling to bytecode, it compiles directly to Lua source, which makes it a lot simpler to debug.
Of course Moonscript is the canonical answer to this question, and while it's a very impressive feat, I disagree with a number of the directions it takes.
Sol (no, not *that* Sol) is very close to lua, but with type safety: https://github.com/emilk/sol (Unfortunately it appears abandoned.)
Finally, here's a Forth implementation in Lua: http://angg.twu.net/miniforth-article.html It uses its own bytecode.
Anyway, my game is all about programming, so I am very interested in finding new languages that run on the LuaJIT runtime in order to add more diversity. So far I haven't found a good non-dead candidate for a static language that compiles *to* Lua, but I am considering interoperating with Lily using LuaJIT's FFI: https://jesserayadkins.github.io/lily
Re: (General Lua) A language that compiles to LuaJIT 2.0 bytecode?
Not what Sol? I'm close to Luatechnomancy wrote:I know this isn't quite what you asked, but I am using l2l for a small part of my game: https://github.com/meric/l2l
Instead of compiling to bytecode, it compiles directly to Lua source, which makes it a lot simpler to debug.
Of course Moonscript is the canonical answer to this question, and while it's a very impressive feat, I disagree with a number of the directions it takes.
Sol (no, not *that* Sol) is very close to lua, but with type safety: https://github.com/emilk/sol (Unfortunately it appears abandoned.)
- technomancy
- Prole
- Posts: 49
- Joined: Thu Oct 29, 2015 8:25 am
- Location: Thailand
- Contact:
Re: (General Lua) A language that compiles to LuaJIT 2.0 bytecode?
Hah! I meant the ancestor language of Lua.s-ol wrote:Not what Sol? I'm close to Lua
-- https://en.wikipedia.org/wiki/Lua_%28pr ... anguage%29Lua's historical "father and mother" were the data-description/configuration languages SOL (Simple Object Language) and DEL (data-entry language).
Re: (General Lua) A language that compiles to LuaJIT 2.0 bytecode?
Oh yeah, I saw it referenced before and I would love to get my hands on some original SOL code, documentation or even better a compiler source or something similar but I couldn't find anything.technomancy wrote:Hah! I meant the ancestor language of Lua.s-ol wrote:Not what Sol? I'm close to Lua
-- https://en.wikipedia.org/wiki/Lua_%28pr ... anguage%29Lua's historical "father and mother" were the data-description/configuration languages SOL (Simple Object Language) and DEL (data-entry language).
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 7 guests