Questions tagged [lua]
For code written in Lua, or built to interface with Lua (e.g. native code providing Lua functions).
107 questions
2 votes
1 answer
89 views
Encapsulating status codes and messages à la absl::Status
I'm new to Lua and thought a decent way of familiarizing myself with the language would be to implement some basic utility functionality around status codes. In particular I've reimplemented a subset ...
3 votes
1 answer
102 views
<Programming in Lua - 4th> exercise 2.2 - place 8 queens
About exercise 2.2 Place N queens on N*N board, 1 queen per line, so that all queens are safe. Use permutation to improve the provided implementation from book. The ...
3 votes
0 answers
56 views
Add DAP debugging to NeoVim on Mac
Upgrading from vim to neovim (on the mac). Part of this is to get the DAP debugger working from inside neovim. I have "Lazy&...
1 vote
2 answers
121 views
Try to not repeat function in Lua
There is a way to not rewrite the same part (the cycle for i = 1...end) twice? ...
1 vote
2 answers
332 views
function to print any type in Lua?
I'm learning Lua for about a week now and I've built (I hope) a function to print any type in Lua. As I'm new to Lua I don't quite understand: if there is a more succinct way to achieve this if ...
3 votes
1 answer
134 views
Trailing delimiter string splicing, implemented for Lua in C
I've been writing with C for a couple days, so this is a relatively advanced function compared to the simple things I've been doing previously. It's written for the Lua API, but it's still C. ...
8 votes
2 answers
322 views
3D torus in Lua
I'm a total beginoob in Lua. The aim is to display a 3D Torus in dots (see Figure1), or at least compute the positions, privileging clarity over performance. Pseudocode link. Don't hesitate to be ...
4 votes
2 answers
657 views
I wrote my first pathfinding algorithm
I'm currently writing a small game in Lua, using the Love2d framework. I guess I'm doing it as a practice of sorts, but it did give me the opportunity to write my first pathfinding algorithm. I wrote ...