linguist icon indicating copy to clipboard operation
linguist copied to clipboard

Add language: ISPC

Open cwfitzgerald opened this issue 3 years ago • 8 comments

Preliminary Steps

Please confirm you have...

Problem Description

ISPC (Intel SPMD Program Compiler) is a language designed for writing SIMD optimized programs. It is seeing more and more adoption in the game industry and I'm kind of surprised it isn't already detected.

Ispc uses two file extensions: .ispc for source files and .isph for headers.

URL of the affected repository:

https://github.com/BinomialLLC/bc7e
https://github.com/GameTechDev/ISPCTextureCompressor

There are many others: https://github.com/search?q=.ispc&type=code

Last modified on:

2020-10-11

Expected language:

ISPC

Detected language:

None

cwfitzgerald avatar Oct 11 '20 05:10 cwfitzgerald

I'm kind of surprised it isn't already detected.

That'll be because no one has submitted a PR to add support 😉 . If the usage of either or both extensions meets our inclusion requirements detailed in the CONTRIBUTING.md file, please feel free to submit a PR to add support.

lildude avatar Oct 12 '20 08:10 lildude

Sounds good :). My main question would be what to do about the grammar. I don't know of a easy to set up grammar for the language (nor really have the energy to make one), but at the same time it's a C derivative, so C grammars work okay for highlighting it.

cwfitzgerald avatar Oct 13 '20 12:10 cwfitzgerald

Peeps normally use the same grammar they use in Textmate, Atom or VSCode. They're all compatible with Linguist, so if you use any of those editors, you could use the same grammar in Linguist. You could also use the C grammar if you think it'll suffice.

lildude avatar Oct 13 '20 12:10 lildude

Aha, thank you! It appears it does have a VSCode plugin, which is compatibly licensed, just need to find its source and use that grammar.

cwfitzgerald avatar Oct 13 '20 12:10 cwfitzgerald

Pending popularity: https://github.com/github/linguist/pull/5191#issuecomment-775813662

Nixinova avatar Feb 11 '21 00:02 Nixinova

https://github.com/github-linguist/linguist/pull/5191#issuecomment-2017684553

Asking for reconsideration now that DreamWorks Moonray is now open source, and there are many files in Unreal Engine 5.

pbrubaker avatar Mar 25 '24 10:03 pbrubaker

Hey @lildude. I am not able to get all the stats you posted in the closed issue. so I would appreciate your help checking the current stats.

Are you able to include private repos like Unreal? As the evangelist for this at Intel, I know there's way more usage out there than is represented in the stats for public repos.

We have TreeSitter and TextMate grammars we can share that we use in the vscode extension.

pbrubaker avatar Mar 25 '24 23:03 pbrubaker

I am not able to get all the stats you posted in the closed issue. so I would appreciate your help checking the current stats.

I can't get them anymore because of the changes to the Search API which in turn has resulted in https://github.com/github-linguist/linguist/issues/5756 which details how I assess popularity.

Are you able to include private repos like Unreal?

No. Everything about private repos is, erm, private, including the language stats.

We have TreeSitter and TextMate grammars we can share that we use in the vscode extension.

Linguist only accepts TextMate-compatible grammars for feeding into the highlighting engine with is slowly moving to tree-sitter grammars, but there's currently no way of submitting these. The maintainers of the engine are switching grammars as they assess them, and based on the fact linguist knows about the language.

Feel free to submit a new PR and I'll take a quick Look at popularity then. I aim to make a new release approximately quarterly to ensure the next Enterprise Server release goes out with the latest languages etc. This has just happened to the next release won't be for a few months.

lildude avatar Mar 26 '24 08:03 lildude