Generally, YAML files should be referred to by extension ".yml" (instead of ".yaml", if they have one).
Currently, any remaining use of the extension ".yaml" seems (in my view) slightly silly.
Commonly, the letter X is used for a great variety of meanings including "cross", "extensible", "variable", etc. (e.g. in XML). On the other hand, Y (e.g. in YML or YAML) carries no such extra baggage.
Relatively speaking, Y's use is rather uncommon. The acronym YACC comes to mind (for "Yet another compiler compiler"—BTW, its extension is simply ".y" when generating C language files). Actually, YACC assists more than it conflicts, because historically (as you may know) YAML was an acronym for the similar phrase, "Yet another markup language".
Linguistically speaking, therefore, the acronym "XML" has (in a way) only two informative letters. By contrast, all three of the letters of "YML" are fully informative. Indeed, the existing set of acronyms beginning with Y seems extremely small.
Per Wikipedia's article on information theory, "Abstractly, information can be thought of as the resolution of uncertainty." By implication, this is why a four letter YAML file extension feels greatly overspecified.
For the sake of completeness (though less important), this Ansible project comment (regarding their choice of extension) exemplifies other motivations:
> Three letter extensions owe historical relevance from DOS.
> They also save typing.
But these last two aren't the important reasons—instead, see above.
This comment (from March, 2014 in the Symphony project) also seems relevant:
> Once you have two of the biggest industry players doing ".yml" as the extension, it is the standard.
Information from the YAML.org website dates the organization's most recent activity to 2009 (approximately). Evidence of this comes from:
1. > © 2001-2006 YAML.org All Rights Reserved
2. > [The latest] News:
> 20-NOV-2011 -- JS-YAML, a JavaScript YAML parser by Alexey Zapparov and Vitaly Puzrin.
3. > [The latest] YAML Resources:
> YAML 1.2 (3rd Edition): http://yaml.org/spec/1.2/spec.html
Their latest specification (1.2 above) is from 2009, presumably before much of YAML's worldwide adoption:
> YAML Ain’t Markup Language (YAML™) Version 1.2
> 3rd Edition, Patched at 2009-10-01
Even their latest news item, the above-referenced JS-YAML, uses BTW the extension '.yml":
> var doc = require('/home/ixti/example.yml');
Therefore the staleness of YAML.org's information should greatly lessen the impact today from the recommendation in their FAQ:
> Is there an official extension for YAML files?
> FAQ
> 1. Please use ".yaml" when possible.
Here is a URL for web-searching the usage of the two YAML data file extensions (.yml and .yaml). I found time-wasting discussions of which extension to use here, here and here. Apparently these discussions are a result of the official organization exerting its influence uphill, against prevailing practice.
Maybe the public should complain. Maybe YAML.org would listen!
Here are merely some (of the many existing) usage examples of the shorter extension ".yml" in common use:
Per http://php-mysql-mvc.gajdaw.pl/instalacja/download/DoctrineExport.grt.lua:
> -- NOTES:
> -- 1. The YAML file extension usually is ".yml"
Per http://wiki.catalystframework.org/wiki/howtos/forms/formfu.view:
> NOTES:
> If you want a YAML file extension of .yaml (instead of .yml), you have to configure that.
Per https://code.google.com/p/javabuilders/issues/detail?id=114:
> The default YAML for most projects seems to be .yml, instead of .yaml.
> In NetBeans in particular, the YAML wizard only allows creating a file with a .yml extension
Per http://docs.doctrine-project.org/en/latest/reference/yaml-mapping.html:
> All mapping documents should get the extension ”.dcm.yml” to identify it as a Doctrine mapping file.
> $driver->setFileExtension('.yml');
> The Symfony project sponsored a driver that simplifies usage of the YAML Driver. The changes between the original driver are:
> File Extension is .orm.yml
> Filenames are shortened, “MyProject\Entities\User” will become User.orm.yml
> $driver->setGlobalBasename('global'); // global.orm.yml
> As a quick start, here is a small example document that makes use of several common elements:
> # Doctrine.Tests.ORM.Mapping.User.dcm.yml
Per http://www.fileinfo.com/extension/yaml:
> NOTE: YAML files more often use the .YML extension.
Per https://github.com/jasedit/rypple/issues/3:
> Configuration files should end in .yml, not .yaml
> That's the standard file ending, and should be consistent with expectations.
Per https://drupal.org/node/1935708:
> Posted by cweagans on March 6, 2013
> .info files are now .info.yml files
The only counterexample I have found (using ".yaml") comes from cPanel (in their EasyApache interface, apparently a cPanel product). Generally, cPanel seems somewhat "stuffy" and old-fashioned (i.e., likely to prefer the recommendation of an official organization over common usage). Per cPanel's EasyApacheHowToMoveProfiles:
> Profile are located in the /var/cpanel/easy/apache/profile/custom directory. The filename will be identical to the name you save it with, plus the .yaml file extension.
EDIT: The above reference is from the Wayback machine. However, as of August, 2016, we can still see cPanel using only extension ".yaml".
Copyright (c) 2013 Mark D. Blackwell.
Monday, July 8, 2013
Wednesday, July 3, 2013
Use Ruby-like Mirah to develop for Android
I have minimal experience in Android development—I have set up its development environment and merely compiled something that another has written. I work mainly in Ruby on Rails.
However, for the intrinsic joy from developing something on an Android device, I'm particularly interested in the language Mirah created by Charles Oliver Nutter (the developer of JRuby). I keep Mirah in mind, for whenever it will become practicable to use in Android development.
Perhaps Mirah is ready now—a Google search shows plenty of people using Mirah on Android.
Back in 2011, Nutter wrote an article about Mirah in Dr. Dobb's Journal. To sum up, this is a Ruby-like language designed in such a way that, for any program feature (or user feature) a programmer desires to implement, she would create a new keyword or plugin for the language (somewhat directly in the compiler—this being Mirah's main point of departure) rather than add a new Java package. And, it compiles to the JVM.
Therefore in Mirah (unlike in JRuby-based approaches such as Ruboto) no program needs a package or library beyond what is already in standard Java and Android. Programs written in it are extremely tiny (due to running without huge, additional language libraries) and they load and run (both) extremely quickly on Android devices (with their Dalvik Java virtual machine).
To use Mirah to build an Android app, see the Pindah project.
In order for someone to use Mirah (essentially syntax sugar on top of Java) BTW not only should they be familiar with Ruby, but they must also know Java well.
There's more about Mirah here:
For Android development, other JVM languages, Scala, Clojure, etc., as well as Ruboto, are also interesting.
Various StackOverflow questions relate to Android development using Mirah, JRuby, Ruboto, etc.:
Copyright (c) 2013 Mark D. Blackwell.
However, for the intrinsic joy from developing something on an Android device, I'm particularly interested in the language Mirah created by Charles Oliver Nutter (the developer of JRuby). I keep Mirah in mind, for whenever it will become practicable to use in Android development.
Perhaps Mirah is ready now—a Google search shows plenty of people using Mirah on Android.
Back in 2011, Nutter wrote an article about Mirah in Dr. Dobb's Journal. To sum up, this is a Ruby-like language designed in such a way that, for any program feature (or user feature) a programmer desires to implement, she would create a new keyword or plugin for the language (somewhat directly in the compiler—this being Mirah's main point of departure) rather than add a new Java package. And, it compiles to the JVM.
Therefore in Mirah (unlike in JRuby-based approaches such as Ruboto) no program needs a package or library beyond what is already in standard Java and Android. Programs written in it are extremely tiny (due to running without huge, additional language libraries) and they load and run (both) extremely quickly on Android devices (with their Dalvik Java virtual machine).
To use Mirah to build an Android app, see the Pindah project.
In order for someone to use Mirah (essentially syntax sugar on top of Java) BTW not only should they be familiar with Ruby, but they must also know Java well.
There's more about Mirah here:
For Android development, other JVM languages, Scala, Clojure, etc., as well as Ruboto, are also interesting.
Various StackOverflow questions relate to Android development using Mirah, JRuby, Ruboto, etc.:
- include-ruboto-core-with-android-app-on-install
- using-mixed-java-ruby-code-in-an-android-app
- what-ruby-based-mobile-cross-platform-solution-to-use
- any-tutorial-like-articles-out-there-that-explain-how-to-use-jruby-on-android
- jvm-based-language-without-language-runtime
- ruby-on-android-ruboto-vs-rhodes
- ruby-practical-for-android-development
- sl4a-vs-ruboto-on-android-application-development
- best-way-to-set-up-an-android-emulator-on-linux-for-ruboto
Copyright (c) 2013 Mark D. Blackwell.
Subscribe to:
Posts (Atom)