Welcome to MiniD!

What is MiniD?

MiniD is a scripting language, based on D, Lua, and Squirrel, and designed with D's featureset in mind. It is dynamically-typed, with a C-style syntax and D-like semantics. MiniD most notably is not an "interpreted version of D" or anything like that, despite what the (admittedly ill-fitting..) name implies. It is a language all its own, with its own grammar and semantics.

MiniD was conceived, written, and is maintained by Jarrett Billingsley.

MiniD is based entirely on Tango, the alternative standard library for D. MiniD uses the 0.99.6 Jeff release of Tango. MiniD is, right now, only compatible with D 1. MiniD will probably not support D 2 until D 2 gets out of alpha at least. MiniD probably doesn't compile under D 2; it hasn't been tried to my knowledge.

You can find announcements and status updates, ask questions, and discuss the language over on the forums.

MiniD 2 is under development! No new features will be added to MiniD 1.0 except maybe for some standard library additions. All new features will go into MiniD 2 instead. You can track the progress of MiniD 2 here.

The Language

  • Introduction - A brief overview of the language, with some small examples.
  • MiniD 1 Spec - The formal specification of version 1 of the language, which is stable.
    • Compilation - Describes the process of compiling source text into an executable form.
    • Execution - How the compiled MiniD code is actually run.
    • Lexical - The very basic textual bits that the language is made up of.
    • Expressions - The algebraic language syntax of MiniD.
    • Statements - Various language constructs.
    • Types - A description of the various data types in MiniD.
    • Declarations - How one declares and initializes variables.
    • Functions - How to declare functions and what they can do.
    • Classes - The object-oriented aspects of MiniD.
    • Modules - The largest blocks of organization in MiniD, and how to work with them.
    • Metamethods - How to customize the behavior of objects and perform operator overloading.
    • Grammar - The (mostly-correct) EBNF grammar for MiniD.
  • MiniD 2 Spec - The formal specification for MiniD 2, which is still under development.
    • Compilation - Describes the process of compiling source text into an executable form.
    • Execution - How the compiled MiniD code is actually run.
    • Lexical - The very basic textual bits that the language is made up of.
    • Expressions - The algebraic language syntax of MiniD.
    • Statements - Various language constructs.
    • Types - A description of the various data types in MiniD.
    • Declarations - How one declares and initializes variables.
    • Functions - How to declare functions and what they can do.
    • Objects - The object-oriented aspects of MiniD.
    • Modules - The largest blocks of organization in MiniD, and how to work with them.
    • Metamethods - How to customize the behavior of objects and perform operator overloading.
    • Grammar - The (mostly-correct) EBNF grammar for MiniD.
  • Standard Library - The library of code which accompanies MiniD.
  • The Language - An informal introduction to the language, bit by bit.
    • Getting Started - Obligatory programs and such.
    • Types? - Many of the MiniD types and what you can do with them.
    • Expressions? - The various value-yielding language constructs.
    • Statements? - Control flow, assignment, and variable declarations.
    • Functions? - Breaking up your program into individual reusable bits.
  • The Native API - The programming interface you use in your D programs to interact with MiniD
    • Introduction - Some basic concepts used throughout the API.
    • Part 0 - Setting up the host app and compiling and running code.
    • Part 1 - Exchanging values between native and script code, and calling functions.
    • Part 2 - More advanced techniques with functions.
    • minid.minid - A sort of utility library for creating contexts and running code.
    • minid.compiler - The compiler.
    • minid.utils - A utility library with a bunch of non-MiniD-specific functionality in it.
    • minid.types - The most important module in the MiniD library. Holds the definitions of all the types, and most of the native API.
    • minid.bind - The binding library, which allows you to quickly expose native D classes and functions to MiniD.

Command-Line Interpreter

MDCL is a command-line interpreter for MiniD. It can be run in interactive mode (type the code in and it's run immediately), or it can be just run to run a script file. Because MiniD allows for the Unix-style shebang (#!) at the beginning of scripts, you can use MDCL as the scripting host for MiniD scripts.

Both Windows and Linux users can download the Windows EXE of MDCL here. mdcl.exe works very well under Wine in Linux, for Linux users who want to try out the language right away. Otherwise you can check out the MiniD source and compile it yourself.

Installation and Use

To use MiniD, just check it out from the repository, either using a Subversion client or by using the "Zip Archive" link at the bottom-center of the Trac SVN browser. To get the latest stable release, use source:trunk@288. This is based on the 0.99.6 Jeff release of Tango. The latest codebase, which may or may not compile correctly and which is very much subject to change, is in source:trunk.

MiniD is built (on Windows at least) with Build, and it also works fine with DSSS. Note, however, that using "dsss net install" will always install the head revision, which may or may not be stable. Because of this, it's probably best to download/checkout the stable repo revision, and do a "dsss build" and then "dsss install" in its directory instead.

Because MiniD makes fairly heavy use of templates, on Windows at least it's probably best to recompile the library along with your program every time you compile instead of compiling MiniD to a static library.

For those of you using Phobos, the last revision of MiniD to be based on Phobos is available here. You can get it from SVN by checking out http://svn.dsource.org/projects/minid/tags/lastPhobos. This version is, by now, very outdated. If you want to use MiniD, you'd be best off switching to Tango, or if you absolutely can't convert your Phobos-based project over, look into Tangobos.

Communication

Announcements and discussions are posted on the DSource forums. Please feel free to start your own topics!

There's also an IRC channel for MiniD on Freenode, called #d.minid. You can access that link if your browser understands irc:// links. I (Jarrett) try to be on as much as possible.

If you have a suggestion or bug report, please use the "New Ticket" button at the top right.