Skip to content

Add support for MiniScript#7384

Open
ayecue wants to merge 2 commits into
github-linguist:mainfrom
ayecue:main
Open

Add support for MiniScript#7384
ayecue wants to merge 2 commits into
github-linguist:mainfrom
ayecue:main

Conversation

@ayecue

@ayecue ayecue commented May 17, 2025

Copy link
Copy Markdown

From the MiniScript manual:

MiniScript is a modern scripting language designed to be clean, simple, and easy to learn. It
was designed from the ground up by borrowing only the best ideas from other languages
such as Python, Lua, Basic, and C#. If you know pretty much any other programming
language, you’ll pick up MiniScript almost immediately.

And if you’ve never written a line of code in your life, don’t panic! MiniScript is the
friendliest and most fun way to get started. It’s much easier than you probably expect.

Important: MiniScript is designed as an embedded programming language. That means
you will usually use it inside some other program, such as a video game. You should find
another document that describes how to access and use MiniScript within that other
program. This document only describes the MiniScript language itself, and the intrinsic
functions that are common to most MiniScript applications.

More informations about MiniScript can be found here:

Following changes are performed in this PR:

Checklist:

@ayecue
ayecue requested a review from a team as a code owner May 17, 2025 14:44
@ayecue
ayecue force-pushed the main branch 2 times, most recently from 67a120c to 8ead033 Compare May 18, 2025 12:34

@lildude lildude left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

samples/MiniScript/superstartrek.ms and samples/MiniScript/textAdventure.ms are way too big for our needs - if the diff suppresses the content, it's too big. Please remove them.

Please also update the search query in the PR template to use your heuristics so we can assess popularity and your heuristics.

@ayecue

ayecue commented May 19, 2025

Copy link
Copy Markdown
Author

samples/MiniScript/superstartrek.ms and samples/MiniScript/textAdventure.ms are way too big for our needs - if the diff suppresses the content, it's too big. Please remove them.

Done. Both large MiniScript samples have been removed.

Please also update the search query in the PR template to use your heuristics so we can assess popularity and your heuristics.

I've updated the query to include some of the keywords and special variables. While it might not catch every single MiniScript related file, it should cover the majority.

@lildude

lildude commented May 19, 2025

Copy link
Copy Markdown
Member

I've updated the query to include some of the keywords and special variables. While it might not catch every single MiniScript related file, it should cover the majority.

You can use regex in GitHub's search too.

Comment thread lib/linguist/heuristics.yml Outdated
Comment thread lib/linguist/heuristics.yml Outdated
@ayecue

ayecue commented May 21, 2025

Copy link
Copy Markdown
Author

I've reduced the complexity of the heuristics pattern significantly now. Mainly relying on the end block keyword. Additionally I added two more extensions since those should also be relevant to MiniScript.

@lildude lildude left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See inline comments

Comment thread lib/linguist/languages.yml Outdated
Comment thread lib/linguist/languages.yml Outdated
@JoeStrout

Copy link
Copy Markdown

Commenting mainly to get notifications on this issue (I can't find a Subscribe or Watch button). But just to be sure I understand:

With the Pending Popularity tag, this issue is on hold until we cross some threshold? Is it for this search to return 2000 files, or something else?

@lildude

lildude commented Jun 2, 2025

Copy link
Copy Markdown
Member

With the Pending Popularity tag, this issue is on hold until we cross some threshold? Is it for this search to return 2000 files, or something else?

Essentially, yes. More deets in #5756

@EntitySeaker

Copy link
Copy Markdown

Is it possible for this pr to get accepted before the 2000 files mark, or is that a hard requirement?

@lildude

lildude commented Jun 5, 2025

Copy link
Copy Markdown
Member

Hard requirement. If we make an exception for one there's no point having the restriction and we'd have no choice but to accept every submission, even for hobby languages that no one uses.

@JoeStrout

Copy link
Copy Markdown

It looks like the guidelines have changed; the global search now quits counting files at ~100, so the PR template now says we need "hundreds of repositories", as evidenced by a search which, in our case, would be something like:

https://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.ms+%22end%20function%22

And that's showing 269 repositories today. 🥳

So @ayecue, could I trouble you to update your PR with the latest template? I think we should be good to go now!

@lildude

lildude commented Feb 19, 2026

Copy link
Copy Markdown
Member

And that's showing 269 repositories today. 🥳

Which means nothing in the context of this PR 😁 That's showing 269 repositories which contain "end function" in their name or description and has nothing to do with the file extensions or content of the files in the repo. Poke around in the results and see for yourself.

It looks like the guidelines have changed; the global search now quits counting files at ~100,

It hasn't/doesn't. See NOT is:fork path:*.rb puts. The search only returns what is currently indexed. I don't know how the Search index is managed but I know the results are also affected by Search's documented limitations.

Scrap that. That's indeed new to me. I'll need to investigate that more.

@lildude

lildude commented Feb 19, 2026

Copy link
Copy Markdown
Member

Scrap that. That's indeed new to me. I'll need to investigate that more.

Looks like this might be a bug from a recent change. Still investigating.

@lildude

lildude commented Feb 19, 2026

Copy link
Copy Markdown
Member

Looks like this might be a bug from a recent change. Still investigating.

Confirmed. This is a bug with the number shown when using the path qualifier. The number at the top of the page shows the correct behaviour if you don't use that qualifier, eg use language. The search team are looking into it.

@JoeStrout

Copy link
Copy Markdown

Hmm, I see you're right, that's not a useful search result (for our purposes) at all. I was confused by the PR template asking for "hundreds of repos" and then suggesting a search of that form — kind of implying that such a search would be helpful for answering how many repos you have.

I know the old search found 1500+ files back in November, and I'd expect it to be substantially higher now, so hopefully the search team can track down the bug. But even if they do, that only gives us a number of files, not repos. I found another source (which I can't seem to find again now) claiming that the criterion these days was 200 repos, not 2000 files. But I don't know how we would measure that.

@JoeStrout

Copy link
Copy Markdown

Actually, since MiniScript files are currently identified as MAXScript, I guess we can just do:

https://github.com/search?type=code&q=NOT+is%3Afork+language%3AMAXScript++%22end+function%22

which currently shows "2k files". Perhaps that's good enough for our purposes?

@lildude

lildude commented Feb 19, 2026

Copy link
Copy Markdown
Member

I found another source (which I can't seem to find again now) claiming that the criterion these days was 200 repos, not 2000 files. But I don't know how we would measure that.

That's the old guidance for all files but now only applies to files/extensions that are expected to occur only once per repo. The newer guidance, which has been in place for quite some time in #5756 is now finalised in the CONTRIBUTING.md file here.

which currently shows "2k files". Perhaps that's good enough for our purposes?

Possibly. Reassessment will take place when I next make a release which happens approximately every 3-4 months.

@lildude

lildude commented Feb 26, 2026

Copy link
Copy Markdown
Member

Confirmed. This is a bug with the number shown when using the path qualifier. The number at the top of the page shows the correct behaviour if you don't use that qualifier, eg use language. The search team are looking into it.

The fix rolled out yesterday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants