Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

“Source files generally use the standard .pm extension, and scripts or executables use .pl.” #778

Closed
AlexDaniel opened this issue Jul 30, 2016 · 15 comments
Labels
docs Documentation issue (primary issue type) good first issue If you want to dive in, this would be a good place to start

Comments

@AlexDaniel
Copy link
Member

From modules#Basic_Structure:

Source files generally use the standard .pm extension, and scripts or executables use .pl. However, if you wish to highlight that the file is written in Perl 6 you can use the .pm6 extension for modules, and the .p6 extension for scripts. Test files still use the normal .t extension.

This is no longer true. Or so it seems. Here are some stats from the whole ecosystem:

$ files=(**/*.pm6); echo "${#files[@]}"
1907
$ files=(**/*.pm); echo "${#files[@]}"
1248
$ files=(**/*.pl6); echo "${#files[@]}"
143
$ files=(**/*.pl); echo "${#files[@]}"
110
$ files=(**/*.p6); echo "${#files[@]}"
193
@AlexDaniel AlexDaniel added the docs Documentation issue (primary issue type) label Jul 30, 2016
@gfldex
Copy link
Contributor

gfldex commented Jul 31, 2016

On windows the shebang is ignored and there is no magic file. The only thing that counts when it comes to decide to call perl.exe or perl6.exe is the file ending. If we want to support windows, we have to use .p6. Modules are not a big issue but for sake of consistency we should make a difference too.

@molecules
Copy link
Contributor

molecules commented Aug 2, 2016

In agreement with gfldex, let's recommend "p6" to avoid confusion with the sister language Perl 5.

Edit (after coke's comment below): "pl6" would also work. I like "p6" better because it is the same amount of typing as "pl" yet it is distinctive from it. However, "pl6" is three characters, which would much more likely avoid namespace collisions with other "p" things. But I'll support either one.

@coke
Copy link
Collaborator

coke commented Aug 2, 2016

+1 gfldex's comment to recommend .p6, or this one to recommend .pl6

@jonathanstowe
Copy link
Contributor

As a matter of interest does the windows rakudo installer have the facility to create the association? Or alternatively is there something in the ecosystem that would allow for the creation of the association which could be used by module installers? If not then either the details of how to do this should be documented somewhere, or all of this is somewhat academic.

@coke
Copy link
Collaborator

coke commented Nov 15, 2016

Updated the doc text to also reference .pl6 and windows compatibility, and opened a ticket on the star project to track the installer issue.

@coke coke closed this as completed in cf8bf43 Nov 15, 2016
@AlexDaniel
Copy link
Member Author

AlexDaniel commented Jan 8, 2017

The doc still says “Source files generally use the standard .pm extension, and scripts or
executables use .pl.”, it has to be changed to .pm6 and .p6. Because that's what most use, generally.

@AlexDaniel AlexDaniel reopened this Jan 8, 2017
@AlexDaniel
Copy link
Member Author

And the hidden message of whole paragraph is that Perl 6 is the next version of Perl 5, and not a completely new language which is what we were trying to push so much lately.

“However, if you wish to highlight that the file is written in Perl 6 you can use the .pm6”, well, then what .pl extension is for? To suggest that it is “perl” and bring even more confusion to the whole perl5/perl6 problem? Please let's fix this…

@Altai-man
Copy link
Member

@AlexDaniel, if the paragraph is wrong, why can't we change it to just some nice and clean "The extension of X is Y, etc"? Seems like a LHF.

@AlexDaniel
Copy link
Member Author

@Altai-man yea, it's not too hard for sure.

@AlexDaniel AlexDaniel added the LHF label Mar 31, 2017
@coke
Copy link
Collaborator

coke commented Jun 14, 2017

Given the discussion, removing the LHF tag. I think this is more of a "what is the right answer" than "make this simple subst."

@coke coke removed the LHF label Jun 14, 2017
@AlexDaniel
Copy link
Member Author

This question seems to be settled now. See https://irclog.perlgeek.de/perl6/2017-12-03#i_15525555

Basically, even though the docs suggest (“Source files generally use the standard .pm extension, and scripts or executables use .pl”) other extensions, .p6 and .pm6 are winning:

<moritz> data from perl6-all-modules: .p6 346 vs .pl 198 vs .pl6 310
<moritz> pm6 2861 vs pm 1488

So at this point it is a simple subst.

@AlexDaniel AlexDaniel added the LHF label Dec 3, 2017
@pprince
Copy link

pprince commented Dec 3, 2017

+1 vote for recommending ".p6" and ".pm6" in docs, and removing references to ".pl" and ".pm".

It probably makes sense, though, for the Windows installer to associate both ".p6" and ".pl6" to Rakudo, yeah?

@AlexDaniel
Copy link
Member Author

Yeah.

@JJ
Copy link
Contributor

JJ commented Dec 3, 2017 via email

@jnthn
Copy link
Contributor

jnthn commented Dec 3, 2017

Agree on recommending ".p6" and ".pm6" too.

zoffixznet added a commit that referenced this issue Mar 2, 2018
Per #778 (comment)

Fixes #1807
(the issue mentions codifying the standard extensions, which is already
done in the "Basic Structure" section).
AlexDaniel added a commit to rakudo/rakudo that referenced this issue Mar 2, 2018
We should be careful when changing names of these tools because there
might be some automation that depends on them, but in this case it's
probably only my own automation that matters, so I'll take the hit.

Consensus for .p6 was reached in Raku/doc#778.
AlexDaniel added a commit that referenced this issue Mar 2, 2018
Let's see if anything breaks when we do this.

Similarly to rakudo/rakudo@98e575d

See #778 for more info.
@coke coke added good first issue If you want to dive in, this would be a good place to start and removed LHF labels Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation issue (primary issue type) good first issue If you want to dive in, this would be a good place to start
Projects
None yet
Development

No branches or pull requests

9 participants