Stream: compiler development

Topic: github syntax highlighting


view this post on Zulip Brendan Hansknecht (Dec 01 2023 at 20:23):

I think we actually meet the requirements for github syntax highlighting currently. Normally it is 200 repos. But rn, 2000 files with the extension also qualifies.

Looks like we have 2.4k: https://github.com/search?q=NOT+is%3Afork+path%3A*.roc+app+OR+platform+OR+hosted+OR+interface+OR+package&type=code

view this post on Zulip Luke Boswell (Dec 01 2023 at 20:28):

This maybe be useful https://github.com/github-linguist/linguist/blob/master/CONTRIBUTING.md#adding-a-language

view this post on Zulip Brendan Hansknecht (Dec 01 2023 at 20:29):

For context on requiring just a file count: https://github.com/github-linguist/linguist/issues/5756

view this post on Zulip Luke Boswell (Dec 01 2023 at 20:29):

Is it worth waiting for Module Params and some time hardening tree sitter in the wild?

view this post on Zulip Brendan Hansknecht (Dec 01 2023 at 20:31):

idk...maybe. Not sure how hard it is to update once added.

view this post on Zulip Richard Feldman (Dec 01 2023 at 20:51):

I think if we're eligible we should go for it sooner rather than later...you never know when someone else is going to try to claim the .roc extension! :sweat_smile:

view this post on Zulip Brendan Hansknecht (Dec 01 2023 at 20:52):

Also, I am not 100% sure we are legible, but I think we are at a point where it is worth making a PR and asking what they think.

view this post on Zulip Richard Feldman (Dec 01 2023 at 20:53):

if anyone wants to go for this, my only request is try to get syntax highlighting for string interpolation working so that e.g. "num: \(Num.toStr num)" highlights the \( and ) differently from the rest of the string literal, and the part inside the parens ideally like a normal expression

view this post on Zulip Brendan Hansknecht (Dec 01 2023 at 20:53):

Aside, there are at least 638 unique apps using roc: https://github.com/search?q=NOT+is%3Afork+path%3A*.roc+%22packages+%7B%22&type=code&p=2

view this post on Zulip Richard Feldman (Dec 01 2023 at 20:57):

sweet! :smiley:

view this post on Zulip Richard Feldman (Dec 01 2023 at 20:57):

anyone want to go for this?

view this post on Zulip Brendan Hansknecht (Dec 01 2023 at 21:00):

Hmm, actually, I think that sure is pulling in a lot of not roc files (though hard to say for sure cause github only lets me look at 5 pages or results) I think this is a more accurate query that matches what the lingist repo. Probably won't get accepted: https://github.com/search?q=NOT+is%3Afork+path%3A*.roc+%22packages+%7B%22+OR+%22exposes+%5B%22+OR+%22imports+%5B%22+NOT+user%3Aroc-lang&type=code

view this post on Zulip Brendan Hansknecht (Dec 01 2023 at 21:01):

tried to search for header pieces that would guarantee something is a roc file.

view this post on Zulip Brendan Hansknecht (Dec 01 2023 at 21:02):

We probably could make an issue on their repo with the search just to see what they think. If they think it is not enough, maybe they can specifically give us a better query and we can use that.

view this post on Zulip Matthew Phillips (Dec 02 2023 at 14:33):

I work on Astro and we have a .astro syntax, GitHub added us fairly early in our lifetime, so I wouldn't be surprised if Roc is eligible already. The barrier is lower than I expected.

view this post on Zulip Richard Feldman (Dec 02 2023 at 14:53):

does anyone want to volunteer to try adding it and see what they say? :smiley:

view this post on Zulip Ayaz Hafiz (Dec 02 2023 at 15:57):

Do we have a grammar? I don't think anyone's developed a TM grammar

view this post on Zulip Richard Feldman (Dec 02 2023 at 16:09):

I think the vs code extension has one


Last updated: Jul 06 2025 at 12:14 UTC