Skip to main content
0 votes
0 answers
33 views

Proportionally scale an array of numbers so the total equals a specific number [closed]

I currently have an array of randomly generated numbers ranging between 0.5 and 1: local ArrayOfRandomlyGeneratedNumbers = { [1] = 0.56756654; [2] = 0.56756767; [3] = 0.76576576; [4] = ...
user28774945's user avatar
0 votes
1 answer
14 views

Adding variable length int/float/string array fields to subtree in lua dissector

I'm in the process to implement a WireShark dissector, and I have a technical question (I'm still learning the details of a lua dissector). In particular I want to add int/float/string items to the ...
Arnault Bonafos's user avatar
1 vote
0 answers
20 views

Can I copy the vim api in neovim

I want to make a neovim plugin but my plugin need to be able to copy the whole vim api, do some changes to it and roll back later backup = vim -- do some stuff with `vim` vim = backup I tried to do ...
Rignchen's user avatar
2 votes
1 answer
24 views

How to precompile and dump Lua binary with C closures?

Currently I have a Lua-driven system with C functions connected. When it is built from source, it is constructed as below: // bind C functions to make them callable inside Lua code ...
jiandingzhe's user avatar
  • 2,121
1 vote
1 answer
46 views

Setting up denols to work along with tsls in kickstart neovim

I want to set up language server for my JS/TS project with Deno. I am using modular_kickstart which is a fork of kickstart neovim. I have put my config for deno in my lspconfig.nvim plugin file like ...
Mr.Unforgettable's user avatar
1 vote
1 answer
27 views

Any way to combine two tables in lua?

Like I got two tables: {["a"] = "aaa"} and {["b"] = "bbb"} And make it into one table: {["a"] = "aaa", ["b"] = "bbb"} I ...
Sapbot SCS's user avatar
1 vote
0 answers
18 views

Index lua table with table [duplicate]

if I have an x and y I want the following to print 6(without making a string or combining the numbers into one): a = {} a[{1, 2}] = 6 print(a[{1, 2}]) -- nil unfortunately lua uses the address of the ...
Ivan Gyulev's user avatar
1 vote
1 answer
24 views

Lua os.getenv("UID") returns `nil` but environment variable it's already set

I'm writing a yazi plugin to preview documents. I'm on GNU/Linux. I'm trying to save the temporary files in a dedicated folder with the UID —user id— as suffix. According to Programming in Lua The os....
Macydnah's user avatar
0 votes
0 answers
54 views
+500

How to make a payload in Edge TX and send it with ELRS telemetry package to flight controller (Betaflight, MSP)?

I want to practice Lua writing EdgeTX scripts for FPV drone telemetry. I have found a pretty decent documentation for edge tx and Lua. In order to accomplish my task I need to establish a ...
captain-yossarian from Ukraine's user avatar
1 vote
1 answer
40 views

Pass NestedStruct from c++ to lua

I'm trying to make a c++ function address mapping with lua, so that I can do hot fix,but I can correctly pass nested struct to lua (I guess, because I print table before call lua function), but I got ...
richardkiwilee's user avatar
0 votes
0 answers
9 views

os.remove works but Shell:Run with luacom doesn't

I have a file at c:\test.mp3. Removing it with os.remove("c:\\test.mp3") works but I want to remove it with del command from luacom's Shell. Unfortunately, it doesn't work: local command = ...
van_folmert's user avatar
  • 4,507
-3 votes
0 answers
27 views

Making a newspaper in computercraft, any way to deconstruct the http return? [closed]

https://newsapi.org/docs/endpoints/top-headlines If it helps, I just need the title (and, preferably, in the same order as they came in) The code: local printer = peripheral.find("printer") ...
Evin Lee's user avatar
1 vote
1 answer
26 views

JavaScript's proxy.apply handler in Lua

In JavaScript, you can make an object that is callable like this: const prox = new Proxy(function() {}, { get(target, key) { return true } apply(target, that, argList) { console.log('This came ...
frankie's user avatar
  • 223
0 votes
0 answers
18 views

How to connect Lua module with Simion workbench program

Hi, I am a new user of Simion and Lua, so probably my question is rather silly, but I will be very grateful for the answer though) I would like to realize some useful Simion functions as separate Lua ...
Oleg's user avatar
  • 1
0 votes
1 answer
15 views

Initialize lua dissector ProtoField table inside protocol init function

I would like to initialize the fields protocol table inside the protocol init function, is it possible ? I've tried the following but it doesn't seem to be working: function my_protocol_addProtoFieds()...
Arnault Bonafos's user avatar

15 30 50 per page
1
2 3 4 5
1527