Generally agreed file extension...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Generally agreed file extension...

zxq9-2
We have .erl, .hrl, .beam, .ez and .app file extensions in common use.

Is there any generally agreed upon file extension for files that contain data formatted for use by file:consult/2?

-Craig
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Generally agreed file extension...

zxq9-2
On 2017年09月02日 土曜日 16:18:45 zxq9 wrote:
> file:consult/2?

Er... file:consult/1

<Facepalm>

-Craig
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Generally agreed file extension...

Mikael Pettersson-5
In reply to this post by zxq9-2
zxq9 writes:
 > We have .erl, .hrl, .beam, .ez and .app file extensions in common use.
 >
 > Is there any generally agreed upon file extension for files that contain data formatted for use by file:consult/2?

We use ".eterm" for those.  I don't know how common that convention is.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Generally agreed file extension...

Fred Hebert-2
In reply to this post by zxq9-2
On 09/02, zxq9 wrote:
>We have .erl, .hrl, .beam, .ez and .app file extensions in common use.
>
>Is there any generally agreed upon file extension for files that contain data formatted for use by file:consult/2?
>

I've used filename.consult quite a few times. Otherwise, the .config
format for Erlang is close to that. In the most cases though, people
appear to use extensions that explain what the file contains and not its
format, oddly enough.

sys.config uses the format, although it asks for a full list of terms:

    [{App1, CfgList1,
     {App2, CfgList2,
     ...
     {AppN, CfgListN}].

the .app (and .app.src) files use the consult format as well, and so do
various ones like rebar.config, rebar.lock, relx.config, elvis.config,
common_test's .spec files, etc.

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Generally agreed file extension...

zxq9-2
On 2017年09月02日 土曜日 08:28:28 you wrote:

> On 09/02, zxq9 wrote:
> >We have .erl, .hrl, .beam, .ez and .app file extensions in common use.
> >
> >Is there any generally agreed upon file extension for files that contain data formatted for use by file:consult/2?
> >
>
> I've used filename.consult quite a few times. Otherwise, the .config
> format for Erlang is close to that. In the most cases though, people
> appear to use extensions that explain what the file contains and not its
> format, oddly enough.
>
> sys.config uses the format, although it asks for a full list of terms:
>
>     [{App1, CfgList1,
>      {App2, CfgList2,
>      ...
>      {AppN, CfgListN}].
>
> the .app (and .app.src) files use the consult format as well, and so do
> various ones like rebar.config, rebar.lock, relx.config, elvis.config,
> common_test's .spec files, etc.

In the past I've also often used the extension to name what type of thing
it is instead of the format. Was wondering if there was a standardish way
but its not a big deal.

Some interesting suggestions were Mikael Pettersson's suggestion of using
.eterm as universal extension and in #erlang illo suggested following the
convention of .erl and .hrl files would yield .trl

Any preference among folks on the ML? (Other than the useful tradition of
using the extension as a label of what the file is instead of the format)

-Craig
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions