linguist icon indicating copy to clipboard operation
linguist copied to clipboard

Add URScript language

Open EbbeFuglsang opened this issue 1 year ago • 4 comments

URScript is the custom programming language, developed by Universal Robots, that controls the robot arm. Any interactions with PolyScope get converted into URScript commands, and are subsequently sent to the robot to be executed. This high level language is easy to learn, and allows you to program the robot without the PolyScope graphical interface. The URScript Manual contains an overview of the language structure, information on data types, and a complete reference of the standard functions.

Description

Checklist:

  • [x] I am adding a new language.
    • [x] The extension of the new language is used in hundreds of repositories on GitHub.com.
      • Search results for each extension: https://github.com/search?utf8=%E2%9C%93&q=urscript&type=repositories&ref=searchresults
        • https://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.script+URScript
    • [x] I have included a real-world usage sample for all extensions added in this PR:
      • Sample source(s):
        • [URL to each sample source, if applicable]
      • Sample license(s): https://github.com/UniversalRobots/URScript_Examples/tree/main/admittance-control BSD 3-Clause License
    • [x] I have included a syntax highlighting grammar: [URL to grammar repo]
    • [x] I have added a color
      • Hex value: #RRGGBB
      • Rationale: This is Universal Robots brand color
    • [X] I have updated the heuristics to distinguish my language from others using the same extension.

EbbeFuglsang avatar Dec 02 '24 12:12 EbbeFuglsang

Regarding popularity this search: urscript OR UR5 AND ROS OR URCap gives 1.6k repos. They might not all have the URScript in seperate file. But with this search: https://github.com/search?type=code&q=%28urscript+AND+path%3A*.script%29+OR+%28UR5+AND+ROS+AND+path%3A*.script%29+OR+%28URCap+AND+path%3A*.script%29+ gives 542 different .script files that holds URScript. What is the threshold?

Regarding the heuristc. That makes a lot of sense. I will look into that. Thank you for you feedback so far🙏

EbbeFuglsang avatar Dec 06 '24 13:12 EbbeFuglsang

What is the threshold?

https://github.com/github-linguist/linguist/blob/5fad8d57605a914026a65b0e3ff6815d739944de/CONTRIBUTING.md?plain=1#L76-L80

lildude avatar Dec 06 '24 15:12 lildude

I just added some heuristics I think that should reduce the risk of false positives.

EbbeFuglsang avatar Dec 06 '24 15:12 EbbeFuglsang

Please merge main into your branch. Your branch is still showing signs of https://github.com/github-linguist/linguist/issues/7145 which has been resolved now.

lildude avatar Dec 09 '24 14:12 lildude