-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lua program format #39
base: master
Are you sure you want to change the base?
Conversation
What is the point in adding another extension? Since switching to this program "format" offers no benefits compared to just sticking with Also, programs can be represented in bytecode too. This standard however specifies
|
Yes @demhydraz, ELF is a very good example of a powerful program file format, which can be used for different (4) purposes. Although unlike ELF, a Lua program should rather use a single extension (looking at you, |
No, you should set up aliases for that @demhydraz. OpenComputers, for example, appends a |
@viluon did you not read the discussion in #18? I get what you mean about extensions being a pain (although to be honest, Dan, what the hell... add extension support for os.loadAPI already). The whole point of this is to give them separate MIMEs and to do that properly we really need to give them separate extensions. |
Thanks for your incredibly insightful contribution there. I don't agree that separate MIMEs require separate extensions, or even any extensions at all. The MIME type of a file is unrelated to what it is named, and I don't believe I've seen a metadata suggestion yet that would inextricably link the two. Yes, looking at extensions to tell what something is can be convenient, but it's not the only way to go. |
@lyqyd you're correct about no metadata standard yet, although the one I'm currently working on does do that. It clearly won't be popular though. Sure, when you save the file under a metadata system you'll be able to choose. But when it's not, other than using extensions what are the other ways to go? |
Also @viluon, |
What are you referring to, exactly @oeed?
I don't see
Ah, sorry for that. My thinking was that since the current form is not acceptable, I should label it as
|
Sorry, I saw '18 days ago' and wrote 18 instead of #26. I'm referring to this:
Essentially we need to split Lua file formats up.
This is for programs, APIs can be regarded as source code too (and arguable tables too). Hence, this is not for source code; there needs to be a distinction. Essentially, an executable.
Well, it potentially could be used by an API, a program or data. I think I'll leave this whole extensions issue on hold until I finish my metadata proposal where we can sort out the relationship between extensions and MIMEs.
I think this needs a discussion on Gitter. |
I'd be fine with changing the default extension to |
Exactly what I thought the best solution would be @lyqyd, 👍 ! |
Okay, so are we saying have a Lua source file and a Lua table format; so no distinction between API and programs? |
Pretty much, yeah. Standardizing APIs seems kind of pointless to me, and programs are really just source code. If they'd have more features than just storing plain text then why not, but since they don't, I'd just call them what they are. |
I think there's still value in making a distinction there. APIs often won't do anything except put functions into their environment table. Yes, they're both valid lua, but they are different things.
|
@lyqyd I do agree with you there, but your previous post seems to contradict this a little. Are you essentially saying there should be a |
Sorry for any confusion. For clarity, I would use I'm not sure that actually clarified anything, dammit. Let me know if I'm still being confusing. :) |
These are standards for use within the context of ComputerCraft. That MIME string is unnecessarily verbose, and we don't need to make things more difficult just to try to "comply" with external standards when doing so provides zero benefit. |
Okay, I think I understand what you're saying @lyqyd. I'll update the standards soon with those changes. @demhydraz, as Lyqyd said, this isn't the 'real world'. Additionally, as we technically are the standards organisation, |
I've assigned oeed 'cause he said he'd update the standards soon, but I don't see any new commits since then. :-) |
Yeah sorry, I haven't really had tons of time to do much CC related stuff. |
As discussed in #26 and #18, the Lua format is being split in to separate types.
There hasn't been much discussion of the extension for programs, so I've simply used
.prg
as it fits in with.tbl
and.api
. I've also said that.lua
defaults to a Lua program and shouldn't be used which I'm sure people will be opinionated about.Also see: #40 and #41.