Closed kspalaiologos closed 6 years ago
Are there other languages that you know of using the .jsl
extension? Are there files in this search query that are not J#?
Yes, some kind of shader language. It's different from J# and is C-Like, while J# has syntax like C#+Java.
Then we'll first need to estimate the number of .jsl
files on Github for these two languages. Could you point me to a couple of these C-like files?
Every file inside https://github.com/ojdkbuild/upstream_openjfx is written in C-like shader language.
From my observatons, this files contain not-OO code, so I think it's possible to just search for C#+Java like only tokens.
If it's needed, I can hand some samples and release them to public domain
@KrzysztofSzewczyk Using the extension:jsl float4 OR param
search query and Harvester, I count only 48 repositories by 42 users. That's not enough to warrant support in Linguist, so we won't need to add this language.
For J#, Harvester finds 398 repositories by 366 in the 2156 files I downloaded from the extension:jsl class OR private OR public OR package
search query. That's enough to warrant support in Linguist. We'll gladly accept a pull request to add that language :smiley:
In which format should I provide grammar for language?
Linguist (and GitHub.com) support Sublime Text, Atom, or TextMate grammars.
Syntax is actually same as C# (some exceptions are present, tho), so where should I look for eg. C#/Java grammars?
Those we already use should be fine: https://github.com/github/linguist/tree/master/vendor.
I ran to some kind of strange problem:
$ script/add-grammar https://github.com/KrzysztofSzewczyk/JSharpSyntax.git
Command failed. Aborting.
Registering new submodule: vendor/grammars/JSharpSyntax
$ git submodule add -f https://github.com/KrzysztofSzewczyk/JSharpSyntax vendor/grammars/JSharpSyntax
> Cloning into 'C:/Users/PC/Desktop/linguist/vendor/grammars/JSharpSyntax'...
> fatal: clone of 'https://github.com/KrzysztofSzewczyk/JSharpSyntax' into submodule path 'C:/Users/PC/Desktop/linguist/vendor/grammars/JSharpSyntax' failed
Propably I'm missing something. When I'll remove ".git" it doesn't work too.
Do you really need to add a new grammar? If you're not going to change the syntax, couldn't you reuse the one we use for Java or for C#?
@pchaigno I can use C# grammar, but the syntax highlighting won't be 100% accurate. How do I reuse C# grammar?
I'm asking because it looked like you were simply reusing the Java grammar. To use any grammar already used by another language, you can just fill out tm_scope: scope_of_that_grammar
(e.g., tm_scope: source.java
) in your languages.yml
entry.
OK, I've done it. script/set-language-ids
fails somehow (I couldnt find any depedency-installing script).
The error is: "Could not find gem 'rake-compiler (~> 0.9) x64-mingw32' in any of the gem sources listed in your Gemfile. (Bundler::GemNotFound)"
I've already tried gem install rake-compiler
, without luck. I'm total newbie in Ruby, so please forgive me if it's stupid question.
@KrzysztofSzewczyk Did you make progress on this? I'm sorry I can't be of much help for the above problem, I've never installed Linguist on Windows.
I got a stuck there, couldn't find help from friends programming in Ruby, then I forgot about it. Now I have Linux machine so I'm going to test it out
I have problem with update-ids once again, it assigns some meaningless number to language...
That's how it's supposed to work. As long as it only adds an id to J#, it should be alright.
So it's OK then? I mean, other languages have "normal" id's
Not all of them. It's okay.
PR was made, so I'm closing issue as it's not needed currently.
Although J# is not-so-commonly used, it's still an language. A few repositories:
I couldn't find more because it's really hard.
Preliminary Steps
Please confirm you have...
Problem Description
URL of the affected repository:
As mentioned earlier, https://github.com/matt77hias/jsl-smallpt & https://github.com/ankurdave/htw-3d
Last modified on:
2017-24-24, 2016-3-14
Expected language:
J#
Detected language:
None & "logos"