github-linguist / linguist

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

PRU assembly misidentified as OpenEdge ABL #3330

Closed sv3 closed 7 years ago

sv3 commented 7 years ago

relevant files in my repo The same mis-identification occurs here (among other places)

The code is assembly for a TI PRU (Programmable Realtime Unit) TI PRU assembly reference

Alhadis commented 7 years ago

Hey @sv3,

You can add a .gitattributes file to your repository to correct the language classification:

*.p linguist-language=Assembly

EDIT: Updated in response to @scottmangiapane's answer below.

Alhadis commented 7 years ago

@scottmangiapane Do you know much about the .p file extension's usage in TI programs? Is it common enough to consider registering as a TI extension?

Or should this actually be regarded as a different language altogether? You said in #3258 that there were no "official" file extensions, but the ones listed in PRU's wiki sound fairly concrete:

Note that by default, only files with the extensions .pru, .hpru, or .pasm are treated as PASM syntax files (filetype=pru). Specify which files are members of that class. (*.p,*.hp,*.pdsp,*.pasm)

I'm starting to get the impression "PRU assembly" is different from "TI Program" assembly... could you elucidate?

scottmangiapane commented 7 years ago

Hey @Alhadis, unfortunately I have never heard of a '.p' extension in TI programs. There's three different kinds of Ti-84 languages: z80 assembly, Axe Parser, and TI-BASIC. TI-BASIC is always in the form '.8xp', Axe source code is '.8xp', and both Axe source and z80 source can be compiled into '.8xp' or '.8xk'. I've only written TI-BASIC and Axe though, so I'm not sure how the z80 assembly compiling process works or what the source files for it look like

But I did a quick Google search, and it looks like these are actually for a different device! "TI PRU (Programmable Realtime Unit)" looks more like a Raspberry Pi than a TI-84. Probably best to label them as "PRU assembly" in my opinion.

Alhadis commented 7 years ago

Alright, thanks!

@sv3 This sounds like it should be classified as assembly, so I've updated my original answer. If you feel PRU assembly is widespread enough to warrant differentiation, please don't hesitate to send us a pull request. You can find more information about adding a language here.

sv3 commented 7 years ago

That works for me! Thank you guys for your quick response.

Alhadis commented 7 years ago

No problem! :-) Glad to help!