www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Looking for a Lua alternative

reply solidstate1991 <laszloszeremi outlook.com> writes:
After losing a battle with trying to get Lua 5.4 working on my 
own end, with problems I previously solved kept reappearing, and 
other problems just were unable to fix for no good reason, I've 
decided to drop it from my own game engine in favor of some 
replacement.

I need a lightweight scripting language with integer support that 
is either easy to interface with D (preferrably as a DLL/SO file, 
so I don't have to deal with godawful C/C++ build systems), or at 
least would be easy to port within a few weeks. Most scripting 
languages nowadays are de-facto application languages for people 
that are scared of compilers and type systems, thus are coming 
with 25-50MB worth of standard libraries, which I obviously would 
like to avoid packing with my way smaller game engine. At the 
very worst, I'll try to port pocketpy or something like that to D 
or make it a DLL file.
Dec 14 2023
next sibling parent reply Dom DiSc <dominikus scherkl.de> writes:
On Thursday, 14 December 2023 at 08:38:02 UTC, solidstate1991 
wrote:
 I need a lightweight scripting language with integer support 
 that is either easy to interface with D,
 or at least would be easy to port within a few weeks.
If you are already using D, why do you need a scripting language at all? I use D mainly as a scripting languag itself, and is wonderful at this job.
Dec 14 2023
next sibling parent solidstate1991 <laszloszeremi outlook.com> writes:
On Thursday, 14 December 2023 at 08:57:47 UTC, Dom DiSc wrote:
 If you are already using D, why do you need a scripting 
 language at all? I use D mainly as a scripting languag itself, 
 and is wonderful at this job.
Because I need it for the original purpose of scripting languages: using them as programmable assets within other applications. Of course DLLs would be an option, but would have serious problems the very moment more than one platform is being used, not to mention the security issues.
Dec 14 2023
prev sibling parent Martyn <martyn.developer googlemail.com> writes:
On Thursday, 14 December 2023 at 08:57:47 UTC, Dom DiSc wrote:
 On Thursday, 14 December 2023 at 08:38:02 UTC, solidstate1991 
 wrote:
 I need a lightweight scripting language with integer support 
 that is either easy to interface with D,
 or at least would be easy to port within a few weeks.
If you are already using D, why do you need a scripting language at all? I use D mainly as a scripting languag itself, and is wonderful at this job.
I agree. In the not-too-distant past, I wrote a Game Engine that worked with a scripting language. I decided to use GNU Guile because:- a) I like Scheme b) I really liked GNU Guile's documentation. It flowed well when writing. Sadly, support for my game was stuck in GNU/Linux land. Trying to get GNU Guile to work (atleast at that time) was a pain on Windows. It was a shame. In the end, my frontend was the same language as my backend code. My engine would 'plugin' game logic using hot reloading. This means I can change the code and reload while keeping my game running, generally speaking. It actually worked extremely well. It removed unwanted libraries needed for a scripting language + kept performance high. So if D is your choice of language.. It can also be a good choice for frontend as well. That is my best suggestion as an alternative. However, if you do continue to find a scripting language that replaces Lua...I would be interested in hearing your choice.
Dec 14 2023
prev sibling next sibling parent reply Alexandru Ermicioi <alexandru.ermicioi gmail.com> writes:
On Thursday, 14 December 2023 at 08:38:02 UTC, solidstate1991 
wrote:
 I need a lightweight scripting language with integer support 
 that is either easy to interface with D (preferrably as a 
 DLL/SO file, so I don't have to deal with godawful C/C++ build 
 systems), or at least would be easy to port within a few weeks.
Maybe a bit offtopic, but you may try webassembly interpreter, then you'd not be limited to only one scripting language but have available all languages that compile down to webassembly, and have them sandboxed. Although I've not used it, but wasm3 api seems simple to use (has c/c++ api), though there are other libs as well.
Dec 14 2023
parent solidstate1991 <laszloszeremi outlook.com> writes:
On Thursday, 14 December 2023 at 09:19:00 UTC, Alexandru Ermicioi 
wrote:
 Maybe a bit offtopic, but you may try webassembly interpreter, 
 then you'd not be limited to only one scripting language but 
 have available all languages that compile down to webassembly, 
 and have them sandboxed.

 Although I've not used it, but wasm3 api seems simple to use 
 (has c/c++ api), though there are other libs as well.
This made me look up some VMs as I want to examine all possible options, and I remembered QScript, which itself has a VM more active in development than QScript itself. I'll see if either can write a modified Lua interpreter for it, or even just use QScript itself (which is very not Lua-like, but maybe will work).
Dec 17 2023
prev sibling next sibling parent reply Sergey <kornburn yandex.ru> writes:
On Thursday, 14 December 2023 at 08:38:02 UTC, solidstate1991 
wrote:
 I need a lightweight scripting language with integer support 
 that is either easy to interface with D (preferrably as a 
 DLL/SO file, so I don't have to deal with godawful C/C++ build 
 systems), or at least would be easy to port within a few weeks.
Maybe wren?
Dec 14 2023
parent reply solidstate1991 <laszloszeremi outlook.com> writes:
On Thursday, 14 December 2023 at 09:35:43 UTC, Sergey wrote:
 Maybe wren?
Wren is one of those fashionable scripting languages that skimp out on the integer support because "they can just be represented with floating point numbers".
Dec 14 2023
next sibling parent reply Hors <ho rs.com> writes:
On Thursday, 14 December 2023 at 09:43:03 UTC, solidstate1991 
wrote:
 On Thursday, 14 December 2023 at 09:35:43 UTC, Sergey wrote:
 Maybe wren?
Wren is one of those fashionable scripting languages that skimp out on the integer support because "they can just be represented with floating point numbers".
Just a question: Isn't casting (rounding) floating numbers to integers an option? Why?
Dec 14 2023
parent cc <cc nevernet.com> writes:
On Thursday, 14 December 2023 at 09:55:18 UTC, Hors wrote:
 On Thursday, 14 December 2023 at 09:43:03 UTC, solidstate1991 
 wrote:
 On Thursday, 14 December 2023 at 09:35:43 UTC, Sergey wrote:
 Maybe wren?
Wren is one of those fashionable scripting languages that skimp out on the integer support because "they can just be represented with floating point numbers".
Just a question: Isn't casting (rounding) floating numbers to integers an option? Why?
I had this issue with Lua 5.1. It "works" for medium-ish integers, but as soon as you're encoding data in ints, such as unique IDs made up of multiple components that may have high bits set, it'll fall apart. I am still using Lua 5.1, but now I just.. don't do that anymore. Unfortunately if you want to pass along data that would otherwise be a 64-bit int, you either have to send along a raw pointer or else create a Lua-GC-allocated object to hold it instead (and at that point you may as well just use userdata for the D object itself). While not recommending it as such, I believe Julia supports multiple int types, though my cursory examination suggested the performance and resource draw is far, far worse than Lua.
Dec 14 2023
prev sibling next sibling parent reply Hipreme <msnmancini hotmail.com> writes:
On Thursday, 14 December 2023 at 09:43:03 UTC, solidstate1991 
wrote:
 On Thursday, 14 December 2023 at 09:35:43 UTC, Sergey wrote:
 Maybe wren?
Wren is one of those fashionable scripting languages that skimp out on the integer support because "they can just be represented with floating point numbers".
The only scripting language which I know that supports integer is [AngelScript](https://www.angelcode.com/angelscript/sdk/docs/manual/doc_datatypes_primitives.html) But, anyway, using D as a scripting language is only a problem if you intend to keep doing updates in the game. I use D Dlls as the scripting language, and when doing that for platforms which doesn't support, I simply compile the "script" together with the engine code. This is how I achieve WASM/PSVita/MacOS/iOS/Android (but maybe Android could be 2 shared libraries) support.
Dec 14 2023
parent Julian Fondren <julian.fondren gmail.com> writes:
On Thursday, 14 December 2023 at 11:03:55 UTC, Hipreme wrote:
 The only scripting language which I know that supports integer 
 is 
 [AngelScript](https://www.angelcode.com/angelscript/sdk/docs/manual/doc_datatypes_primitives.html)
AngelScript was a user-exposed scripting language in Star Ruler and its sequel, cross-platform space 4x games. It seemed pretty reasonable there, and supposedly adds <2MB to a build. It's also a much more *normal* language than Lua if the language was the problem.
Dec 14 2023
prev sibling next sibling parent Guillaume Piolat <first.name gmail.com> writes:
On Thursday, 14 December 2023 at 09:43:03 UTC, solidstate1991 
wrote:
 On Thursday, 14 December 2023 at 09:35:43 UTC, Sergey wrote:
 Maybe wren?
Wren is one of those fashionable scripting languages that skimp out on the integer support because "they can just be represented with floating point numbers".
As a Wren user: it works and is OK, but I wouldn't necessarily recommend Wren that much not for these reasons, but because it's not that easy to interface with and imports are annoying, also it's basically abandoned. The syntax is a polar opposite to D. We've modified the interpreter for our needs but surely there must be better alternatives, such as... regular Lua. I would have choosen something else now.
Dec 14 2023
prev sibling parent Guillaume Piolat <first.name gmail.com> writes:
On Thursday, 14 December 2023 at 09:43:03 UTC, solidstate1991 
wrote:
 On Thursday, 14 December 2023 at 09:35:43 UTC, Sergey wrote:
 Maybe wren?
Wren is one of those fashionable scripting languages that skimp out on the integer support because "they can just be represented with floating point numbers".
Probably not that hard to add support though, if you can live with weak typing (casts from float to int will only be detected at runtime).
Dec 14 2023
prev sibling next sibling parent reply bachmeier <no spam.net> writes:
On Thursday, 14 December 2023 at 08:38:02 UTC, solidstate1991 
wrote:
 After losing a battle with trying to get Lua 5.4 working on my 
 own end, with problems I previously solved kept reappearing, 
 and other problems just were unable to fix for no good reason, 
 I've decided to drop it from my own game engine in favor of 
 some replacement.

 I need a lightweight scripting language with integer support 
 that is either easy to interface with D (preferrably as a 
 DLL/SO file, so I don't have to deal with godawful C/C++ build 
 systems), or at least would be easy to port within a few weeks. 
 Most scripting languages nowadays are de-facto application 
 languages for people that are scared of compilers and type 
 systems, thus are coming with 25-50MB worth of standard 
 libraries, which I obviously would like to avoid packing with 
 my way smaller game engine. At the very worst, I'll try to port 
 pocketpy or something like that to D or make it a DLL file.
If you're willing to go with Lisp, there are small, embeddable Schemes: [s7](https://ccrma.stanford.edu/software/snd/snd/s7.html) and [Chibi](https://github.com/ashinn/chibi-scheme), one that is more Clojure-like: [Janet](https://janet-lang.org/), and one that's more like Lua: [Squirrel](http://www.squirrel-lang.org/).
Dec 14 2023
next sibling parent Martyn <martyn.developer googlemail.com> writes:
On Thursday, 14 December 2023 at 13:59:05 UTC, bachmeier wrote:
 On Thursday, 14 December 2023 at 08:38:02 UTC, solidstate1991 
 wrote:
 ..
 ..
If you're willing to go with Lisp, there are small, embeddable Schemes: [s7](https://ccrma.stanford.edu/software/snd/snd/s7.html) and [Chibi](https://github.com/ashinn/chibi-scheme), one that is more Clojure-like: [Janet](https://janet-lang.org/), and one that's more like Lua: [Squirrel](http://www.squirrel-lang.org/).
+1 I heard some nice things about chibi on the interwebs. Not used it, tho. :-)
Dec 14 2023
prev sibling next sibling parent reply =?UTF-8?Q?S=C3=B6nke_Ludwig?= <sludwig outerproduct.org> writes:
Am 14.12.2023 um 14:59 schrieb bachmeier:
 On Thursday, 14 December 2023 at 08:38:02 UTC, solidstate1991 wrote:
 After losing a battle with trying to get Lua 5.4 working on my own 
 end, with problems I previously solved kept reappearing, and other 
 problems just were unable to fix for no good reason, I've decided to 
 drop it from my own game engine in favor of some replacement.

 I need a lightweight scripting language with integer support that is 
 either easy to interface with D (preferrably as a DLL/SO file, so I 
 don't have to deal with godawful C/C++ build systems), or at least 
 would be easy to port within a few weeks. Most scripting languages 
 nowadays are de-facto application languages for people that are scared 
 of compilers and type systems, thus are coming with 25-50MB worth of 
 standard libraries, which I obviously would like to avoid packing with 
 my way smaller game engine. At the very worst, I'll try to port 
 pocketpy or something like that to D or make it a DLL file.
If you're willing to go with Lisp, there are small, embeddable Schemes: [s7](https://ccrma.stanford.edu/software/snd/snd/s7.html) and [Chibi](https://github.com/ashinn/chibi-scheme), one that is more Clojure-like: [Janet](https://janet-lang.org/), and one that's more like Lua: [Squirrel](http://www.squirrel-lang.org/).
I've used Squirrel as a LUA replacement about 20 years ago and liked it quite a bit. It's actually positively surprising that it is still (or again) receiving updates.
Dec 15 2023
parent Siarhei Siamashka <siarhei.siamashka gmail.com> writes:
On Friday, 15 December 2023 at 14:30:43 UTC, Sönke Ludwig wrote:
 I've used Squirrel as a LUA replacement about 20 years ago and 
 liked it quite a bit. It's actually positively surprising that 
 it is still (or again) receiving updates.
I also used Squirrel as a Lua replacement many years ago and also liked it in general. It was nice to have a companion scripting language with a C-style syntax for modding/extending the main C++ code. Unlike dealing with Lua, moving pieces of code between Squirrel and C++ required only minimal modifications. But I wasn't impressed with Squirrel's reliability and sandboxing capabilities. For example, having deep recursion in Squirrel could crash the host C++ application back then and I encountered other gotchas. Today I would also possibly consider https://mruby.org as a possible Lua or Squirrel replacement. The security researchers had a field trip thoroughly looking for security/reliability problems in it: https://brandur.org/fragments/shopify-mruby
Dec 15 2023
prev sibling next sibling parent reply mw <m g.c> writes:
On Thursday, 14 December 2023 at 13:59:05 UTC, bachmeier wrote:
 If you're willing to go with Lisp, there are small, embeddable 
 Schemes: 
 [s7](https://ccrma.stanford.edu/software/snd/snd/s7.html) and 
 [Chibi](https://github.com/ashinn/chibi-scheme), one that is 
 more Clojure-like: [Janet](https://janet-lang.org/), and one 
 that's more like Lua: [Squirrel](http://www.squirrel-lang.org/).
Tried & FYI: ImportC cannot compile s7 for this issue: https://issues.dlang.org/show_bug.cgi?id=24228 ImportC cannot compile Janet for this issue: https://issues.dlang.org/show_bug.cgi?id=24291
Dec 20 2023
parent Stefan Koch <uplink.coder googlemail.com> writes:
On Thursday, 21 December 2023 at 00:39:11 UTC, mw wrote:

 ImportC cannot compile Janet for this issue:
 https://issues.dlang.org/show_bug.cgi?id=24291
One Problem with Janet is that it uses computed gotos which is a gcc extension The code it complains about looks like: ```C /* opcode -> label lookup if using clang/GCC */ #ifdef JANET_USE_COMPUTED_GOTOS static void *op_lookup[255] = { &&label_JOP_NOOP, &&label_JOP_ERROR, ``` As you can see &&label is not valid C11. Which is what the import C parser complains about.
Dec 21 2023
prev sibling parent mw <m g.c> writes:
 If you're willing to go with Lisp, there are small, embeddable 
 Schemes: 
 [s7](https://ccrma.stanford.edu/software/snd/snd/s7.html) and 
 [Chibi](https://github.com/ashinn/chibi-scheme), one that is 
 more Clojure-like: [Janet](https://janet-lang.org/), and one 
 that's more like Lua: [Squirrel](http://www.squirrel-lang.org/).
BTW, you can also use (native :-) DLisp (revived from undead) https://code.dlang.org/packages/dlisp
Dec 20 2023
prev sibling next sibling parent reply Ogi <ogion.art gmail.com> writes:
On Thursday, 14 December 2023 at 08:38:02 UTC, solidstate1991 
wrote:
 I need a lightweight scripting language with integer support 
 that is either easy to interface with D (preferrably as a 
 DLL/SO file, so I don't have to deal with godawful C/C++ build 
 systems), or at least would be easy to port within a few weeks.
[Squirrel](http://squirrel-lang.org/) comes to mind. It’s similar to Lua but has a C-like syntax and some extra types and features. It’s very lightweight; D bindings can be written in half an hour, and the entire C++ code base is just 7k lines of code. Used in some games by Valve.
Dec 14 2023
parent reply IGotD- <nise nise.com> writes:
On Thursday, 14 December 2023 at 15:04:40 UTC, Ogi wrote:
 [Squirrel](http://squirrel-lang.org/) comes to mind. It’s 
 similar to Lua but has a C-like syntax and some extra types and 
 features. It’s very lightweight; D bindings can be written in 
 half an hour, and the entire C++ code base is just 7k lines of 
 code. Used in some games by Valve.
Which has GC (reference counting/tracing hybrid) and yet it is used in video games. If D can improve the GC implementation it will be suitable for games as well.
Dec 14 2023
next sibling parent reply matheus <matheus gmail.com> writes:
On Thursday, 14 December 2023 at 15:44:21 UTC, IGotD- wrote:
 ...
 Which has GC (reference counting/tracing hybrid) and yet it is 
 used in video games. If D can improve the GC implementation it 
 will be suitable for games as well.
I hope do not to disturb the thread, but why people use GC in games? I always allocate everything I want before hand and work with that space. Now If someone would like to write a game with GC in mind, wouldn't be reasonable to do: Allocate(); GC.disable(); run_the_game(); GC.enable(); ? Matheus.
Dec 14 2023
parent reply Siarhei Siamashka <siarhei.siamashka gmail.com> writes:
On Thursday, 14 December 2023 at 18:18:21 UTC, matheus wrote:
 Now If someone would like to write a game with GC in mind, 
 wouldn't be reasonable to do:

 Allocate();
 GC.disable();
 run_the_game();
 GC.enable();
Is the `run_the_game()` part of code supposed to be annotated with the ` nogc` attribute?
Dec 14 2023
parent reply Bastiaan Veelo <Bastiaan Veelo.net> writes:
On Thursday, 14 December 2023 at 18:26:40 UTC, Siarhei Siamashka 
wrote:
 On Thursday, 14 December 2023 at 18:18:21 UTC, matheus wrote:
 Allocate();
 GC.disable();
 run_the_game();
 GC.enable();
Is the `run_the_game()` part of code supposed to be annotated with the ` nogc` attribute?
It depends, I guess. If it is not ` nogc` annotated, it can still allocate and if it does it can run out of memory, unless it calls `GC.collect` at the right moments. If it is ` nogc` annotated, it cannot allocate and then the whole `GC.disable` and `GC.enable` become unnecessary. -- Bastiaan.
Dec 15 2023
next sibling parent reply Siarhei Siamashka <siarhei.siamashka gmail.com> writes:
On Friday, 15 December 2023 at 10:53:44 UTC, Bastiaan Veelo wrote:
 On Thursday, 14 December 2023 at 18:26:40 UTC, Siarhei 
 Siamashka wrote:
 On Thursday, 14 December 2023 at 18:18:21 UTC, matheus wrote:
 Allocate();
 GC.disable();
 run_the_game();
 GC.enable();
Is the `run_the_game()` part of code supposed to be annotated with the ` nogc` attribute?
It depends, I guess. If it is not ` nogc` annotated, it can still allocate and if it does it can run out of memory, unless it calls `GC.collect` at the right moments. If it is ` nogc` annotated, it cannot allocate and then the whole `GC.disable` and `GC.enable` become unnecessary.
That's exactly my concern and the compiler isn't very helpful in this scenario. Would it be useful to have something like ` vettedgc` attribute, for annotating the part of code, where each GC allocation needs to be pedantically reported by the compiler as a warning? And some sort of ` permitgc` attribute to suppress these warning in a few selected places inside of this code if really necessary? I would suggest to maybe somehow differentiate between "hard" ` nogc` variety, where the garbage collector isn't even linked at all. And "soft" ` nogc` variety, where GC allocations are generally strongly discouraged, but allowed as explicitly annotated exceptions in a few selected places after careful review. The former is useful for hardcore bare metal embedded use cases and that's what the compiler supports right now. The latter would be maybe useful for game developers.
Dec 15 2023
parent reply "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
My suggestion up to this point has been `` localnogc``.

Disallows GC operations accidentally happening in a function body, but 
does allow calling GC functions.

Simple, easy to implement and understand. While also ensuring you don't 
accidentally do something in a hot path that you were not expecting 
(like creating a closure on the heap).
Dec 15 2023
parent reply Siarhei Siamashka <siarhei.siamashka gmail.com> writes:
On Friday, 15 December 2023 at 13:33:45 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
 My suggestion up to this point has been `` localnogc``.

 Disallows GC operations accidentally happening in a function 
 body, but does allow calling GC functions.

 Simple, easy to implement and understand. While also ensuring 
 you don't accidentally do something in a hot path that you were 
 not expecting (like creating a closure on the heap).
What can be done to make it happen? Is there a DIP proposal?
Dec 15 2023
parent "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
I'll see if I can talk to Walter about it this BeerConf, if not I'll get 
Adam Wilson to have a talk with him during one of their in real life 
meet ups.

It's an easy addition (although would need a DIP follow up).
Dec 15 2023
prev sibling parent Hipreme <msnmancini hotmail.com> writes:
On Friday, 15 December 2023 at 10:53:44 UTC, Bastiaan Veelo wrote:
 On Thursday, 14 December 2023 at 18:26:40 UTC, Siarhei 
 Siamashka wrote:
 On Thursday, 14 December 2023 at 18:18:21 UTC, matheus wrote:
 Allocate();
 GC.disable();
 run_the_game();
 GC.enable();
Is the `run_the_game()` part of code supposed to be annotated with the ` nogc` attribute?
It depends, I guess. If it is not ` nogc` annotated, it can still allocate and if it does it can run out of memory, unless it calls `GC.collect` at the right moments. If it is ` nogc` annotated, it cannot allocate and then the whole `GC.disable` and `GC.enable` become unnecessary. -- Bastiaan.
First thing, if a game won't run out of memory this fast. You typically have many scenarios where it is desirable the GC to run. On level loading, when a level finishes, even at checkpoints are the main places which you can make the GC run, if you run out of memory doing that, it means your game ought to be slow no matter the language you're using since there is a lot of strategies to make it more efficiente (Pool objects). Regarding the soft nogc, this is achievable by doing that one: ```d void main() { void main() { () scope nogc { writeln("Hello World"); }(); writeln("Hello World"); } } ```
Dec 15 2023
prev sibling parent solidstate1991 <laszloszeremi outlook.com> writes:
On Thursday, 14 December 2023 at 15:44:21 UTC, IGotD- wrote:
 Which has GC (reference counting/tracing hybrid) and yet it is 
 used in video games. If D can improve the GC implementation it 
 will be suitable for games as well.
GC isn't as evil as people make it out to be. Using the same tactical preallocation methods that are recommended for real-time applications in general fixes most of the issues people have with the GC. Now only if we had a way to run this GC on a background thread...
Dec 17 2023
prev sibling next sibling parent Julian Fondren <julian.fondren gmail.com> writes:
On Thursday, 14 December 2023 at 08:38:02 UTC, solidstate1991 
wrote:
 After losing a battle with trying to get Lua 5.4 working on my 
 own end, with problems I previously solved kept reappearing, 
 and other problems just were unable to fix for no good reason, 
 I've decided to drop it from my own game engine in favor of 
 some replacement.
What problems did you have with Lua 5.4? Building it, linking it, driving it from D, Lua as a language? It's very tough competition. I got to 'hello world' pretty quickly with bindbc-lua, ```d /++ dub.sdl: dependency "bindbc-lua" version="~>0.6.0" versions "LUA_54" libs "lua-5.4" +/ import bindbc.lua; import std.stdio : writeln; void main() { LuaSupport ret = loadLua(); assert(ret != luaSupport.noLibrary, "Lua shared library failed to load"); assert(ret != luaSupport.badLibrary, "One or more symbols failed to load. Bad version?"); assert(ret == luaSupport); auto L = luaL_newstate(); assert(L, "failed to open Lua"); luaL_openlibs(L); luaL_loadstring(L, "print 'hello world'"); lua_call(L, 0, 0); lua_close(L); } ``` and Lua 5.4 has integers: ``` $ lua -e 'print(_VERSION, 9223372036854775807)' Lua 5.4 9223372036854775807 vs. $ luajit -e 'print(_VERSION, 9223372036854775807)' Lua 5.1 9.2233720368548e+18 ```
Dec 14 2023
prev sibling parent Renato <renato athaydes.com> writes:
On Thursday, 14 December 2023 at 08:38:02 UTC, solidstate1991 
wrote:
 some replacement.

 I need a lightweight scripting language with integer support 
 that is either easy to interface with D (preferrably as a 
 DLL/SO file, so I don't have to deal with godawful C/C++ build 
 systems), or at least would be easy to port within a few weeks.
I haven't seen it mentioned yet, but Roblox has forked Lua and improved it a bit, including adding types to it so it does have proper int types. https://luau-lang.org/ I had a look and it seems to run twice as fast as Lua when types are specified... not groundbreaking but pretty good... and it seems to be about as small as Lua (they removed some stuff to make it safer to embed in games by default, but added some new stuff as well).
Dec 17 2023