CCSMB / Standards

Standard file formats, APIs, network protocols, and more for ComputerCraft
Other
8 stars 7 forks source link

CCSMB-4: Lua files #9

Closed tomodachi94 closed 1 year ago

tomodachi94 commented 1 year ago

Imported from oeed/CraftOS-Standards.

tomodachi94 commented 1 year ago

My bad, the button is being weird.

tomodachi94 commented 1 year ago

Make definition that this is exclusively lua text files, not bytecode

Fixed in 119213f.

MasonGulu commented 1 year ago

I personally don't think that just a filename extension should be a whole standard. Considering API design (using require over os.loadAPI) and coding practices (globals vs. locals) are hot topics of debate in the community, we should use this document to standardize some of those interfaces - the main one being to promote the use of require and modules that don't have side-effects. To avoid conflict, we should avoid personal style preference (tabs vs. spaces, 2 vs. 4 indentation width), but stuff that actually affects the computer, and readability of code, should be standardized.

I agree with this, it'd allow the standard to have more purpose than simply declaring a file extension. The original oeed standards did not do anything beyond specifying the filename.

Maybe create a list of bad practices these files should avoid, or better yet good practices the files should use.

My language abilities are lacking, and these are the only two things I can think of off the top of my head currently.

EmmaKnijn commented 1 year ago

Alright, a few things to note, how should we format the .md file itself (including the header), personally fixed linebreaks aren't preferred. I tried to push a first iteration of the code but I don't have permission, so I'll look into that.

EmmaKnijn commented 1 year ago

Was able to throw the changes into the ccsmb-4-additions branch, which is a bit messy bit gets the job done (I think haha)

tomodachi94 commented 1 year ago

Alright, I think I managed to do it the proper way

EDIT: Nevermind, I think we just gotta wait on @tomodachi94 for them to turn on the "allow edits from maintainers" option

Fixed, try pushing now.

EmmaKnijn commented 1 year ago

Thanks!

MCJack123 commented 1 year ago

I'm working on a pretty big formal standard to replace this one - please bear with me until I can finish it up.

tomodachi94 commented 1 year ago

Closing in favor of #16.