generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Why Roblox.Lua is the best scripting langauge

Previous Thread :: Next Thread 
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
27 Dec 2015 04:54 PM
To Learn (Yes, the title was to get more views)

1:

It's the easiest language I know that isn't a mark-up language which involves more than just typing in names and values (Thinking of scratch and HTMl here)

2:

It keeps you motivated. It is VERY easy to start making genuinely useful things if you use the right tutorials, and can make really cool experiments at a very early stage, like seeing what happens if you create a brick which replicates on touch, if you've never tried this, use this:

script.Parent.Touched:connect(function()
local part = Instance.new("Part", workspace)
end)

Put that in a part, and hover it above the ground


3:

It provides a great backdrop to other languages. I recently started JS, and I've flown through the course, as it is very, very similar, just a tiny bit different cosmetically
i.e

if bool == true and bool ~= false do -- Ik I can do if bool

end

becomes

if (bool === true && bool != false) /* Yes that is three =/*
{
}


I'm not saying other descendants of C don't do this, but they are so much harder to learn to start off with than Lua.


Your thoughts?


Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
27 Dec 2015 04:56 PM
It's the easier I'd say but arguably not the best.
Report Abuse
AdvancedObjects is not online. AdvancedObjects
Joined: 11 Dec 2012
Total Posts: 3354
27 Dec 2015 04:56 PM
easiest*
Report Abuse
DrHaximus is not online. DrHaximus
Joined: 22 Nov 2011
Total Posts: 8410
27 Dec 2015 05:01 PM
Lua isn't a good language.
Lua's success and popularity comes from its extendability, portability and its ease in implementation for use with C/C++.
Objectively, Lua isn't modern or good. It has weird practices (arrays/tables start at 0, logical operators and keywords are verbose and weird) and lacks a standard library.
The community around Lua constantly find themselves writing the *same* code over and over again as they implement a standard library for their usage. Languages (like Chaiscript/Python with Boost) who aim to achieve a similar level of portability come with standard libraries - anyone who knows Chaiscript/Python will have the comforts they know from other software which uses these languages,

As for your points,
1) HTML isn't a programming or scripting language. That's like calling JSON or XML scripting languages, they're simply a format of storing information.

2) Many other langugaes are better for this. You're arguing a point of productivity - look at aforementioned languages, especially Ruby.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
27 Dec 2015 05:19 PM
start at 1*
Also what do you mean it doesn't have a standard library?

Lua is definitely not the best, but for a scripting language it's great. It starts at 1 because it's not implemented as a real array so treating it as an offset is misleading (also easier for beginners to think "1 = first")

And Lua is probably one of the most portable scripting languages out there, written in ANSI C and easy to change the configuration (say, use integers instead of doubles, or floats instead of doubles, or whatever).
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
27 Dec 2015 05:22 PM
Interesting points raised by DrHax.

I did say HTML wasn't a programming language, but a mark - up, or at least implied it. Anyone who knows what HTML stands for will know it is a mark up language.

I would also refute you saying Lua starts at 0 for arrays. This is factually incorrect.

I am not aware of what Chaiscript, so I can't comment on that. But learning Python is not a good spring board to learning other languages as they don't use end, and are more indentation and space orientated compared to languages like Lua which don't give a cr@p.
You mention libraries too, but for roblox, we have a pretty massive library which can be used for some success, as well as a cookbook on the wiki which is being expanded. However, for learners, this is more than adequate, but granted, this is a problem.

In terms of keywords, I think Lua is pretty good in how it can read like english, which is fantastic for learning. You can right, if not brought then, that sounds like English, albeit hard to find a context in which that is useful part of a sentence, but I can think of a few.

I understand Ruby to be a programming language for apps, and thus would argue that coding on lua is probably going to yield more attention, unless your app is a sensation.

Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
27 Dec 2015 05:24 PM
"I did say HTML wasn't a programming language, but a mark - up, or at least implied it. Anyone who knows what HTML stands for will know it is a mark up language."

Someone doesn't know that markup is actually one word.
Report Abuse
Silvestris is not online. Silvestris
Joined: 02 Mar 2013
Total Posts: 111
27 Dec 2015 05:28 PM
@cnt

Lua lacks a standard library, or a set of functions that can be used across platforms which use Lua (this isn't exactly true, but the functionality it does come with is bare.) Lua was originally created for configuration files, after all.
as for the indexing thing, I'm not contesting it doesn't work, I'm saying that it's an unusual solution. if we were to talk about first languages, it's a weird habit to learn. even for languages which don't use 'actual' arrays, they use the normal format of 0-(size-1)
Lua isn't a modern language by any means, all extending of it basically has to be done in ANSI C, some libraries exist for the purposes of extending this functionality (old LuaBridge, new LuaIntf), but they're not great solutions.

@Wolf

"I would also refute you saying Lua starts at 0 for arrays. This is factually incorrect."
obviously this was a typo, you dingus.

"But learning Python is not a good spring board to learning other languages as they don't use end"
you act as if 'end' is a normal practice in programming. languages like Python/Ruby (giants of languages) use indentation to implicity imply scoping

"we have a pretty massive library"
you missed the point entirely. ROBLOX made that. These functions aren't avaliable anywhere else, the epitome of lack of portability

" I think Lua is pretty good in how it can read like english, which is fantastic for learning"
it's taste.

"I understand Ruby to be a programming language for apps, and thus would argue that coding on lua is probably going to yield more attention, unless your app is a sensation."

Ruby is a general purpose programming language.
Report Abuse
Silvestris is not online. Silvestris
Joined: 02 Mar 2013
Total Posts: 111
27 Dec 2015 05:45 PM
btw im drhaximus but im bent for stupid reasons
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
27 Dec 2015 05:51 PM
I like lua because of this

local corn = 5
if can then -- no ()
corn = corn + 1 -- no ;
end -- i dont like this

Report Abuse
Silvestris is not online. Silvestris
Joined: 02 Mar 2013
Total Posts: 111
27 Dec 2015 05:55 PM
plus, if you were to point out lacking features of Lua:
1) bad support for object oriented programming. again, like the library functions, users of Lua are expected to make their own class system out of tables+metamethods
2) useful operators are missing, think of ++, --, +=, -=
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
27 Dec 2015 05:58 PM
"Lua lacks a standard library, or a set of functions that can be used across platforms which use Lua (this isn't exactly true, but the functionality it does come with is bare.) Lua was originally created for configuration files, after all."
It has a small standard library which can be used across all platforms that use Lua though. Although yes it's quite small, but that's the whole point of Lua, to be small and portable.
Report Abuse
Silvestris is not online. Silvestris
Joined: 02 Mar 2013
Total Posts: 111
27 Dec 2015 06:01 PM
"Although yes it's quite small, but that's the whole point of Lua, to be small and portable."

at that point Lua is just a set of syntax, the way you use it depends entirely on the platform you're using. it'd say that hurts portability.
Report Abuse
Batmanofzurenargh is not online. Batmanofzurenargh
Joined: 01 Mar 2015
Total Posts: 559
27 Dec 2015 06:03 PM
I really do like lua, but I find vb probably the easiest language to use.
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
27 Dec 2015 06:03 PM
We are talking about SPECIFICALLY roblox lua.
It's a very portable language, from iOS, to Android, to Mac, Windows, and XBOX 1
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
27 Dec 2015 06:03 PM
Well technically all "scripting languages" are just syntax and everything is done by the host (in this case C).

Since the standard library is so small, everything that exists is more or less guaranteed to work on any platform with an ANSI C compiler. And the thing about Lua, it's easy to extend. If you feel like you want to add, say some hashing function, you can easily do it through C and just extend it through Lua by using some function from the auxiliary library (I think that's what it's called).

Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
27 Dec 2015 06:04 PM
Yes it may not be modern (no unicode support is a pretty big example) but that's the whole point, it's meant to work in as many places as it can.
Report Abuse
Silvestris is not online. Silvestris
Joined: 02 Mar 2013
Total Posts: 111
27 Dec 2015 06:07 PM
@cnt

but at that point Lua becomes the Linux kernel and the platform becomes the various linux distros, knowledge isn't necessarily transferrable

@wolf

"We are talking about SPECIFICALLY roblox lua.
It's a very portable language, from iOS, to Android, to Mac, Windows, and XBOX 1"

Roblox Lua isn't a language though.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
27 Dec 2015 06:10 PM
"but at that point Lua becomes the Linux kernel and the platform becomes the various linux distros, knowledge isn't necessarily transferrable"
What?

Lua is an interpreted language. The interpreter is just a program created in [ANSI] C so the interpreter can be compiled on many different machines. I don't understand what you mean when you say 'it becomes the Linux kernel'
Report Abuse
Silvestris is not online. Silvestris
Joined: 02 Mar 2013
Total Posts: 111
27 Dec 2015 06:11 PM
@cnt

when I talk about portability I don't mean for compilation into your project, I mean for use across platforms which USE Lua
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
27 Dec 2015 06:22 PM
Oh. Well it's still very portable assuming things haven't been changed all that much (the source code itself is what is supposed to be portable, the bytecode isn't since different platforms might have different specs (like maybe the size_t on 1 platform might be 4 bytes whereas on another might be 8 and so on))
Report Abuse
Silvestris is not online. Silvestris
Joined: 02 Mar 2013
Total Posts: 111
27 Dec 2015 06:25 PM
@cnt

yeah. but using Lua across platforms is like using the -nostdlib flag for gcc
Report Abuse
Canttelx is not online. Canttelx
Joined: 10 Jul 2014
Total Posts: 64
27 Dec 2015 06:51 PM
to say its easy is like saying surviving a car crash is easy. not evryone finds i easy. i like java alot better. so easy to learn because your only building a website.
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
27 Dec 2015 06:55 PM
"to say its easy is like saying surviving a car crash is easy. not evryone finds i easy. i like java alot better. so easy to learn because your only building a website."

Bad analogy, and Java isn't often used for websites as far as I know.

Lua has enough implications, loose enough syntax, and untyped values that makes it a walk in the park compared to other languages.
Report Abuse
WolfgangVonPrinz is not online. WolfgangVonPrinz
Joined: 24 Oct 2013
Total Posts: 4656
28 Dec 2015 07:02 AM
"Java isn't often used for websites as far as I know."

...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image