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: Real Discussion - Lua Syntax Standard

Previous Thread :: Next Thread 
NecroBumpist is not online. NecroBumpist
Joined: 12 Sep 2010
Total Posts: 4198
26 Jul 2011 04:09 PM
Now, I know the majority of you guys can't collaborate at all, but maybe, just maybe, I'll be able to hold an intelligent conversation with a few of you.

So everyone has their own coding style, and some are easier to read than others, but what if everyone used the same, easy to read and logical, formatting ?

I prose that together, we draft up a standard for Lua syntax, and then create a parser that makes any code, no matter how bad, compliant with this standard.

Are any of you at all interested in this topic ?
Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
26 Jul 2011 04:11 PM
Lua is very flexible :/ and I really like it that way...
Report Abuse
gijsbel11 is not online. gijsbel11
Joined: 07 Feb 2009
Total Posts: 4223
26 Jul 2011 04:11 PM
i'm kinda interested, but how?
Report Abuse
NecroBumpist is not online. NecroBumpist
Joined: 12 Sep 2010
Total Posts: 4198
26 Jul 2011 04:14 PM
Sprecturmw, this is aimed at making a standard coding style, so that it's easier to read and understand someone's script.

Gijsbel11, while writing my new Assembler I got the chance to experiment with the proper method to parsing and tokenizing, and I believe this would be possible, if we could come up with a standard.
Report Abuse
Reaven is not online. Reaven
Joined: 17 Jun 2008
Total Posts: 9181
26 Jul 2011 04:15 PM
Forming a standard would be nice, it would speed up the process of reading code. This assumes people follow it.
Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
26 Jul 2011 04:15 PM
"Sprecturmw"

BLAAAAAAAARGH *Rages*
It's Spectrumw >:O

I actually like having an own scripting style, although, I'm interested in this project, and I'm willing to help.
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
26 Jul 2011 04:17 PM
http://wiki.roblox.com/index.php/Writing_Clean_Code

This explains some decent guidelines on lua syntax
Report Abuse
nickmaster24 is not online. nickmaster24
Joined: 04 Oct 2008
Total Posts: 8906
26 Jul 2011 04:19 PM
Or, we could use a decent amount of comments...
Report Abuse
Reaven is not online. Reaven
Joined: 17 Jun 2008
Total Posts: 9181
26 Jul 2011 04:19 PM
I'm used to coding Java more, and indenting is forced in it, so I carried that to lua.
Report Abuse
NecroBumpist is not online. NecroBumpist
Joined: 12 Sep 2010
Total Posts: 4198
26 Jul 2011 04:20 PM
@Reaven,
even if people don't follow the standard, part of this project is making a something to translate any style of Lua coding to the potential standard.

@Spectrumw,
You can still solve problems how you like, it's just following a standard format so that it's easier to read.

Like code without tabbing or empty lines is more difficult to follow than properly spaced code.
Report Abuse
Reaven is not online. Reaven
Joined: 17 Jun 2008
Total Posts: 9181
26 Jul 2011 04:20 PM
Problem is, someone is going to have to end up agreeing on that standard. So it turns into a human issue.
Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
26 Jul 2011 04:21 PM
@Crazy
Someone missed an eof in those examples.
Report Abuse
jode6543 is not online. jode6543
Joined: 16 Jun 2009
Total Posts: 5363
26 Jul 2011 04:22 PM
If you give me a run down of the method I might be able to help code it.
Report Abuse
pokelover980 is not online. pokelover980
Joined: 12 Jun 2009
Total Posts: 4141
26 Jul 2011 04:24 PM
Sounds nice as long as it doesn't put any mention to variable naming conventions (AKA camelCase vs PascalCase. I personally prefer PascalCase since it looks prettier and more correct (Y U START WITH LOWERCASE WHEN LOGICALLY YOU SHOULD START WITH UPPERCASE!?), but most people disagree with me for some reason).
Report Abuse
NecroBumpist is not online. NecroBumpist
Joined: 12 Sep 2010
Total Posts: 4198
26 Jul 2011 04:27 PM
@Reaven,
Yes, that is a problem. So I'd like to get a group of people together so we can form a sort of committee, and maybe vote on different options.

@Crazy,
I've seen suggestion lists like that before.
But this project is different.

It's a two-part thing.

1) There's the standard, which people are encourage to follow.
2) Then there's the translator, which will properly format code to make it compliant with the standard.

Some of the issues in that list cannot be addressed via the translator (ie commenting and variable names), but other things like Tabbing, math operations, and maybe even conditional expressions.
Report Abuse
NecroBumpist is not online. NecroBumpist
Joined: 12 Sep 2010
Total Posts: 4198
26 Jul 2011 04:33 PM
@jode,
The process of coding it will be difficult to explain (the whole tokenizing and lexing deal is complex, but I've been working at it for hours now), so first I'd like to create the standard, and then begin a collaborative codding effort.

@pokelover,
While I think variable names should be relevant, I don't think we'll put a restriction on their capitalization conventions.

Okay, I'm still debating whether we should do this on the forums, or in a typewith.me channel. Once I've decided, we can begin discussion.
Report Abuse
NecroBumpist is not online. NecroBumpist
Joined: 12 Sep 2010
Total Posts: 4198
26 Jul 2011 04:35 PM
Or additionally we could do this partially on the wiki.
Report Abuse
pokelover980 is not online. pokelover980
Joined: 12 Jun 2009
Total Posts: 4141
26 Jul 2011 04:40 PM
Once we're done with a nice draft we should put it on the Wiki, but until then I don't think it should go there. And typewith.me would probably be better than the forum, but that's just my opinion.
Report Abuse
Spectrumw is not online. Spectrumw
Joined: 04 Aug 2009
Total Posts: 13510
26 Jul 2011 04:42 PM
"Or additionally we could do this partially on the wiki."

;_; You just remind me that I didn't apply to be a wiki writter...
Report Abuse
NecroBumpist is not online. NecroBumpist
Joined: 12 Sep 2010
Total Posts: 4198
26 Jul 2011 04:43 PM
@Pokelover,
yeah, I think we should probably start there.

@Spectrumw,
There's always next time.
And by wiki I meant hosting the standard open to the public there.

Welp, I'm going to get started on a typewith.me channel, if you want the address, send me a PM.
Report Abuse
Reaven is not online. Reaven
Joined: 17 Jun 2008
Total Posts: 9181
26 Jul 2011 04:45 PM
Forum=floodcheck.

Chats=instant.
Report Abuse
Varp is not online. Varp
Joined: 18 Nov 2009
Total Posts: 5333
26 Jul 2011 05:06 PM
1 command per line. Indent properly. Break the rules when it's wise.
Report Abuse
Scriptars is not online. Scriptars
Joined: 30 Jun 2011
Total Posts: 76
26 Jul 2011 05:10 PM
[ Content Deleted ]
Report Abuse
Reaven is not online. Reaven
Joined: 17 Jun 2008
Total Posts: 9181
26 Jul 2011 05:13 PM
I actually find it easier to read my own code when it looks like i=1. I don't use extra carriage returns to add white space between lines. Spaces are where necessary for me.
Report Abuse
pokelover980 is not online. pokelover980
Joined: 12 Jun 2009
Total Posts: 4141
26 Jul 2011 05:16 PM
More people join us, it's kinda lonely with just me and Necro :v
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