#Looking for scripting languages that aren't Lua

56 messages · Page 1 of 1 (latest)

flat elk
#

I was about to start working on something (a Minecraft mod, but it can apply to anything else i could do), adding virtual computers and other devices and i need a scripting language for it. Problem is, i'm not finding much aside from Lua and Javascript. I would gladly use JavaScript but not without TypeScript and i'm not sure how to achieve that without bloating the jar (tsgo for example via wasm is about 40mb).
I could also use WASM but the exisiting libraries are either incomplete (no component model, like with Endive) or hard to figure out (literally anything from the ai.tegmentum group. Their docs are all weirdly outdated or wrong).
If i can't find anything, i think i can probably wrap a C# library with a c API and make a library out of it via NativeAOT

dense rockBOT
#

<@&987246399047479336> please have a look, thanks.

mental delta
#

Kotlin script

median fern
#

python
powershell

shut junco
#

Groovy is an option...

#

Not necessarily a great option... but an option.

median fern
#

i mean there are many scripting languages, but if i would want to use one i would probably use python even though i do not like python, but for some scripts it is fine.

flat elk
#

I'm not sure how i would do that. I just want something i can sandbox easily

fluid locust
#

except maybe lua

flat elk
#

I mean, Endive by default is sandboxed

fluid locust
#

I mean

#

if by sandbox you mean safely sandboxed, it is very hard

#

but if you just want to sandbox, you can just use java

mellow rivetBOT
#
package jshell

Provides interfaces for creating tools, such as a Read-Eval-Print Loop (REPL), which interactively evaluate "snippets" of Java programming language code. Where a "snippet" is a single expression, statement, or declaration. This functionality can be used to enhance tools such as IDEs or can be stand-alone.

JShell is the central class. An instance of JShell holds the evaluation state, which is both the current set of source snippets and the execution state they have produced.

Each source snippet is represented by an instance of a subclass of Snippet. For example, a statement is represented by an instance of

fluid locust
#

you should never sand code between client and server btw unless you have absolute control over it

faint root
#

I haven't read what the problem with Lua is.

flat elk
#

I Just don't like it :)

faint root
#

You know people like you are persecuted today? Lua is a religion, righteously.

fluid locust
#

Lua might be the best solution since it's pretty much safe

median fern
#

there is also ruby, php, etc. long list

fluid locust
#

if you use any other language then lua
you should never send code between client and server

faint root
#

Go for php

flat elk
#

Yeah, i just hate dynamic typing and a few other quirks it has. Plus i wanna make my thing distinct from ComputerCraft/CC:Tweaked

faint root
#

I must see that

median fern
#

do it in java or C#

fluid locust
flat elk
#

I actually considered that

faint root
#

I won't do that.

flat elk
#

Tho that was mostly for something else

fluid locust
#

if it is your own language, it will be safe

#

so one less problem

faint root
#

Use AI that transforms raw text into code ))))

fluid locust
#

@flat elk please, you have to understand that if you use any language but your own or lua, you simply can't send it between client and server and so your mod will be severaly limited

flat elk
#

wasm is pretty safe (when you add limits to it, mostly memory related and interop) but as i wrote i couldn't find many actually usable options, on top of how i can't find many languages to compile to it on the fly

#

I think some people do use it

#

Tho mostly in rust and other languages for their games

fluid locust
#

except lua, your own language, and I guess wasm ?

willow iris
#

script

#

javascript if you are a bad person

white blaze
#

Groovy, you can even make a dsl of the scripting language you want in groovy and still have the bulk be java.

silk osprey
#

iirc a stretch but if you use WASM then you can sandbox anything that compiles to it

#

which includes C++, Rust, Java, but not JS (since why bother compiling JS to WASM when your browser already supports JS)

kindred fern
#

so, it may seem crazy, but why not just a java plugin like althreon said?
just do not accept plugin that use certain api.

fluid locust
kindred fern
#

that sub jvm would load 1 plugin

#

etc

fluid locust
#

you could just run a java app within java

#

but that's not a proper sandbox

#

The only way to do a proper sandbox is to use a vm

#

but that's way too costly