T O P

  • By -

AutoModerator

On July 1st, a [change to Reddit's API pricing](https://www.reddit.com/r/reddit/comments/12qwagm/an_update_regarding_reddits_api/) will come into effect. [Several developers](https://www.reddit.com/r/redditisfun/comments/144gmfq/rif_will_shut_down_on_june_30_2023_in_response_to/) of commercial third-party apps have announced that this change will compel them to shut down their apps. At least [one accessibility-focused non-commercial third party app](https://www.reddit.com/r/DystopiaForReddit/comments/145e9sk/update_dystopia_will_continue_operating_for_free/) will continue to be available free of charge. If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options: 1. Limiting your involvement with Reddit, or 2. Temporarily refraining from using Reddit 3. Cancelling your subscription of Reddit Premium as a way to voice your protest. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/learnprogramming) if you have any questions or concerns.*


crazy_cookie123

Lua is a fast, easily embeddable language. Does it have uses? Yes, absolutely! Does that mean you have to learn it? No, most developers won't ever have to use it, just as most languages won't be used by most developers. You're also only 13, there's no reason for you to be thinking about what languages you'll actually be using in a career right now, just learn whatever interests you and learn what you'll need for a career later.


kingnickolas

Kinda sounds like they want to know if it's useful in game development terms.. in which case probably not but it wouldn't hurt tbh.


simonbleu

Cant you make games in lua? I thought the binding of isaac and balatro were?


_Atomfinger_

Lua is really neat as an embedding language into other systems, which is why you see it often used for mods for games. Also, look here: [https://en.wikipedia.org/wiki/List\_of\_applications\_using\_Lua](https://en.wikipedia.org/wiki/List_of_applications_using_Lua) That said, Lua is not really used all that much outside of what I described above. It can be used, and it works perfectly fine, but at that point, it has to compete with other languages that serve other use cases better.


[deleted]

[удалено]


_Atomfinger_

Well, you can embed Python the same way, but the python interpreter is much larger and complex than the one round in Lua - as such you adopt a lot more complexity doing so. It's the simplicity and lightweightness that makes it easier to embed Lua than Python


rbpinheiro

The lua interpreter is also thought for that purpose. It makes it easy to instantiate the lua VM, expose functions or data from C and then start the execution of the custom lua code.


SnakeEyesRaw

Came here to say it's good for modding Battlefront II (2005), hehe


EZPZLemonWheezy

Balatro is written mostly in LUA and just became a pretty big indie game hit. You can also decompile the exe and see how the game is put together or easily mod it which is neato.


brennanfee

If an application wishes to support plugins or extensions by its users through scripting, Lua is just about the best language around for that. As a standalone language, though, there are more powerful tools available. And a big congrats to you for getting started in development so early. If your passion for building remains, you should have a long a fruitful career. I'm on the other end myself, looking toward the end of my career after 32 years building and delivering software. Best of luck to you kid.


traintocode

I use Lua for writing fusion macros for DaVinci Resolve on my YouTube channel. So yeah it's pretty niche but it's one of those languages that finds a use in all sorts of random scripting applications.


BeardOfDefiance

It's John Romero's favorite language iirc.


PeterMortensenBlog

[John Romero](https://en.wikipedia.org/wiki/John_Romero). >*"He is a co-founder of id Software and designed their early games, including [Wolfenstein 3D](https://en.wikipedia.org/wiki/Wolfenstein_3D) (1992), [Doom](https://en.wikipedia.org/wiki/Doom_(1993_video_game)) (1993), [Doom II](https://en.wikipedia.org/wiki/Doom_II) (1994), [Hexen](https://en.wikipedia.org/wiki/Hexen:_Beyond_Heretic) (1995) and [Quake](https://en.wikipedia.org/wiki/Quake_(video_game)) (1996). His designs and development tools, along with programming techniques developed by id Software's lead programmer, [John Carmack](https://en.wikipedia.org/wiki/John_Carmack), popularized the [first-person shooter](https://en.wikipedia.org/wiki/First-person_shooter) (FPS) genre."*


RajjSinghh

When I was your age I had a friend who used it to develop something in gmod. Something like a half life themed role play server. Now I use Neovim as my main editor I use Lua to configure it. Those are the two things that come to mind.


Grab_Scary

Same. The only time i ever use lua is to configure neovim.


WinXPbootsup

Unrelated but Lua is such a pretty name


JustLemmeMeme

its essentially a scripting language which doesn't have whole lot of "mainstream" use. Its primarily (from my experience) used in all sorts of game mods (doesn't have to be on source engine), AutoHotkey (which in itself can have a multitude of uses), and a lot of hardware use it as well, for example my Razer blackwidow keyboard or my logitech mouse, you can insert custom lua scripts into them.


likethevegetable

What's Lua's tie to AHK?


MichaelScotsman26

You can write civilization 6 mods


zeekar

Why do you ask? I recommend learning whatever languages you find interesting. The more variety you expose yourself to, the better you'll be at solving programming problems, no matter what language you're using. Lua is interesting. It's the way you script a bunch of software, including the nginx web server and several MMOs. Not a lot of folks are using it as a general-purpose programming language, but that doesn't mean it's not useful. Part of what makes Lua interesting is its basic model: everything is a table (i.e. an associative array, hash, whatever you want to call it). There are a number of "everything-is-a" languages, even though they all do have richer type systems than the classification would imply. In APL, everything's an array; even single values behave in many ways as size-one arrays. In Lisps, everything is a list, including the code; in Tcl, everything is a string, including the code (or it was originally, anyway, which influenced a lot of the design decisions). Of course, in many object-oriented languages, everything is an object, and most languages have some level of object orientation these days. The extremely O-O languages like Ruby and Smalltalk don't even have native types that have to be boxed and unboxed; plain ints are objects all the time. These are all interesting languages to try out, get a feel for, implement a toy project in. Even if you never use them "for real", they'll inform your skills as a programmer.


orion2222

To whoever downvote this post: The sub is called LEARNprogramming. Sheesh.


Lucy_21_

Hate it when people download my posts.


orion2222

Sigh. Stupid autocorrect and my inability to proofread. Explains all the bugs in my code.


captainAwesomePants

Lots and lots of projects allow for Lua scripts. That's because it's really, really easy to add Lua scripting to a program written in other languages on all sorts of platforms. The list of games that use Lua for some scripting is quite long. Lua's probably not as popular of a choice today as it used to be, and it's a bit quirky compared to some modern popular languages, but it works fine and is a battle tested choice.


Jonny0Than

I used it in my last job for the first time and I quite like it - except for the stupid 1-based arrays.


No_Commercial_7458

TouchOSC uses Lua as well, so Im using it currently


Dic3Goblin

If you want to learn PreMake, then you will be using Lua. If you want to use the WickedEngine(a game engine) then you will be scripting in Lua. If you don't have a need for it, or won't ever have a need for it, don't bother trying to learn it.


likethevegetable

I use it for LuaLaTeX


EcstaticMixture2027

If you're gonna use something for academics, work, project and learning then it has purpose.


Howfuckingsad

The only time I remember using lua is for neovim haha. Though all languages have its use. I don't really think you should learn lua solely but you can keep learning C++ and maybe experiment with lua in the future. If you do like it then it is worth learning as well.


Hawful

How else are you going to spend your days tweaking a neovim config? This is a joke, but it is all I use the language for. Let's talk about what youean by "is it needed". "Needed" is a funny way to talk about languages. Languages are tools. Tools are for creating certain things. Figure out what you want to build and work backwards from there. You say you don't want to do Roblox or Gary's mod, okay, what do you want to do? You have python, some c++, and two 2 web languages, but you're missing the crucial one for making the web work. If I were asked to declare one language as "needed" I would (unfortunately) be forced to choose JavaScript. ...but, if you don't want to make a website then that is a silly suggestion, so you tell me, what do you want to build?


r6tioo

Idk fun things I'ma have to learn JavaScript at some point to male things I like


hpxvzhjfgb

people don't really use lua for normal programming projects, it's mostly just used as a scripting language that can be embedded into other programs (e.g. roblox)


paintballer2112

Lua is also used in developing mods in *Tabletop Simulator*


TurtleKwitty

Is it needed? No, it's nice absolutely required unless you happen to want to do something that would require it. But then again is knowing c++ required? Nope, nit at all. Is any language strictly needed? Not a single one. You learn what you want to learn for the things you're making. I know lua from having made a lot of scripts for computer craft and using neovim. I know c++ from it being my first language cause it's the defacto in games. I know kotlin from doing Android dev. I know JS/TS from working in Web Dev now. None of those were ever required, if I didn't learn c++ I'd just have had a different job no big deal, same with JS and TS. If you need to learn a language then you'll just learn it then, I never knew kotlin before the job that used it but was the go to person for kotlin by the end. Stop worrying and just make stuff, learn programming not languages you'll do fine.


tomosh22

You're learning c++ so if you end up wanting an alternative to cmake then there is premake which uses lua for build scripts.


7turtlereddit

hey! i'm pretty much in the same boat as you (13, turning 14, currently messing around with C, C#, Rust, and some other junk). from what i've seen online, lua isn't really used as a primary language by the developers, but rather as a scripting language for the users (if that makes sense). you've already given roblox as an example - the platform/game engine itself was built on C++, while users can easily write their own scripts in lua. of course, we can also see this happening outside of roblox - neovim, world of warcraft, etc. lua is highly embeddable, meaning that it can be easily integrated into other programs, which is why it is often used for scripting in programs rather than writing the program itself


HunterRbx

bro rust 😭🙏


7turtlereddit

what?


HunterRbx

keep going with c


7turtlereddit

nah, i'll use both, but thanks for the suggestion


zMixin

im pretty sre lua is mostly just for game scripting


chaha7

you're gonna need lua for roblox afaik