github-linguist / linguist

Language Savant. If your repository's language is being reported incorrectly, send us a pull request!
MIT License
12.25k stars 4.23k forks source link

Differentiate Assembly Languages #2350

Closed phase closed 8 years ago

phase commented 9 years ago

Is there any way we could separate Assembly languages? Such as 6502 & x86?

pchaigno commented 9 years ago

Do they use different file extensions?

phase commented 9 years ago

No, but they have very different syntax.

pchaigno commented 9 years ago

Do you want to do this for the language statistics or to fix a highlighting issue somewhere?

phase commented 9 years ago

Language statistics, such as the "bar" (is there a name for that?).

pchaigno commented 9 years ago

We sometimes call it the language bar.

But if we create two languages for 6502 and x86, how would we classify the other assembly dialects?

phase commented 9 years ago

Can we put them all in an "Assembly" group? Like Perl6?

phase commented 9 years ago

List of Assembly languages I could find:

larsbrinkhoff commented 9 years ago

So many CPUs, so little time...

larsbrinkhoff commented 9 years ago

Also, "GAS" is a bit of a misnomer for .s. But language names can never ever be changed, right?

pchaigno commented 9 years ago

Can we put them all in an "Assembly" group? Like Perl6?

All languages of a group will be counted in the statistics as the parent language. So the different Assembly dialects would be counted as Assembly :/ Perl6 isn't in a Perl group because it's very different from Perl 5.

I don't think it would be a good idea to create a new language per Assembly dialect. Maybe there is a better approach...?

larsbrinkhoff commented 9 years ago

By the way, I have some other improvements for the Assembly language: https://github.com/github/linguist/compare/master...larsbrinkhoff:asm

pchaigno commented 9 years ago

@larsbrinkhoff You forgot a k in your link ;)

larsbrinkhoff commented 9 years ago

Thanks; fixed.

pchaigno commented 9 years ago

@larsbrinkhoff I think you should open one pull request per commit (they look unrelated). Do we really need to use heuristics to distinguish Assembly from Unix Archive and Assembly from GAS? (it would probably be best to discuss that in a new thread though)

larsbrinkhoff commented 9 years ago

It's a work in progress. Will post a new PR when more polished.

phase commented 9 years ago

Is there a way we could separate them, but still keep them together? Like, if I had a project with x86 & 6502, we could have them be the same color on the bar (or not), but have the names show up as different.

pchaigno commented 9 years ago

Is there a way we could separate them, but still keep them together? Like, if I had a project with x86 & 6502, we could have them be the same color on the bar (or not), but have the names show up as different.

To have different names we need to be able to differentiate the languages. In order to do that we need to create new languages :/

arfon commented 8 years ago

Closing this as stale. We'd welcome Pull Requests adding support for new Assembly languages.