[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Is lua a good programming language or is it just a meme? I'm

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 25
Thread images: 2

File: 2016-lua-image.png (2MB, 1200x675px) Image search: [Google]
2016-lua-image.png
2MB, 1200x675px
Is lua a good programming language or is it just a meme?

I'm new to programming, should I start with Lua?
>>
>>59708565
It really depends on what you intend to use it for.

If you want to script things for existing games or programs, then go for it.

If you want to make your own applications or games from the ground up, then you should pick between C++, C# or Java.

If you want to make websites, go for JavaScript and PHP.
>>
>>59708825
it can't be used for lightweight standalone programs or apps? only games?
>>
If you are really new you should start with popular language like java, c#, python or c++
>>
>>59708825

>and PHP
One would do better to only learn JavaScript for webshit. PHP is garbage.

>>59708880

Lua can be used for pretty much anything. It isn't typically used for standalone applications, however. It is most commonly used as an embedded scripting language for games.
>>
>>59708880
Well, you must realise, it was created to extend software. Not create the software.

>>59708922
I tried to refrain from saying PHP, but I honestly can't think of any other mature backend. Writing a backend in JavaScript seems like a fad to me, but we'll see.
>>
>>59708880
Theoretically it can, though I'm not sure if you can link multiple source files into one program, so organizing very large codebases might be difficult. It does support text I/O and some graphics libraries, so I don't see any reason why you can't use it for that, though it's usually used for scripting other programs.
>>
>>59708960
> I honestly can't think of any other mature backend
Java has mature web framework, so does python.
>>
>>59708960

>I tried to refrain from saying PHP, but I honestly can't think of any other mature backend
Just because it's "mature" doesn't mean it's good. Plenty of newer backend languages blow PHP out of the fucking water.

>Writing a backend in JavaScript seems like a fad to me, but we'll see.
I don't see anything coming to replace it.
>>
>>59709026
Sure, I could have mentioned those. I just haven't used them myself. Personally I really dislike those languages.

>>59709075
I think it's going to be rather uncertain what will happen in the next few years. I think PHP7 is a pretty good step in the right direction though. Although it has some major flaws, I will admit.
>>
>>59708565
Lua is intended as an embedded scripting language. It's shit as a standalone language, it doesn't even have a standard library.
>>
>>59709400
>it doesn't even have a standard library
It has a standard library dumbass, it's just barebones as fuck.
>>
>>59708565
Some anon said this before about lua:
>You don't learn lua, you use it when you need it.
There is very little use for lua outside of applications with embedded lua scripting support.
It is a good language to pick up programming logic though.
>>
Why do you people always ask this extremely dumb question?

Look at the Lua implementation. You'll know exactly what it's capable of.
>>
>>59708880
Why would it be only usable in games?

You just define a function in C
int myFunc (lua_State *L) {
//dostuff with the lua stack
return 1; //number of results
}


then call it in a lua script
myFunc("blah blah this gets handled by stack")

Easy but only if you dont fall for the OOP meme too hard and go full retard with glue libraries.

There are some game-only implementations that use lua and make you write the game engine while they take care of stuff behind the scenes like CoronaSDK and Love2d. Nothing stopping you from making your own and for not-games. Adobe used it for stuff.

FYI the lua repl is a lightweight standalone program that uses lua.
>>
Good question OP.
There is a game called Minetest. It's basically Minecraft engine with plugins in Lua. Every block, interface, animation and other functionality is in Lua, the rendering is in C++.

How much faster would it be if it was in C++ in 100%? You can compile your own C++ code as library and load it in runtime, so the difference is only multiplatformability. I know there are performance problems in some aspects of the game, I was told it's not because of Lua.
>>
>>59712078
Lua is supposedly VERY fast but it can be made even faster with LuaJIT. C++ only would probably be unnoticably faster but then you'd have to recompile changes.
>>
File: brazilian_intellectual.jpg (49KB, 630x354px) Image search: [Google]
brazilian_intellectual.jpg
49KB, 630x354px
Lua is a hue programming language, therefore it is superior.
>>
>>59709075
Why is js even used to write backends? I'm not very familiar with webdev, but as I understand it, since it's server side you can use any other language for the same job, right?
>>
>>59712330
Because they're shitters that think its great they don't have to learn a different language than the ones they write frontend abominations in.
>>
>>59712330

Because V8 got fast enough to reasonably use it outside of the browser, and web developers don't want to learn new languages. Also, PHP is a garbage language and any replacement would be an improvement.
>>
>>59712330
Because JS is what a lot of people know. It's easy to learn because anyone can try it out without any kind of toolchain, is used all the time for server-side scripting, and is one of the few languages that has good support for both OOP and FP.
>>
>>59713632
I meant client-side scripting
>>
>>59712330
JS and Lua are actually very similar as far as object model is concerned. That's what makes them excellent extension languages.
>>
>>59709026
This, honestly if you want to set up and kind of database for storage Java is the way to go. Once you get the groundwork for your system you are good to go.
Thread posts: 25
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.