-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add language: Mojo #6400
Add language: Mojo #6400
Conversation
Unfortunately, we can't as it sets a precedent we don't want to fight each and every time someone develops "the next greatest thing, promise on my hamster's life". Given the popularity you've mentioned, and the hype around AI, it shouldn't take long to reach the levels we require though. |
Makes sense, thank you for the consideration! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An emoji file extension. I've seen everything now…
Can't stop the innovation! :) |
Hey all! First off thanks for your reviews since we first submitted this pull request. Originally Chris wrote:
But I believe we may now meet those requirements. The contribution guidelines here say to look for 200 unique Also, not sure if it's worth mentioning, but as of this patch, Vim now recognizes the So, would it be possible to take another look at this and its "Pending Popularity" tag? Thanks in advance! 🙏 @lildude @Alhadis |
No change. It still doesn't look popular enough, especially when you consider that |
And further refinement shows a lot of those remaining files are XML, which whilst not popular enough for inclusion right now, would need to be explicitly added to XML in this PR too to ensure they remain correctly identified as XML (the extension takes precedence so this PR as it stands would cause all those files to be identified as Mojo and incorrect syntax highlighting will apply). Current results if we exclude mojo-lang and XML. |
Gotcha, thanks for the quick & thorough response! I'll use those searches to keep tabs on things, and in the meantime update this PR to handle XML with a
I see, so I should consider the popularity of the |
Thanks for your help! I pushed an update here with heuristics for Mojo vs. XML, and removed I'll keep an eye on the search link you shared and ping this thread when we cross the popularity threshold. Right now I see 1.1k public Mojo files that are not XML 😃 |
This Google Sheet is a great way to view Mojo popularity: https://docs.google.com/spreadsheets/d/1mmS5xwRrtBIZubdEIrUpsGzZxX2mcqcc74tBjDfo6Lo/edit?usp=sharing (updated daily)
|
Update: currently 4479 Mojo🔥 files across ~355 confirmed Mojo🔥 repos 🎉🎉 |
@lildude I think we're good to go ![]() |
Hah, thank you to all of our community members pinging this -- it does indeed look like we're above the 2k source file threshold! Reviewers, please take a look at your earliest convenience, thanks! |
Not quite. Three users are having an undue influence on the figures with one repo accounting for over 1000 of the results. Excluding them and forks brings things down quite a bit. |
65d34db
to
65d8b97
Compare
Aha, gotcha -- thanks! Sorry for all the pings, the idea of getting highlighted on GitHub is very exciting 🤩 I'll try to keep an eye on the search, and comment here once it looks like we've reached 2k, excluding any users with an outsized number of files. Thanks for all your help! |
Please don't. PRs are only merged when I'm getting close to making a new release and I will check all usage of pending PRs at that time. |
Ah OK, thanks for the clarification, sorry if I missed that -- no pinging it is. Thanks! |
I'll try to make this my last annoying comment 🙂 I think the count shown in the sheet is more accurate than that query. There are more non-fork Mojo repos that show up when you leave off the The way to get the most accurate count seemed to be to try a bunch of queries (via HTTP API), use the Everything in the sheet has been gone through by multiple people and the file count as of today is 4585 with one outlier of 2579. Excluding outlier: 4585-2579=2006 files |
@lildude - Just wanted to check if we need to do anything else here? Want to make sure you have everything you need from us. Thanks so much again |
Almost... I can't update the PR to merge in master as maintainers haven't been granted write perms on this PR and can't approve CI to run for some reason. Usage looks good though. |
Amazing! Sorry, small parse error on my end for this sentence -- do I need to, or can I, update write permissions on this PR? Or are you saying that for some reason write permissions don't seem to have been granted by some automated process, and it's not something I can fix? |
Add a new programming language to Linguist, named Mojo, for the file extension `.mojo`. You can learn more about Mojo at https://docs.modular.com/mojo/. Co-authored-by: Chris Lattner <lattner@users.noreply.github.com>
It's something you do when creating the PR and can be updated on current PRs. See the docs here. |
NM. You can't because your fork is owned by an org. It's only an option for personally owned forks. |
Thank you @lildude ! |
Add a new programming language to Linguist, named Mojo, for file extensions
.mojo
and.🔥
. You can learn more about Mojo at https://docs.modular.com/mojo/.Description
Mojo is a new programming language developed by me (Chris Lattner) and my amazing team at Modular.
Because it's a brand new language, it does not meet linguist's requirements for broad use on GitHub. The team and I thought that we'd send this anyway, to see if an exception could be made, based on the success and widespread use on GitHub of some of my other programming languages (LLVM IR, MLIR, Swift). If that's not possible, no worries, and thanks for your time!
Checklist:
The extension of the new language is used in hundreds of repositories on git.luolix.top.As explained above, this is a new language without extensive usage yet.Matmul.mojo
is adapted from https://docs.modular.com/mojo/notebooks/Matmul.htmlBool.🔥
is adapted from https://docs.modular.com/mojo/notebooks/BoolMLIR.html#ff4c1f
I have updated the heuristics to distinguish my language from others using the same extension.No other language in this repository uses the.mojo
or.🔥
file extensions, so I did not add a heuristic.