Lua actually might be acceptable as a scripting language - One of very few. If you really want to understand shit and get at the heart of the art of problem solving using computers, watch SICP and learn Scheme. https://archive.org/details/MIT_Structure_of_Computer_Programs_1986/
Java/C# almost doesn't abstract it... But everything is a reference and there's garbage collection, so as I said, a very distant second.
Some smartasses will suggest assembly, sure, that's the best for memory, but it'll easily scare new programmers away.
C, just C, no C++, is the absolute best first language.
My first experience with programming was in LUA, I used to play Gmod, and I had a plugin called wiremod with an extension called "expression 2" which allowed you to control different entities in the game with lua like thrusters, turrets, buttons, wheels, teleporters, etc
>>52303815 to me it's in how they're used or what they're used for you wouldn't want to write anything substantial or important with a `scripting language' but they're magic for one liners or simple system wide integration things some languages seem to be distinctly one or the other (Bash vs C) while some can work beautifully as both (lisps)
>>52303865 If someone say wants to make bot for practicing purposes, like wow-leveling bot or gold farming or what have you, which is the better choice to use: a scripting or a programming language?
>it needs to control another program >but it also needs to be fast and responsive in order to be able react to sudden events >Im no programmer but a full-featured bot seems to be a big project anc it is said (for python) that scripting languages are not good for big things
>>52303948 Tbh I wish it was easier to get kids interested in programming using things like these instead of the stupid oversimplified STEM shit. If only it were easier to make kids naturally want to tinker with things
Lua in particular is one of the fastest running dynamic languages and has an official C API for very performance intensive pieces.
Note that the terms "compiled language" and "interpreted language" and "scripting language" are misleading; it's not the language itself that is interpreted or compiled, it's the implementation. In theory, any language can be compiled or interpreted. There exist PHP compilers and C interpreters, for example.
>>52304003 my friends little brother's school(on 9th grade) uses minecraft and computercraft to teach basic programming to the students.
and many of them are pretty interested in it, including my friends little brother who writes lua scripts for computercraft after school. I saw one of his creations which was a botnet(huehue inb4 windows 10 joke)of mining turtles controlled by a central system to make specific holes and build walls automatically and stuff, it was pretty cool.
at least some schools are doing something right and introducing people to programming at an earlier stage.
>>52304128 ah yes, almost forgot about the lego automation thing, the robotics kit, what was it called... (googling) ah, nxt, sadly IIRC the nxt app did not allow you to actually write code but to drag blocks around like scratch:/
Lua doesn't have a good standard library or ecosystem--it's mainly used for scripting programs written in other languages, not for writing standalone programs. Also, variables are global by default so you have to write 'local' fucking everywhere, and the whole everything-is-a-table is stupid. Just learn Python.
>>52304752 >Also, variables are global by default so you have to write 'local' fucking everywhere You can use setfenv to change that behaviour.
>everything-is-a-table is stupid You just don't appreciate tables, it's fucking great and allows you to do a lot of neat things. You're probably just not used to it. Also not everything is a table (primitive types, strings etc.), but every complex object or data structure you use is.
>>52305020 the BrickPi shield that allowed you to control the mindstorms equipment from an actual programmable platform was pretty cool, I should take out my boxes of legos, buy some mindstorms motors and sensors and do some robotics with that myself :)
desu legos are probably the best platform to build simple robots and stuff
>>52305349 Oh yeah, Scheme is a reasonable choice too given that it's a language literally designed from the start to teach people how to program
Avoid the silly people suggesting you learn something like C/Java, that's like suggesting you learn to read from the King James Bible. It makes sense if that's all you have or all you'll ever need but it won't teach as much as actually interacting with more books that are less complex
>>52304786 What I think you're getting at is true of any language. Lisp just gets you deeper and makes it easier, fundamental, and obvious - Which is why everyone should study it. The earlier the better. Seriously, read and watch SICP.
lua is really neat since it's pretty much just tables all the way down. they optimized the shit out of them for most of the different use cases and the JIT is fucking magical. For fun I programmed an assignment in a CS class using almost nothing but iterators and it came out really good and ran really damn fast even on the largest of the datasets I constructed.
It's a great language but idk if it's what I'd teach to someone who doesn't know how to program, largely because of there not being enough resources on some things (although the docs are so miles better than python's shitty docs), but also because I've already got several languages I'd rather teach depending on the circumstance: for someone learning to program with the end goal of writing software, I'd probably try to teach Ada to give them a compiler that holds their hand and nags at them and forces them to learn good habits. For someone more interested in the CS side of things I'd teach scheme since it's such a beautifully simple concept with very little syntax to get in the way of algorithms. Maybe I would teach lua as a scripting language in games and simple robotics like Lego Mindstorms if I were to teach high-school or younger kids to try to get them to focus on tinkering and hopefully not worry too much about underlying CS or weird systems stuff.
>>52305853 Perhaps for someone going into software dev but I really don't think it matters for CS how the physical real computer works when there are many different abstract models of computation that could be built but just aren't for whatever reason. (dataflow systems are some of my favorite to study and those just aren't built because of how impractical they'd be to work with)
>>52302376 Depends on what you want to code and how much. If you just want to script some stuff, write a small code here and there, then it's excellent and will teach you a lot for other viable scripting languages.
If you want to get into programming and understand how stuff works, then I'd rather recommend a language like C, where the programmer needs to control the memory etc., not the language. That's a skill which is very hard to get once you're used to something that babies you.
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 shown content originated from that site. This means that 4Archive shows their content, archived. If you need information for a Poster - contact them.
If a post contains personal/copyrighted/illegal content, then use the post's [Report] link! If a post is not removed within 24h contact me at firstname.lastname@example.org with the post's information.