Lua - Reddit – Telegram
Lua - Reddit
30 subscribers
278 photos
31 videos
4.23K links
News and discussion for the Lua programming language.

Subreddit: https://www.reddit.com/r/lua

Powered by : @r_channels & @reddit2telegram
Download Telegram
Lightweight library for windowing?

I know libraries like LOVE or wxWidgits already exist and are great for making apps with Lua, but I just want something that is specifically for making a window; LOVE, wxWidgets, etc have lots of functionality I don't really want/need. The closest I could find to what I am thinking about is lua-fenster, but it doesn't yet support wayland, which is what I use (One of the main developers, jonasgeiler, said he planned to add wayland support, but it doesn't work when I installed it via LuaRocks). What I was also thinking about was using LuaJIT's ffi functionality and just use a C library, which could also work.

https://redd.it/1m9g8fx
@r_lua
Best way to learn

I am wondering what some of your ways to learn lua. I am mostly new with text based programing and I've learned the bare minimum.

https://redd.it/1m9itwl
@r_lua
I created a miniflux plugin for KOReader

A few months back I had this urge to buy a Boox palma just for the only purpose of reading my RSS entries from miniflux but then I remembered that I had other einks (a kobo H2O) and that it would be nice to develop a plugin. Since KOReader is so amazing and open source, I decided to make one and it's been a fun process.

Miniflux KOReader plugin is in a early but very usable stage. The idea of the plugin is to be offline friendly so you can take your entries everywhere you want. You can decide on include the images or not if you prefer so. It also has a custom css to apply as a style tweak that enhance the Reader.

The plugin also has the ability to open images by tapping (no holding as I wanted to open it faster) them, add them into the link dialog if are images inside a link and close it (no zoom in) when using the buttons on the Kobo physical buttons. For the moment those aren't possible to turn off and are hardcoded.

If you don't know miniflux, miniflux is a minimalist and opinionated feed reader that you can host on your own or you can register by a fee on it's website. The minimalistic idea really fits with KOReader environment and who knows, if someday I can buy the Boox palma, I definitely will use this plugin.

Writing Lua has been so much fun. I'm improving several places on my code as now I get to know both Lua and the KOReader core utilities.

Repository: https://github.com/AlgusDark/miniflux.koplugin

https://preview.redd.it/o07m4gi4y7ff1.png?width=1548&format=png&auto=webp&s=e331df499be06965eef5023a098af3f9ab4e4143

https://preview.redd.it/2dhus3j4y7ff1.png?width=1532&format=png&auto=webp&s=f163868fe5dc0981e73a74dfe732d6fae11eceff

https://preview.redd.it/br4whgi4y7ff1.png?width=1550&format=png&auto=webp&s=88cdbaa4ce42ebaf74b670609cb1bfe80e432c00




https://redd.it/1m9t2wq
@r_lua
Como deofuscar moonsec v3

Queria saber se existe um jeito de tirar a proteção do moonsec v3 pra ver o código verdadeiro e não o obfuscado

https://redd.it/1m9y2jk
@r_lua
Aprendiendo luau o lua. Estoy aprendiendo lo básico de lua desde Android no tengo pc, alguna recomendación?

local player = game.Players.LocalPlayer
local gui = Instance.new("ScreenGui")
gui.Parent = player:WaitForChild("PlayerGui")
gui.ResetOnSpawn = false


local speed = Instance.new("TextButton")
speed.Name = "Speed"
speed.Size = UDim2.new(0, 150, 0, 50)
speed.Position = UDim2.new(0, 120, 0, 40)
speed.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
speed.Text = "Speed Off"
speed.Parent = gui

local speedActivo = false

speed.MouseButton1Click:Connect(function()
speedActivo = not speedActivo
if speedActivo then
player.Character.Humanoid.WalkSpeed = 80
speed.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
speed.Text = "Speed On"

else
player.Character.Humanoid.WalkSpeed = 16
speed.Text = "Speed Off"
speed.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
end
end)




https://redd.it/1maxym7
@r_lua
I need a teacher or partner

Guys, I’m so noob, i know nothing about lua
I just know a little python
Is there some one that s/he like learn with me or teach me?
After that we can do projects together or learn more from each other, if you like do this tell here, if we will be a lot, we can create a group
It can be very enjoyable that you teach to someone or learn with someone
Tnx for read💛🤜🏻🤛🏼

https://redd.it/1mbq10e
@r_lua
Learning Lua

I was thinking about getting into learning Lua to make games and am already familiar with JavaScript. I was wondering if there are any good resources for that.

https://redd.it/1mbuoes
@r_lua
Create 'constant' locals inside or outside the loop?
https://redd.it/1mdsf72
@r_lua
Issues regarding install

Upon opening my .Lua file with PowerShell it declines and exits the app

https://redd.it/1mfxnph
@r_lua
FNF Psych Engine Character Select screen in Lua & few other noscripts?

Hello, i wanted to ask you guys, or maybe even request, A Script that simulates the FNF V-Slice Change Character System: U Press tab in freeplay, and you go into the Character Select screen, the same UI etc. from FNF V-Slice, now I know "Nah man just use P-Slice" Dude P-Slice is so hard to use it's only peak at crashing and that's it -- I would like to get the noscript for 0.6.3 - Even the latest ver is accepted but plz send it if u have it or if u're a coder pls do it

https://redd.it/1mgg8wj
@r_lua
Roadblocks trying to make a very fast Lua Virtual Machine

I'm using a modified version of FiOne so it runs even faster. However i am hitting roadblocks which i have no idea how to solve. My benchmark gives me 0.077 (The lower, the better) however this is quite slow for my needs. (Example: Software Rendering, Dyno's, Heavy usage of math and etc)

I have tried creating a custom instruction set to try optimizing it however it barely made it faster. (0.001s improvement?)

So my question is: How can i make a LuaVM that runs even faster? For the provided benchmark, i want to see below 0.01 at best, 0.05 at worst

NOTES:
\- I have tried other interpreters which are **LuaInLua** and **LBI** however not only were they slower, they're also way more buggier.
\- I do NOT have access to FFI, loadstring and load due to being in a sand boxed environment (Bit library is accessible)
\- I must do this in just Lua, No C or C++
\- I am running this inside a game which means lua will run roughly 3x slower due to the layers it adds.
\- I cannot post my LBI's source code as i would be then leaking unreleased code from my project which i cannot do. It's roughly 80-90% same as the original code.
\- It might not be possible to optimize this any further but i want to try anyways.

What i know are damaging performance:
\- The amount of table indexing Lua interpreters are doing including FiOne.
\- The amount of if statements used inside run_lua_func for FiOne.

Benchmark code if needed (Yes, i know its quite basic but the more advanced one wouldn't fit here)

local x = os.clock()
local s = 0
for i=1,1000000, 1 do s = s + i end
print(string.format("elapsed time: %.5f", os.clock() - x))

https://redd.it/1mgwgz3
@r_lua