Its as simple as this:
local currentTime = tick()
wait(1)
local endTime = tick() - currentTime
print("Took "..endTime.." seconds.")
Its as simple as this:
local currentTime = tick()
wait(1)
local endTime = tick() - currentTime
print("Took "..endTime.." seconds.")
ik but idk any slow functions to see the actual result of speed
They seem to have a similar time of 0.0003
seconds.
goodbye vlua, hello luai
It’s not done yet. I’m reworking the parser, so there’ll be limited functions.
Could you list the following functions available or is it too much?
At the moment, you can only create variables and print to the output.
well ig I’ll stick to vlua for now until all of the functions are added
Thanks for the info
Pretty nice! I could see some useful in-game debugging applications for this.
[+] Updated parser
[+] Added interpreter
Decided to do a quick test, Luai vs vLua. Here’s the results:
Luai: 0.0007014274597168
vLua: 0.0044927597045898
the e-05 in the loadstring time actually means 0.00001 so loadstring is actually over 100x faster than LuaI
I removed that, but loadstring is exploitable so this is a better alternative, even with its limited functions.
Well, could you possibly write some grammar and standards for it?
Hard to know what’s there and what to use without a set standard or definition of namespaces, keywords, and functions in the language.
For example:
It explains how you would build a function, string, number, negative (unary), etc, etc
An example:
printStatement -> "out" expression ";"
--translates to
out(1); -- prints "1"
Luau has this in their source code (look in Parser.cpp):
If statement
While and Repeat loops
And a little bit of information:
Anyways, nice job on this, continue doing what you’re doing
Thanks, but it’s like loadstring. Refer to the Luau syntax.
Could you change this then if it’s related to Luau’s grammar and syntax?
Looks kind of like a mix of JavaScript and Java, so I mentioned setting a standard and giving more context on the grammar.
My bad, I recently changed the keywords of it.
Sorry for bumping. But this seems like a great alternative to vLua! I’m gonna use this.
This is an underrated module.
Thanks for the feedback! I’ve paused this project as I work on writing a programming language in C so I can fully understand the concept of language design (500 unfinished projects is the developer life lmao). Once I finish that, I’ll continue developing this.
Is there a way to stop the code from accessing the game itself?