oeed / CraftOS-Standards

Community standard file formats, communication systems, etc. for ComputerCraft and CraftOS 2.0
Other
20 stars 16 forks source link

Serialized Lua Table Format #18

Open oeed opened 8 years ago

oeed commented 8 years ago

Whilst this is a fairly well known format it is still important that these details are standardised.

The format must be readable using textutils.unserialise or running the file, but it doesn't necessarily have to be made using textutils.serialise (i.e. you can strip the spacing, new lines, etc.)

These details are open for suggestion.

Extensions: .tbl MIME: text/table

viluon commented 8 years ago

I would use text/lua-table or application/lua-table. We aren't dealing with furniture. Plus, the *.ltbl extension should be added to the list imo.

oeed commented 8 years ago

I'm cool with application/lua-table, although I'm not overly keen with .ltbl quite yet.

lyqyd commented 8 years ago

This would be why I'd suggest using lua/data.

oeed commented 8 years ago

I'd agree with @lyqyd re lua/data.

How about just .data for the extension too?

ghost commented 8 years ago

"data" doesn't seem nearly specific enough.

I think text/lua-table is pretty good. And then for an extension, it seems fairly obvious to be, but .table or .tbl seems like a good extension.

oeed commented 8 years ago

As mentioned by Lyqyd in #18, I think Lua/data or /table would be best. I'd also agree with .table

ghost commented 8 years ago

Lua/table with .table extension.

That seems like it would work quite nicely actually. :+1:

viluon commented 8 years ago

I'd go with both *.tbl and *.table. Lua/table is a good idea :+1:

oeed commented 8 years ago

I'm not so sure that we should be recommending two extensions for a newly proposed format. We're not using Windows 3.1 anymore :wink:

viluon commented 8 years ago

I don't see why not, many real life standards use multiple extensions, JPEG is a good example, with .jpg, .jpeg, .jpe .jif, .jfif, .jfi as extensions.

(Also, SVG allows .svg and .svgz, BMP .bmp, .dib)

oeed commented 8 years ago

Those extensions probably exist due to a lack of standardisation. Having more than one extension without it being nec cedar feels like something standardisation should be preventing.

viluon commented 8 years ago

Uh, you are right. However, I am generally against long (full name) extensions (such as .table) and rather for abbreviations such as *.tbl. Not sure why exactly, I just think that a full name is.. unnecessary long, but having it as an alternative seems good to me. Forget about that if you think that's not a good idea though, it's just my personal preference.

oeed commented 8 years ago

Yeah I get what you mean @viluon. I think that because people will probably have preferences about we should list both but recommend table.

@demhydraz I think using the Lua category works best for us. They don't need to be identical to real life.

viluon commented 8 years ago

recommend table

Recommend *.table @oeed? Why use the longer version? Text files have *.txt by default, not *.text. Extensions usually try to be as compact as possible. Since there's (imo) no other CC format that uses *.tbl or could be confused with *.tbl I would argue that this extension is the one to use. I'd allow *.table only as an alternative.

oeed commented 8 years ago

Fine, we'll only use tbl

ghost commented 8 years ago

Unless anyone has any better ideas, lua/table and the extension .tbl are pretty good. I'm gonna start using them in my projects :P so I vote we just make that the standard.

oeed commented 8 years ago

Okay done. I'll create a COS now.

viluon commented 8 years ago

Use "Closes #X" syntax to close an issue automagically after merging a PR.

oeed commented 8 years ago

@viluon the issue is solved though. If we keep the issues open people will assume that it hasn't been done yet and create duplicate PRs.

viluon commented 8 years ago

And we'll leave those duplicate PRs until one of them is merged. Then close the duplicates and the related issue. I think that's the way to go @oeed!