New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rebol extension changes to languages.yml #1005
Conversation
Historically Rebol used the .r extension which unfortunately clashes with the R Stats programming language :( For example even the Rebol interpreter repo says it uses 9.7% R instead of Rebol! - https://github.com/rebol/rebol So 3 changes here… 1) .reb is now the primary (and official) extension - http://www.rebol.com/article/0540.html 2) .rebol moved to list of extensions (some code does use it) 3) .r added back. NB. The majority of Rebol code on Rebol uses this (followed by .r2 & .r3). .r was present in languages.yml previously but was removed for some reason? (looks like here - github-linguist@5a5d334)
Could you add samples for the file extensions you added? |
Added sample files with all the Rebol file extensions. NB. They all display correct syntax highlighting except for .reb sample file. However I do have some examples in my repo where .r doesn't highlight correctly, for eg. https://github.com/draegtun/PrettifyRebol/blob/master/build/GCP-datatypes.r |
@pchaigno All Rebol source file MUST have a header. (docs: http://www.rebol.com/docs/core23/rebolcore-5.html#section-2), like this one:
Or this one:
So if the |
It would be better to have the .r file that isn't recognized as Rebol as a sample. |
Will this be enough @pchaigno ? |
I tested your branch on two repositories: rebol and one of yours (PrettifyRebol). Do you want to make the changes or should I open a new pull request? (The Travis build failed on all the last pull requests so don't worry about it.) |
Requested by pchaigno and replaced with the two "real" *.r files (GCP-datatype.r & boaters.r)
I've made the changes you've suggested to my patch to keep everything together (see above). Many thanks for all your help on this @pchaigno. Fingers crossed this now does the business :) |
May I venture to suggest some more example scripts to better train the classifier:
|
You should regenerate samples.json if you want the new sample files to be used in the statistical classifier. |
@pchaigno Sorry for the delay. I had some issues getting my Ruby env up-to-date to run bundler/rake on linguist repo (in the end I had to start from clean slate). Passes Travis so hopefully this is now all good to go. |
Just a quick update. I've merged these changes in here. If there are still some issues with misidentification then perhaps we can add some more samples and even consider a heuristic that picks up on |
Historically Rebol used the .r extension which unfortunately clashes with the R Stats programming language :(
For example even the Rebol interpreter repo says it uses 9.7% R instead of Rebol! - https://github.com/rebol/rebol
So 3 changes here…
.reb is now the primary (and official) extension - http://www.rebol.com/article/0540.html
.rebol moved to list of extensions (some code does use it)
.r added back. NB. The majority of Rebol code on Rebol uses this (followed by .r2 & .r3). .r was present in languages.yml previously but was removed for some reason? (looks like here - 5a5d334)