Skip to content

Commit

Permalink
Remove prolog samples for now and rely on .prolog extension
Browse files Browse the repository at this point in the history
  • Loading branch information
tnm committed Dec 23, 2013
1 parent c5e9023 commit f6034b8
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 495 deletions.
68 changes: 0 additions & 68 deletions samples/Prolog/calc.pl

This file was deleted.

94 changes: 0 additions & 94 deletions samples/Prolog/normal_form.pl

This file was deleted.

19 comments on commit f6034b8

@pmoura
Copy link
Contributor

@pmoura pmoura commented on f6034b8 Dec 29, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pmoura
Copy link
Contributor

@pmoura pmoura commented on f6034b8 Dec 30, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing these samples, effectively removes the support for disambiguate .pl files, resulting in all Prolog code being misclassified as Perl code. Linguist cannot rely on an extension, .prolog, that no one uses. Nor linguist/GitHub gets to dictate to a programming language community what's their primary extension. Prolog was using .pl as the de facto extension 15 years before Perl appeared. If there are issues disambiguating Prolog code, these need to be solved by improving the disambiguation process, possibly adding more code samples, not by eliminating them.

@z5h
Copy link

@z5h z5h commented on f6034b8 Jan 17, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. Put the samples back.

@nox
Copy link
Contributor

@nox nox commented on f6034b8 Mar 31, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get a technical explanation about why these samples were removed?

@luxe
Copy link

@luxe luxe commented on f6034b8 Apr 16, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. Put the samples back.

@nox
Copy link
Contributor

@nox nox commented on f6034b8 Apr 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ping?

@luxe
Copy link

@luxe luxe commented on f6034b8 Apr 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nox ping?

@nox
Copy link
Contributor

@nox nox commented on f6034b8 Apr 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luxe Hopefully someone is receiving a mail when we comment. Hence the ping.

@luxe
Copy link

@luxe luxe commented on f6034b8 Apr 18, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++inbox;

@bkeepers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. I'm looking into it, but it'll probably be sometime next week before any progress is made.

@pmoura
Copy link
Contributor

@pmoura pmoura commented on f6034b8 Apr 21, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Complains about linguist misclassifying files are (relatively) common. This thread is just an example. A simple solution would be to allow linguist guesses to be overridden by the contents of a file (say, .github_file_extensions_map) at the root of a repository. This file would provide a mapping between file name extensions and programming languages. This way, any repository owners could fix these issues by themselves with linguist providing the default mappings. As a bonus, programming language statistics would become more reliable. I'm no Ruby programmer so I cannot easily contribute such a feature but I would expect it to be simple to implement.

@bkeepers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, see #777. I am definitely interested in that solution.

@pmoura
Copy link
Contributor

@pmoura pmoura commented on f6034b8 Apr 21, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding of #777 is that it covers only ignoring only directories or files. A good idea but I think that's orthogonal to my proposal and the two feature should not be mixed. E.g. my logtalk3 repository doesn't contain any Perl code but a number of Prolog files. Simply being able to say that, for this repository, that .pl means Prolog it would allow it to be correctly classified. For that, and for most cases, a file at the root of the repository that would be read by linguist would be enough.

@sebgod
Copy link
Contributor

@sebgod sebgod commented on f6034b8 Apr 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bkeepers , @pmoura , I could imagine a .language.yml file, which contains both contains custom "vendor" directories and a simple mapping from extension to the language name in github/linguist:
e.g.

vendor:
  - ^this_is_auto_generated_stuff/

mapping:
 .pl: Prolog

PS: Some work has been done in: #1023

@bkeepers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sorry for my hastiness. #777 only describes half of the problem.

@nox
Copy link
Contributor

@nox nox commented on f6034b8 Apr 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't see an explanation about why the samples were removed in the first place.

@sebgod
Copy link
Contributor

@sebgod sebgod commented on f6034b8 Apr 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nox is right, @tnm did not bother to leave an explanation why he removed the Prolog samples. It does some a tad strange IMHO.

@DaCuteRaccoon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put the samples back! I have a 2,700 byte Prolog code and it thinks the whole thing is Perl.

@pmoura
Copy link
Contributor

@pmoura pmoura commented on f6034b8 Apr 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A solution is to add a .gitattributes file to root of your repo with contents like:

*.pl  linguist-language=Prolog
*.lgt diff=Prolog

Please sign in to comment.