I had problems posting an answer as it was misidentified as code. When trying to post I received the following error message:
Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon.
I was able to get the site to accept my answer by removing most of the reference style links.
Here is the source I originally tried, which was rejected:
A far as I'm aware, there is no 'official' media type for brainfuck ([Official types listed here][mimetypes]). You are of course free to make up your own without officially registering the type, but you should take a few things into consideration before choosing what name to use. All the information you need is in [RFC2046][rfc2046]. I'll discuss the relevant parts below.
# Top Level Media Type
As far as I can see, the two options you might choose from are `text` and `application`:
## `text`
According to [Section 3][rfc2046-3]:
> The subtype "plain" in particular indicates plain text containing no formatting commands or directives of any sort. Plain text is intended to be displayed "as-is". No special software is required to get the full meaning of the text, aside from support for the indicated character set.
If you intend for the data to be displayed rather than interpreted by an application, I would use this.
[Section 4.1.4][rfc2046-4-1-4] mentions the following about unrecognised subtypes:
> Unrecognized subtypes of "text" should be treated as subtype "plain" as long as the MIME implementation knows how to handle the charset.
Setting your top level media type to text will ensure that compliant applications that do not recognise the full type will still render the data as text.
## `application`
If you intend your data to be interpreted or processed further, you should use the application top-level media type. As in the argument above, if you label your data as `application`, any programs that receive it are more likely to behave in a sensible fashion.
[Section 4.5.3][rfc2046-4-5-3] deals with unrecognised application types:
> It is expected that many other subtypes of "application" will be defined in the future. MIME implementations must at a minimum treat any unrecognized subtypes as being equivalent to "application/octet-stream".
Reading the appropriate section ([Section 4.5.1][rfc2046-4-5-1]) we find out how applications are supposed to handle octet streams:
> The recommended action for an implementation that receives an "application/octet-stream" entity is to simply offer to put the data in a file, with any Content-Transfer-Encoding undone, or perhaps to use it as input to a user-specified process.
If this seems like the most logical way to handle your data when it is unrecognised, then `application` is for you.
# Sub-type
Choosing the subtype is much easier. [Section 6][rfc2046-6] covers experimental media types:
> A media type value beginning with the characters "X-" is a private value, to be used by consenting systems by mutual agreement. Any format without a rigorous and public definition must be named with an "X-" prefix, and publicly specified values shall never begin with "X-".
So your subtype should be `X-brainfuck`.
# Summary
You have two options:
1. `text/X-brainfuck`
2. `application/X-brainfuck`
If you intend for applications to treat the data as plain text and display it, choose 1. If you intend the data to be interpreted or executed, choose 2. If you're unsure what you want to happen, choose 2, because the default expectation is that an application will prompt the user for what to do if it does not recognise the type.
[mimetypes]: http://www.iana.org/assignments/media-types/media-types.xhtml
[rfc2046]: http://tools.ietf.org/html/rfc2046
[rfc2046-3]: http://tools.ietf.org/html/rfc2046#section-3
[rfc2046-4-1-4]: http://tools.ietf.org/html/rfc2046#section-4.1.4
[rfc2046-4-5-3]: http://tools.ietf.org/html/rfc2046#section-4.5.3
[rfc2046-4-5-1]: http://tools.ietf.org/html/rfc2046#section-4.5.1
[rfc2046-6]: http://tools.ietf.org/html/rfc2046#section-6
Here is the source that was accepted:
A far as I'm aware, there is no 'official' media type for brainfuck ([Official types listed here](http://www.iana.org/assignments/media-types/media-types.xhtml)). You are of course free to make up your own without officially registering the type, but you should take a few things into consideration before choosing what name to use. All the information you need is in [RFC2046][rfc2046]. I'll discuss the relevant parts below.
# Top Level Media Type
As far as I can see, the two options you might choose from are `text` and `application`:
## `text`
According to [Section 3](http://tools.ietf.org/html/rfc2046#section-3)):
> The subtype "plain" in particular indicates plain text containing no formatting commands or directives of any sort. Plain text is intended to be displayed "as-is". No special software is required to get the full meaning of the text, aside from support for the indicated character set.
If you intend for the data to be displayed rather than interpreted by an application, I would use this.
[Section 4.1.4](http://tools.ietf.org/html/rfc2046#section-4.1.4) mentions the following about unrecognised subtypes:
> Unrecognized subtypes of "text" should be treated as subtype "plain" as long as the MIME implementation knows how to handle the charset.
Setting your top level media type to text will ensure that compliant applications that do not recognise the full type will still render the data as text.
## `application`
If you intend your data to be interpreted or processed further, you should use the application top-level media type. As in the argument above, if you label your data as `application`, any programs that receive it are more likely to behave in a sensible fashion.
[Section 4.5.3](http://tools.ietf.org/html/rfc2046#section-4.5.3) deals with unrecognised application types:
> It is expected that many other subtypes of "application" will be defined in the future. MIME implementations must at a minimum treat any unrecognized subtypes as being equivalent to "application/octet-stream".
Reading the appropriate section ([Section 4.5.1](http://tools.ietf.org/html/rfc2046#section-4.5.1)) we find out how applications are supposed to handle octet streams:
> The recommended action for an implementation that receives an "application/octet-stream" entity is to simply offer to put the data in a file, with any Content-Transfer-Encoding undone, or perhaps to use it as input to a user-specified process.
If this seems like the most logical way to handle your data when it is unrecognised, then `application` is for you.
# Sub-type
Choosing the subtype is much easier. [Section 6](http://tools.ietf.org/html/rfc2046#section-6) covers experimental media types:
> A media type value beginning with the characters "X-" is a private value, to be used by consenting systems by mutual agreement. Any format without a rigorous and public definition must be named with an "X-" prefix, and publicly specified values shall never begin with "X-".
So your subtype should be `X-brainfuck`.
# Summary
You have two options:
1. `text/X-brainfuck`
2. `application/X-brainfuck`
If you intend for applications to treat the data as plain text and display it, choose 1. If you intend the data to be interpreted or executed, choose 2. If you're unsure what you want to happen, choose 2, because the default expectation is that an application will prompt the user for what to do if it does not recognise the type.
[rfc2046]: http://tools.ietf.org/html/rfc2046
After posting, I tried editing the reference style links back in one at a time.
Extending the list of links with the following worked fine:
[rfc2046-3]: http://tools.ietf.org/html/rfc2046#section-3
This one did not work:
[rfc2046-4-1-4]: http://tools.ietf.org/html/rfc2046#section-4.1.4
I've tagged this both a bug
and a feature-request
because:
- My answer was misidentified as containing unformatted code when it did not.
- If false positives are inevitable, I'd like to request that the site still allow you to post after prompting you to check for unformatted code. Having the user tick a box to confirm they rechecked their post might be enough to still reduce missing code formatting.