www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - We forgot to define a MIME-type for D!

reply Marco Leise <Marco.Leise gmx.de> writes:
Oh noes...
Now Mono-Develop used text/x-d and Pygments uses text/x-dsrc.

-- 
Marco
Feb 10 2013
next sibling parent reply "alex" <info alexanderbothe.com> writes:
On Sunday, 10 February 2013 at 17:15:40 UTC, Marco Leise wrote:
 Oh noes...
 Now Mono-Develop used text/x-d and Pygments uses text/x-dsrc.

Yep, I chose text/x-d mainly because the type for c#-files had been text/x-sharp, and since there probably is no other program that uses .d or .di files, I kept that one :) - But yeah, define one and I'll take it over! Isn't there a bigger registration process required in terms of ISO or such?
Feb 10 2013
next sibling parent reply 1100110 <0b1100110 gmail.com> writes:
On 02/10/2013 11:22 AM, alex wrote:
 Yep, I chose text/x-d mainly because the type for c#-files had been
 text/x-sharp, and since there probably is no other program that uses .d
 or .di files, I kept that one :)

I have no idea what that is though.
Feb 10 2013
parent reply Jacob Carlborg <doob me.com> writes:
On 2013-02-10 18:43, 1100110 wrote:

 vim occasionally thinks .d files are 'dtrace' files.

 I have no idea what that is though.

It can be used for debugging, tracking system calls and similar. -- /Jacob Carlborg
Feb 10 2013
parent 1100110 <0b1100110 gmail.com> writes:
On 02/10/2013 12:59 PM, Marco Leise wrote:
 Am Sun, 10 Feb 2013 19:47:31 +0100
 schrieb Andrej Mitrovic<andrej.mitrovich gmail.com>:

 On 2/10/13, alex<info alexanderbothe.com>  wrote:
 So, which mime is there (left) to take?

dlang? x-dlang? or something like that.

For C it is actually text/x-c on Linux, so it is tempting to use text/x-d. But since D isn't the god language that C is to Unix, and there was already another D language, I'd vote for x-dlang. 1100110, does vim tell you the MIME type it thinks dtrace files have? If it is text/x-d, it would void this option anyway.

I don't know, I opened the file out of curiosity. I don't even know how to get vim to show MIME rather than filetype.
Feb 10 2013
prev sibling next sibling parent Jacob Carlborg <doob me.com> writes:
On 2013-02-10 18:22, alex wrote:

 Yep, I chose text/x-d mainly because the type for c#-files had been
 text/x-sharp, and since there probably is no other program that uses .d
 or .di files, I kept that one :) - But yeah, define one and I'll take it
 over!
 Isn't there a bigger registration process required in terms of ISO or such?

DTrace uses .d files. "Tracing programs (also referred to as scripts) are written using the D programming language (not to be confused with other programming languages named "D")" http://en.wikipedia.org/wiki/DTrace -- /Jacob Carlborg
Feb 10 2013
prev sibling next sibling parent =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
On 02/10/2013 09:24 AM, alex wrote:
 text/x-csharp


The forum interface makes it look like something else but these are "newsgroups" which by definition uses the NNTP protocol. As far as I know, NNTP does not have a way of editing. Even if it had, the clients could be configured to ignore the edit requests. Ali
Feb 10 2013
prev sibling parent Stewart Gordon <smjg_1998 yahoo.com> writes:
On 10/02/2013 21:01, Nick Sabalausky wrote:
 On Sun, 10 Feb 2013 18:22:56 +0100
 "alex" <info alexanderbothe.com> wrote:
 Isn't there a bigger registration process required in terms of
 ISO or such?

Not for the stuff that starts with "x-" (much like http headers).

But still, we probably should aim in the longer term to get a MIME type actually registered. Stewart.
Feb 11 2013
prev sibling next sibling parent "alex" <info alexanderbothe.com> writes:
 text/x-csharp

Feb 10 2013
prev sibling next sibling parent "alex" <info alexanderbothe.com> writes:
On Sunday, 10 February 2013 at 17:47:54 UTC, Jacob Carlborg wrote:
 On 2013-02-10 18:43, 1100110 wrote:

 vim occasionally thinks .d files are 'dtrace' files.

 I have no idea what that is though.

It can be used for debugging, tracking system calls and similar.

So, which mime is there (left) to take? And how does one occupy a mime type? Is there legal registration stuff to do, as I asked before? Anyone who knows..ah ok I'll google this.. :)
Feb 10 2013
prev sibling next sibling parent Johannes Pfau <nospam example.com> writes:
Am Sun, 10 Feb 2013 18:57:12 +0100
schrieb "alex" <info alexanderbothe.com>:

 On Sunday, 10 February 2013 at 17:47:54 UTC, Jacob Carlborg wrote:
 On 2013-02-10 18:43, 1100110 wrote:

 vim occasionally thinks .d files are 'dtrace' files.

 I have no idea what that is though.

It can be used for debugging, tracking system calls and similar.

So, which mime is there (left) to take? And how does one occupy a mime type?

http://www.iana.org/cgi-bin/mediatypes.pl If you want it to be implemented on linux, probably ask on a FreeDesktop mailing list, freedesktop.org maintains the linux mime database.
Feb 10 2013
prev sibling next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 2/10/13, alex <info alexanderbothe.com> wrote:
 So, which mime is there (left) to take?

dlang? x-dlang? or something like that.
Feb 10 2013
prev sibling next sibling parent Marco Leise <Marco.Leise gmx.de> writes:
Am Sun, 10 Feb 2013 19:47:31 +0100
schrieb Andrej Mitrovic <andrej.mitrovich gmail.com>:

 On 2/10/13, alex <info alexanderbothe.com> wrote:
 So, which mime is there (left) to take?

dlang? x-dlang? or something like that.

For C it is actually text/x-c on Linux, so it is tempting to use text/x-d. But since D isn't the god language that C is to Unix, and there was already another D language, I'd vote for x-dlang. 1100110, does vim tell you the MIME type it thinks dtrace files have? If it is text/x-d, it would void this option anyway. -- Marco
Feb 10 2013
prev sibling next sibling parent "Brian Schott" <briancschott gmail.com> writes:
On Sunday, 10 February 2013 at 18:43:58 UTC, Johannes Pfau wrote:
 If you want it to be implemented on linux, probably ask on a
 FreeDesktop mailing list, freedesktop.org maintains the linux 
 mime
 database.

On my system (Fedora 18) there's /usr/share/mime/text/x-dsrc.xml that contains these lines: <sub-class-of type="text/x-csrc"/> <glob pattern="*.d"/> Given that this was installed by default, it seems that someone already made a decision on this.
Feb 10 2013
prev sibling next sibling parent Marco Leise <Marco.Leise gmx.de> writes:
Am Sun, 10 Feb 2013 20:00:44 +0100
schrieb "Brian Schott" <briancschott gmail.com>:

 On Sunday, 10 February 2013 at 18:43:58 UTC, Johannes Pfau wrote:
 If you want it to be implemented on linux, probably ask on a
 FreeDesktop mailing list, freedesktop.org maintains the linux 
 mime
 database.

On my system (Fedora 18) there's /usr/share/mime/text/x-dsrc.xml that contains these lines: <sub-class-of type="text/x-csrc"/> <glob pattern="*.d"/> Given that this was installed by default, it seems that someone already made a decision on this.

Oh I see it now, I just have to run update-mime-database again. Alright then, I'll ask them to add *.di and we are set. -- Marco
Feb 10 2013
prev sibling next sibling parent Marco Leise <Marco.Leise gmx.de> writes:
Am Sun, 10 Feb 2013 20:18:27 +0100
schrieb Marco Leise <Marco.Leise gmx.de>:

 Alright then, I'll ask them to add *.di and we are set.

https://bugs.freedesktop.org/show_bug.cgi?id=60605 -- Marco
Feb 10 2013
prev sibling parent Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Sun, 10 Feb 2013 18:22:56 +0100
"alex" <info alexanderbothe.com> wrote:
 Isn't there a bigger registration process required in terms of 
 ISO or such?

Not for the stuff that starts with "x-" (much like http headers).
Feb 10 2013