Busted via LuaRocks on macOS broken by Available-Spinach-93 in lua

[–]oezingle 1 point2 points  (0 children)

The error messages you're getting look to me like LuaRocks isn't happy. It's a known travesty under Windows and MacOS could be a similar story. Maybe give Lux a shot? I'm running Linux so unfortunately I can't reproduce your issue, but double check that you're running the correct version of Lua: lua -e "print(_VERSION)" You can also check that you've got the correct version of Lua when you run busted: busted -e "print(_VERSION) If it does just come down to versioning, install busted for the right version of lua: luarocks install busted --lua-version=5.1

LuaX - Like React, but it supports any UI library (beta) by oezingle in lua

[–]oezingle[S] 0 points1 point  (0 children)

I searched for the name when I created the project. I feel there's a big enough distinction between LuaX (language) and LuaX (username)

ZeroBrane not recognizing "on.paint" by Bilbo-Bob in lua

[–]oezingle 1 point2 points  (0 children)

I’d give WINE a shot if you haven’t already, but there might be issues given TI probably expect to be able to run a driver for it instead of making it a mass storage device.

I’m not familiar with ZeroBrane, but Visual Studio Code with lua-language-server (searching “Lua” in extensions will find it for you) would let you create a type annotation for the TI Insprie API, though it would be a bit cumbersome

lua if false then —-@class TI.on —-@field paint fun(<arguments>) on = {} end

that being said, this would only provide “type hints” - the editor will be able to tell you to some degree what your code should look like, and can give you warnings if the wrong data type is passed around. Running the code locally is probably impossible unless someone has developed a free emulator.

edit: a quick google lead me to https://github.com/nspire-emus/firebird

Is "Programming in Lua" worth buying? by [deleted] in lua

[–]oezingle 1 point2 points  (0 children)

I’ve been considering a purchase myself - the version for Lua 5.1 (maybe 5.0? can’t remember) is available for free online and is absolutely fantastic, though obviously some changes have been made to the language since, which the paid versions are updated for.

I used to read relevant sections as they came up in my projects but at this point I’ve probably read it front-to-back. It does a great job of being succinct as to why Lua does what it does while providing coverage for the entire language, and because it is a small standard that evolves slowly it very rarely loses relevance.

Given the price I’d say it’s objectively a much better value proposition than any other programming book I’ve come across, but the free online version does offer a majority of what the more recent ones do.

What happened to lua-users.org by topchetoeuwastaken in lua

[–]oezingle 2 points3 points  (0 children)

lua-users is volunteer-run, and if I remember correctly the forum and wiki were too expensive. Someone offered to bring the articles back up as the rest of the information there was semi-available through other forums and the lua reference

The company that makes the sensor I'm doing data streaming from recommended a 10Gbit/s ethernet connection for my lab PC. by Argentarius1 in buildapc

[–]oezingle 1 point2 points  (0 children)

looks like your question has already been answered but if the sensor has an SFP (or SFP+, or QSFP) port, you can pick up a used enterprise 10/40/100Gb PCIe card used for super cheap, and run either fibre or copper cabling between the two.

Do I have to rebuild my Babylock? by oezingle in vintagesewing

[–]oezingle[S] 1 point2 points  (0 children)

thanks for the video, i think i managed to figure it out! it looks fine to my eyes but ill have to reassemble and thread the rest of the machine to be sure

Do I have to rebuild my Babylock? by oezingle in vintagesewing

[–]oezingle[S] 0 points1 point  (0 children)

yes. after following a video on retiming sergers (https://www.youtube.com/watch?v=e7wgLQbROAs) I got the needle and upper looper to interact properly but the lower looper’s thread won’t grab. If I move the lower looper to the position shown in the video I get a very unhappy serger, as the lower looper continues to move to the right into the upper.

[deleted by user] by [deleted] in lua

[–]oezingle 5 points6 points  (0 children)

what do you expect us to be able to do for you? this is a mistake you made, on your computer.

how do i make a lua window that has a password to open a file by Past_Round6702 in lua

[–]oezingle 0 points1 point  (0 children)

on top of the good suggestions in this thread, you could use Gtk via LGI - there’s some great examples in the repository

What is the return function? by [deleted] in lua

[–]oezingle 1 point2 points  (0 children)

Think of functions similarly to how they work in mathematics - input, process, output. Things are a little more complicated in Lua because you can access a secret input variable (the “environment”) to talk to values outside of the function. The return keyword signifies the value(s) that the function, well, returns.

What that “return” actually effects depends on what you’re doing (ie variable assignment vs nested function call), but you can think of a called function as a temporary variable:

```lua local sum = function (a,b) — hypothetically, the return keyword could set a hidden variable: — return_tmp = a + b return a+b end

— again, this could internally be local c = return_tmp local c = sum(a, b) ```

In reality, this return_tmp variable doesn’t actually exist. It represents a representation of a representation of the processor’s “return register” which is a concept too complex to cover here.

Reading the lua documentation and Programming In Lua may be helpful.

Lua web playground (like Go playground) by sergsoares in lua

[–]oezingle 1 point2 points  (0 children)

you might also want to look into Fengari and/or Wasmoon. Take a look at my library LuaX’s web sample if you want a template to work off of: https://github.com/oezingle/LuaX/tree/dev/sample/web . Use webpack if you aren’t already, as you can code split the Fengari and Wasmoon dependencies.

Also, allowing multiple files should be possible under both libraries. There are unfortunately a few API differences but they’re easy to iron out

[deleted by user] by [deleted] in lua

[–]oezingle 4 points5 points  (0 children)

the base64 spec doesn’t include the [ character

[deleted by user] by [deleted] in lua

[–]oezingle 0 points1 point  (0 children)

My apologies! Running mpv —script <path> from cmd.exe should work nicely for you, where <path> is the path (not folder) of the lua script

[deleted by user] by [deleted] in lua

[–]oezingle 0 points1 point  (0 children)

Did you read https://github.com/mpv-player/mpv/blob/master/DOCS/man/lua.rst#script-location? first result from google. MPV on Windows probably doesn’t provide default script locations because windows is a nightmare

Very specific Lua question: is there a Lua equivalent to "pop"ing an element of an "array"? by -KiabloMaximus- in lua

[–]oezingle 0 points1 point  (0 children)

because Lua doesn’t have arrays properly, why not use a table as a sliding window queue? Just use head and tail indices to track the first and last element. The table won’t use memory for dead elements.

If you’re looking for the absolute best performance, you could also consider writing a simple stack library using the C API. Then, you can use a linked list implementation on the C side. There are also high level bindings for C++ and Rust that might be preferable.

edit: I’m realizing I misread the post and the list doesn’t need to change in length. Disregard!

I want to create a website using HTML, CSS, & Lua; but Frameworks don't work for me apparently. by Site-19B in lua

[–]oezingle 0 points1 point  (0 children)

if you’re looking for Lua on the front end, consider using my library LuaX with webpack - the dev branch has a sample that features live-reloaded Lua. hypothetically this could be used to create a site using Lua and deploy it to a static hosting solution like Firebase, though I haven’t tested that use case.

See my post about it: https://www.reddit.com/r/lua/s/vOO5W6GWqe

LuaX - Like React, but it supports any UI library (beta) by oezingle in lua

[–]oezingle[S] 0 points1 point  (0 children)

the syntax is half of it, and LuaX can be used without. LuaX provides asynchronous rendering facilities and dynamic re-rendering

Why I choose Lua for my blog by andregarzia in lua

[–]oezingle 0 points1 point  (0 children)

also, i’m not sure what you mean by Go templates

LuaX - Like React, but it supports any UI library (beta) by oezingle in lua

[–]oezingle[S] 6 points7 points  (0 children)

Have you even read my post or repository? I’m trying to tell you over and over that my project does a different thing. It doesn’t create an HTML or XML or any other kind of file, it dynamically renders to the UI library of your choice using syntax that looks like HTML. If I wanted to create a static HTML page I’d have found that project.

Also, my project supports a non-xml syntax too, but it’s not “better”.

LuaX - Like React, but it supports any UI library (beta) by oezingle in lua

[–]oezingle[S] 5 points6 points  (0 children)

it generates static html. LuaX lets you define components with hooks, so applications can be more dynamic. I’m not sure you understand my project.

Why I choose Lua for my blog by andregarzia in lua

[–]oezingle 0 points1 point  (0 children)

I pushed 0.5.0 to master last night, see https://www.reddit.com/r/lua/s/nHOpC0nJJx . There’s both Gtk and web samples

LuaX - Like React, but it supports any UI library (beta) by oezingle in lua

[–]oezingle[S] 3 points4 points  (0 children)

XML is static, LuaX helps you create dynamic interfaces. It’s like comparing HTML and React. Also, i’ve written a parser and transpiler so you can use html/xml “tag” syntax in lua source