News for hackers. Stuff that matters.
Re:RFC 9512: YAML Media Type by noirscape on Wednesday February 21, 2024 @11:02AM (#39455466)
> .yaml is the preferred extension, .yml is dated

Is this really true? Basically every project I've ever cloned or set up that relied on YAML still uses .yml as the extension.

Re:RFC 9512: YAML Media Type by WorldMaker on Wednesday February 21, 2024 @11:19AM (#39455721)
I've always used .yaml and have never understood why someone would choose .yml. Three letter extensions haven't been a requirement since like DOS 5 and I can't imagine that many developers are both using YAML and still using FAT16 but can't afford VFAT long filename entries.
Re:RFC 9512: YAML Media Type by cesarb on Wednesday February 21, 2024 @01:00PM (#39457180)
> I've always used .yaml and have never understood why someone would choose .yml.

Because it's what the documentation says. For instance, the "Getting Started" example at https://docs.flatpak.org/en/latest/first-build.html says "call it org.flatpak.Hello.yml" - and that's Flatpak, which has always been a Unix-specific thing.

Re:RFC 9512: YAML Media Type by o11c on Wednesday February 21, 2024 @01:13PM (#39457332)
.yml is similar to .xml
Re:RFC 9512: YAML Media Type by deathanatos on Wednesday February 21, 2024 @03:24PM (#39459005)
… but YAML ain't a markup language.

(That's the 'A', in YAML, literally.)

Re:RFC 9512: YAML Media Type by BerislavLopac on Wednesday February 21, 2024 @03:53PM (#39459390)
That's a backronym; originally it meant "yet another".
Re:RFC 9512: YAML Media Type by deathanatos on Wednesday February 21, 2024 @09:28PM (#39462426)
The current acronym is old enough to drink. The original acronym, AFAICT looking through The Wayback Machine, lasted less than a year. (The original language was pretty wildly different, and much closer to a markup language.)

For those that don't want to wait for the time capsule, here is the earliest example of it (I've shortened it from the original for brevity; best I can gather this should also have been valid):

  <timesheet.clarkevans.com:record>
    <person:record>
      <id:int>
        293945</id:int>
      <name:record>
        <given>
          Clark</given>
        <family>
          Evans</family></name:record></person:record>
  </timesheet.clarkevans.com:record>
You can feel the XML influence.

Oddly it kept the "Another" well into the evolution of not being a markup language anymore, but on the grand scale of things, didn't really keep it that long.

Re:RFC 9512: YAML Media Type by arp242 on Wednesday February 21, 2024 @01:55PM (#39457904)
Old DOS "8.3" restri~1 are still followed by some people. Force of habit I suppose? Also the docume~1 or examples of some projects use .yml and I can't be bothered to experi~1 if both work, because it doesn't really matter.
Re:RFC 9512: YAML Media Type by quectophoton on Wednesday February 21, 2024 @03:40PM (#39459209)
> have never understood why someone would choose .yml

Probably for the same reason people don't type other 4-letter extensions, like `.ruby` or `.rust`.

I guess `.java` is the exception (no pun intended).

Re:RFC 9512: YAML Media Type by richm31415 on Wednesday February 21, 2024 @11:50AM (#39456159)
Ansible generally prefers .yml - https://github.com/redhat-cop/automation-good-practices/tree... "When naming files, use the .yml extension and not .yaml. .yml is what ansible-galaxy init does when creating a new role template."
Re:RFC 9512: YAML Media Type by bewuethr on Wednesday February 21, 2024 @12:13PM (#39456541)
It's what the YAML FAQ say: https://yaml.org/faq.html
Re:RFC 9512: YAML Media Type by electroly on Wednesday February 21, 2024 @11:37AM (#39455997)
I'd just be glad for the community to standardize on one or the other. I don't care either way but right now we sometimes have both .yml and .yaml in the same directory! For GitHub Actions (the only place where I use yaml) there doesn't seem to be a clear consensus yet.
Re:RFC 9512: YAML Media Type by numbsafari on Wednesday February 21, 2024 @02:11PM (#39458118)
Well, now there’s an RFC to refer to, and it makes a clear choice: .yaml.
Re:RFC 9512: YAML Media Type by electroly on Friday February 23, 2024 @10:02AM (#39481355)
The two replies I received--one saying .yml is the GitHub standard, and the other saying .yaml is the RFC standard--neatly summarizes the situation we're in. I don't think this extension mess is ever getting fixed.
Re:RFC 9512: YAML Media Type by paulddraper on Wednesday February 21, 2024 @05:34PM (#39460564)
GitHub Actions uses .yml in examples. [1]

Thought it supports both equally.

[1] https://docs.github.com/en/actions/quickstart

Re:RFC 9512: YAML Media Type by deathanatos on Wednesday February 21, 2024 @11:11AM (#39455621)
I mean … probably depends on local preferences. Every project I've ever worked on used .yaml.

.yml feels like .htm to me. DOS is long since gone.

But, Github seems to think they're about the same, with a lead for .yml: 23.9M hits for .yml, 17.8M for .yaml.

Re:RFC 9512: YAML Media Type by gweinberg on Wednesday February 21, 2024 @12:36PM (#39456859)
Wouldn't the analog of .htm be .yam?
Re:RFC 9512: YAML Media Type by BandButcher on Wednesday February 21, 2024 @11:51AM (#39456182)
I cringe at .htm
Re:RFC 9512: YAML Media Type by milliams on Wednesday February 21, 2024 @11:09AM (#39455580)
I assume that it's because people are still struggling to move away from 8.3 filenames (https://en.wikipedia.org/wiki/8.3_filename).
Re:RFC 9512: YAML Media Type by paulddraper on Wednesday February 21, 2024 @05:32PM (#39460547)
While I personally prefer .yml (shorter is better), yeah .yaml is the standard convention.