Comment by arccy
1 year ago
Lua is nice but it being embedded in many different places means that there will often be environment specific context that's injected for you to interact with, but any editor tooling won't know what's injected
1 year ago
Lua is nice but it being embedded in many different places means that there will often be environment specific context that's injected for you to interact with, but any editor tooling won't know what's injected
Not necessarily true. LuaLS, the most popular LSP, uses LuaCATS (Lua comments and type system) annotations. You can place annotation files (type stubs) in a directory and the LSP will pick them up.
I use this for a project of mine where I embed a Lua interpreter where I made several additional Lua modules available.
I ran into this recently with OBS scripting. I don't really like Lua, so I wanted to try making a Typescript-to-Lua toolchain specifically for OBS scripting. Well OBS injects a ton of stuff into the Lua environment, and I'd have to find a way to mock all of that in Typescript. Sadly, I don't have time for it, and I've chosen a different product than OBS because I don't really want to invest so much time learning a new language to accomplish something with free software when I can purchase something that just works for $40. My time is way more valuable, and this is the only time I've ever needed to code something in Lua. Yeah, OBS supports Python too, but I dislike Python even more than Lua.
I'm surprised to hear that there's proprietary software that's competitive with OBS Studio. What is it?
I just needed a program to capture a portion of the screen under my mouse and stream it as a webcam device to Zoom, so I can screen cast a portion of my gigantic workstation desktop (6480x3840) to people with 1920x1080 screens, while following my mouse cursor around.
OBS was one stop along my journey to get there, as there's some Lua and Python scripts that achieve something similar, but not quite exactly what I wanted with multi-screens, so I began trying to modify the script to do what I needed it to do.
In the end I'm going with something called "SparkoCam" which achieves this easily with no hassle, but it costs $40. Since $40 is less than what an hour of my time is worth, it was kind of a no-brainer to abandon the hassles of learning Lua (a many hour detour) and fiddling with OBS Studio to get what I wanted. I have no real use for Lua outside of this, so it would be time wasted on this one project.
3 replies →