[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]

How /g/ approved is lua for a first programming language?

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: 68
Thread images: 9

File: image.jpg (78KB, 1024x1024px) Image search: [Google]
image.jpg
78KB, 1024x1024px
How /g/ approved is lua for a first programming language?
>>
>>52302376
imo, it's very good as a first language and as a language in general. the only problem is that it's not one of the most popular languages, but it's not exactly obscure, like top 30 or so
>>
its good

have fun with your tables
>>
It's nice because it's easy to embed in future projects

Also Premake
>>
File: sicpthankyou1427512241060.png (752KB, 707x898px) Image search: [Google]
sicpthankyou1427512241060.png
752KB, 707x898px
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/
>>
>>52302376
I love it, but I wouldn't recommend it as a first language. Start with C or SICP
>>
File: Kyubey1.jpg (8KB, 320x180px) Image search: [Google]
Kyubey1.jpg
8KB, 320x180px
>>52302376
beware! the logo imply tragedies of many magical girls.
>>
>>52302376
you can make yr own rainmeter shit :^)
>>
>>52302376
it's the first one I've learned.
tables r life

just make sure you have something to program.

gmod or computercraft come to mind.
>>
Notice how everyone says it's a nice language? Believe it or not that makes it a bad first language, anything that babies you isn't going to make you a better programmer in the long run.

With this in mind the only acceptable first language is C/C++ (basics are the same), with a very distant second going to Java/C#.
>>
>>52302376
>lua for a first programming language
JUST

Lua is shit senpai, for a first language pick something with C DNA, like Javascript.
>>
>>52303480
The reason C is considered a good language is because it forces you to deal with memory which is an important concept in programming even if your language abstracts it, JavaScript does not and neither does Lua.

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.
>>
>>52303529
>forces you to deal with memory

forces you to write stuff that you could avoid in other languages, why reinvent the wheel?
>>
>>52303529
When I said C dna I mean syntax.

Someone who learns JS can pick up C/C++C#/Java/Go much easier than someone who begins with Python/Lua etc
>>
Stupid question but what is the difference between a "proper" programming language vs a "scripting" 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
seconding this! Im also interested in the obviously brilliant answer to this stupid question
>>
>>52303815
A scripting language is usually an interpreted language that controls the actions of other programs.

A 'real' language is usually compiled and controls the actions of the system.

there is a lot of gray area in between
>>
>>52303855
Same deal here, but with roblox. It was childish even before the site went to marketing hell, but at least it was a damn solid intro to scripting/programming without oversimplifying it.
>>
>>52303890
Programming in games to automate tasks and see them work live is a gr8 way to get interested and learn coding in a fun environment.

another pretty good one is Computercraft for minecraft, where you can automate robots and stuff.
>>
>>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
>>
>>52303999
>If someone say wants to
lisp
the correct answer is and will always be lisp
>>
>>52303999
even bash is fast enough to react to 'sudden' events

I think you are underestimating how fast computers really are.
>>
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.
>>
>>52304003
>If only it were easier to make kids naturally want to tinker with things

yeah, but they should also be introduced to the idea of programming and scripting so they could get an idea what it is and what it does.
>>
>>52304003
>to make kids naturally want to tinker with things
the age of LEGO is way behind us anon, that shit nade you want to tinker since very day you were born,

you:
>building and adding features and tweaking LEGOs until perfection of the build is achived and resulted in a feeling of monumental success

todays kids:
>rather tap their fucking fingers in an ipad until bored senseless
>>
>>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 = Javascript

Only difference is that javascript has more libraries.
>>
>>52304024
Let me guess I should make my own lisp to achieve maximum efficiency

>>52304038
Oh..... I was actually thinking of something horribly slow for some idiotic reason now that I looked up some shit, it turns out lua is one of the fastest scripting languages out there
>>
>>52303399
>computercraft
Good times.
Maybe I'll reinstall some mods.
>>
>>52304207
>make my own lisp
if you want
that would be pretty baller
but no, normal scheme should suffice

from a different perspective that is exactly what you're doing when writing macros and procedures though, making your own lisp customized perfectly to your needs and the task at hand
>>
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.
>>
File: tumblr_npovmh5Dxv1uxx9hao1_500.gif (1011KB, 410x535px) Image search: [Google]
tumblr_npovmh5Dxv1uxx9hao1_500.gif
1011KB, 410x535px
>>52304722
If Im getting it right (a properly used)lisp is like a software equivalent of ASICs right?
>>
>>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.
>>
>>52304752
This.

Regardless, LUA is a fun scripting language. It's just that Python is the better one.

Also, as adviced before... as long as you understand basic programming concepts, by all means please do C first.
>>
>>52304752
>hurr its not poplar so it must be shit. Just use some memester language my mom says its best
>>
>>52304163
Yeah the whole mindstorms line was good shit. The next was pretty much drag and drop but there was a way to create "user blocks" that were slightly more customizable functions.

They have a FIRST robotics competition with Lego shit, I was on a team in middle school. I really should check back on that team and maybe mentor if I can.

I feel like i should do something to inspire the next generation of tech people to not take us to the bleak future it looks like we're getting, ya know?
>>
IMO the amount of good docs for beginners out there is lacking, which is surprising considering how many people pick up programming just to use lua in a game or w/e

Python is pretty much the same thing (in that they're both high-level dynamic languages with mostly strong typing you autists) but has like an order of magnitude more books/tutorials/etc.
>>
File: BrickPi.jpg (213KB, 700x525px) Image search: [Google]
BrickPi.jpg
213KB, 700x525px
>>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
>>
File: masturbatesicp1345828329512.jpg (712KB, 2236x1600px) Image search: [Google]
masturbatesicp1345828329512.jpg
712KB, 2236x1600px
>>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.
>>
>>52304786
No, it's nothing like an ASIC.
>>
>>52305667
You have to hear what they mean, not what they say.
>>
>>52305734
So he continues saying wrong things?
>>
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.
>>
>>52305452
I think you should rather start with an imperative language, they are much closer to how computers actually work.
>>
>>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)
>>
>>52305901
The abstract model I ended up working most with in CS, was the Turing machine, not the lambda calculus. Which is closer to imperative languages.
>>
>>52305837
>For someone more interested in the CS side of things I'd teach scheme

Do you know of any good resources to get started with Scheme?
>>
>>52303627
So you understand whats going on you underaged dipshit
>>
File: 1397298470661.jpg (69KB, 1004x609px) Image search: [Google]
1397298470661.jpg
69KB, 1004x609px
>>
>>52306182
understanding what is going on and being forced to deal it with yourself every time and not letting already written code deal with it are totally different things
>>
>>52302376
Lua + robloz = unlimited games
>>
File: sicp1420344865799.png (197KB, 441x421px) Image search: [Google]
sicp1420344865799.png
197KB, 441x421px
>>52306044
is this a joke?
am I being rused?
>>
>>52303783
>var
>function

Nice b8

Javascript is so far from all the languages you listed
>>
>>52304163
Nxt is honestly great for the younger kids. I remember when I was like 12 I put the motors and an ultrasonic sensor on a vacuum and just let it run around the house.

The new Nxt (ev3) is garbage though. Overall, it's a good intro to programming logic and engineering.
>>
>>52303815
scripting
>more sugar
>not compiled

proper
>compiled (orders of magnitude faster performance)
>more boilerplate/low level stuff
>>
lua + love2d
GAYMZ
>>
It's a pretty well rounded language for embedding in games and programs and such, so if your modding something its a great way to get started.

Not as good for replacing a general programming language though IMO.
>>
File: sicp_kodomo.jpg (44KB, 434x479px) Image search: [Google]
sicp_kodomo.jpg
44KB, 434x479px
>>52306044
Nice bait desu wa
>>
>>52302376
Start with python. Very readable and popular language. Then switch to c++.
>>
>>52303529
i read from stackoverflow ceo's blog, pointer programming is aptitude.

better stop learning programming early if cannot handle simple pointer arithmetic.
hence start with C.
>>
>>52302376
I'll ratter recommend ruby as first language.
http://tryruby.org/levels/1/challenges/0
>>
>>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.
>>
>>52306044
TLS and SICP. In that order
Thread posts: 68
Thread images: 9


[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.