User:Marc Gurevitx/MiniScript
Submission declined on 17 February 2024 by LittlePuppers (talk).
Where to get help
How to improve a draft
You can also browse Wikipedia:Featured articles and Wikipedia:Good articles to find examples of Wikipedia's best writing on topics similar to your proposed article. Improving your odds of a speedy review To improve your odds of a faster review, tag your draft with relevant WikiProject tags using the button below. This will let reviewers know a new draft has been submitted in their area of interest. For instance, if you wrote about a female astronomer, you would want to add the Biography, Astronomy, and Women scientists tags. Editor resources
|
- Comment: This needs significant coverage in independent and reliable sources to show that it is notable. Currently the only sources appear to be primary or closely connected to the subject. LittlePuppers (talk) 22:19, 17 February 2024 (UTC)
This is a draft article. It is a work in progress open to editing by anyone. Please ensure core content policies are met before publishing it as a live Wikipedia article at MiniScript. Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL Last edited by LittlePuppers (talk | contribs) 3 months ago. (Update) |
MiniScript is a high-level programming language intended to be small and easy to learn for beginner programmers. It supports structured, procedural and object-oriented paradigms (the latter via prototypes). Its development and features are inspired by Python, Lua, REALbasic and C#..[1]
The first stable version was released at 2017 and it became open-source at 2019.
The official interpreter[2] can be embedded in other programs (written in C++ or C#) but one can also use it as an interactive shell (REPL) or standalone script executor. The official file extension of MiniScript's programs is .ms
.
There are some unofficial ports of MiniScript to other languages which allow embedding it in programs written in Kotlin,[3] Java[4] and TypeScript[5]
Data types[edit]
MiniScript has a small number of intrinsic data types: numbers, strings, lists and maps.
There are also functions that organize code in a procedural way. As in many modern languages, the functions are “first-class citizens”.
There is a special null
value that represents the absence of any useful value. It belongs to its own distinguished data type.
It's possible to create new types using maps as “prototypes”. The namespaces of functions and modules are also maps.
Control structures[edit]
MiniScript provides a few simple control structures:
if
for conditional branchingwhile
for conditional repetitionfor
for iterating over collections
Programming examples[edit]
Hello world program:
print "Hello world!"
Program to calculate the factorial:
// Program to calculate the factorial of a positive integer
factorial = function(x)
if x < 2 then return 1
return x * factorial(x - 1)
end function
print factorial(input("Type a number, and its factorial will be printed: ").val)
Working with objects:
Shape = {}
Shape.sides = 0
Square = new Shape
Square.sides = 4
x = new Square
print x.sides // prints: 4
Shape.degrees = function()
return 180 * (self.sides - 2)
end function
print x.degrees // prints: 360
Extending the built-in types:
string.capitalized = function()
if self.len < 2 then return self.upper
return self[0].upper + self[1:]
end function
print "miniScript".capitalized // prints: MiniScript
Host programs[edit]
Some environments that embed or expose MiniScript:
- Mini Micro[6] – a fantasy retro computer where MiniScript is both a programming language and the language of the command shell.
- Farmtronics[7] – a game mod for Stardew Valley that lets the player obtain a home computer and farming robots and program them in MiniScript.
- Grey Hack[8] – a hacking simulator game in which the MiniScript (rebranded as GreyScript) is used as a scripting language for the in-game computers.
- Robo Reindeer Rumble[9] – a competitive multiplayer programming game where players program battle robots (that look like reindeer) with MiniScript.
Projects[edit]
Some projects that were written in MiniScript:
- Inversion Institute[10] – a puzzle/visual novel about logic and magic.
- Mini Micro Sokoban[11] – a version of the classic japanese video game.
- World Conquest[12] – a mini turn-based strategy game.
- µ-hack[13] – a roguelike retro game.
Notes[edit]
- ^ Essay about inception of MiniScript – https://luminaryapps.com/blog/miniscript-why/
- ^ Official implementation of MiniScript – https://github.com/JoeStrout/miniscript
- ^ Kotlin port – https://github.com/Arcnor/miniscript-kt
- ^ Java port – https://github.com/heatseeker0/JavaMiniScript
- ^ TypeScript port – https://github.com/sebnozzi/miniscript.ts
- ^ Mini Micro's home page – https://miniscript.org/MiniMicro/index.html – https://miniscript.org/MiniMicro/index.html
- ^ Farmtronics's code repository – https://github.com/JoeStrout/Farmtronics
- ^ Grey Hack on Steam – https://store.steampowered.com/app/605230/Grey_Hack/
- ^ Robo Reindeer Rumble home page – https://miniscript.org/RoboReindeer/
- ^ Inversion Institute on Steam – https://store.steampowered.com/app/2145480/Inversion_Institute/
- ^ Mini Micro Sokoban code repository – https://github.com/sebnozzi/minimicro-sokoban
- ^ World Conquest code repository – https://github.com/JoeStrout/worldConquest
- ^ µ-hack code repository – https://github.com/treytomes/micro-hack
External links[edit]
- MiniScript – Home page
- MiniScript at Rosetta Code
- Cross-platform free software
- Cross-platform software
- Dynamically typed programming languages
- Educational programming languages
- Embedded systems
- Free compilers and interpreters
- High-level programming languages
- Multi-paradigm programming languages
- Object-oriented programming languages
- Programming languages
- Prototype-based programming languages
- Scripting languages
- Software using the MIT license
- in-depth (not just passing mentions about the subject)
- reliable
- secondary
- independent of the subject
Make sure you add references that meet these criteria before resubmitting. Learn about mistakes to avoid when addressing this issue. If no additional references exist, the subject is not suitable for Wikipedia.