rerumu / fione Goto Github PK
View Code? Open in Web Editor NEWLua 5.1 bytecode interpreter, in Lua
License: GNU General Public License v3.0
Lua 5.1 bytecode interpreter, in Lua
License: GNU General Public License v3.0
Hello, so i'm trying to create a Text Editor like Visual Studio Code. I have a button with the code of:
script.Parent.MouseButton1Click:Connect(function()
local loadstring = require(workspace.Loadstring)
local executable, compileFailReason = loadstring(script.Parent.Parent.texteditor_.Text)
executable()
end) -- this button is a run button to run the code in the texteditortextbox*
and i also have an output textbox
but i dont really know how to make the thing say in the output textbox
instead of the normal roblox studio console.
Help would be really appreciated!
local places = {'ReplicatedFirst','StarterGui','StarterPack'}
for _,v in next,places do
print(v)
end
Running this code results in it saying that there is a cyclic table, when the table is quite literally just three strings, with no references to itself whatsoever.
I'm using vanilla lua 5.1, I don't use the luajit interpreter
Whenever I require FiOne's module, I get a runtime error saying attempt to perform arithmetic on local "stm_byte" (a function value) (line: 336)
When looking at FiOne, line 336 is "end". I'm not sure why it's throwing this error.
I myself, know as much of Lua bytecode as I know about socialising, so I won't make a PR or anything. Currently upon usage of setfenv using the function returned by FiOne results in an error. For source this is the module I'm using https://www.roblox.com/library/4689019964/vLua-5-1-improved-VM
last screenshot is unorganized because i was using setfenv(0,custom_env) as a bandaid fix
This isn't necessarily an issue, but I couldn't find any other way to contact you. I just want to thank you so much for the work you've done on FiOne and various other programs. I've been working on modifying a Lua compiler for quite some time now, and without your Interpreter I'd be pretty lost right now, so thank you so much for all you've done, Rerumu! Again, I apologize for the less than conventional way of messaging you but I was unable to find contact information such as email or Discord.
Hi, I made a private library that helps with code execution that can switch between FiOne and Roblox's native loadstring, it creates a wrapper on Roblox instances aswell, I noticed that when I use FiOne to run a code that iterates a table, the table becomes a self cyclic table where it's content is only that table while the original definition of the table only contained normal things like strings or numbers, this is obviously unexpected behavior, however when using Roblox's native loadstring, it runs just fine, that's why I came here to try and see if it could be fixed.
Right now the reproduction files are unfortunately private, so if you can then can you tell me where else can we talk in private so I can send over the repro?
Thanks.
Is there any kind of tutorial for using this?
I have no idea about the differences between Lua and LuaJIT bytecode tbh, but this would be useful.
Here's a random example (without debug symbols):
local fn = function(num)
local ans = 0
for i = 1, num do ans = ans + i end
return ans
end
local dump = string.dump(fn, true)
print("RAW")
print(dump)
print("HEX")
print((dump:gsub('.', function (c)
return string.format('%02X', string.byte(c))
end)))
>RAW
>�LJ�
>'
>HEX
>1B4C4A020A2700010600000008290100002902010012030000290401004D020280200105014F02FE7F4C01020000
Yet another don't know enough to implement, but I might give a swirl after I finish up a passion project. The LuLu implementation was able to virtualize implementation of getfenv/setfenv, which would be handy to further reduce performance penalty impact in the new ROBLOX VM.
Unfortunately, I don't know enough of how Lua bytecode works to do this myself. However, I know LuLu had the ability to parse the proto to emulate how string.dump works in vanilla. Here's both a reference of the implementation
http://files.luaforge.net/releases/lulu/lulu/LuLu0.05/lulu005.zip
Implement Luau Operators like [+=, -=. *=, /=, %=, ^= and ..=]. If you add this feature it will help me.
Is it possible to modify FiOne to be able to hide stack trace of itself and the script calling FiOne when code execution encounters a halt? I want to like hide this and possibly show the actual stack trace (like line number of where the error came from)
Stack Begin
Script 'ServerStorage.FiOne', Line 547 - function on_lua_error
Stack End
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.