Welcome to MiniD!
Table of Contents
- What is MiniD?
- Announcements and Communication
- Language Documentation
- Library Documentation
- Try it out!
- Other Downloads
What is MiniD?
MiniD is a scripting language which was conceived, written, and is maintained by Jarrett Billingsley. It is based on D, Lua, Squirrel, and Io and is dynamically-typed, with a C-style syntax and D-like (though not necessarily identical to D) 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. The reference implementation is written in D and is designed with D's featureset in mind, in order to make integration of MiniD into a host application seamless and easy.
Announcements and Communication
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.
You can find announcements and status updates, ask questions, and discuss the language over on the 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.
Language Documentation
MiniD as a language is not tied to any specific implementation. The reference implementation is written in D, but anyone is free to implement the language any way they choose.
- MiniD 1 Language Specification - The first version of the language, stable and implemented.
- MiniD 2 Language Specification - The next version, still in development.
- 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.
Library Documentation
This is the documentation for the reference library implementation of MiniD.
The MiniD library is based entirely on Tango, the alternative standard library for D. MiniD uses the 0.99.7 Dominik release of Tango. For those of you using Phobos.. sorry, the last revision of MiniD to use Phobos is, by now, so outdated as to no longer be useful. Use Tango, or Tangobos.
MiniD is, right now, only compatible with D1. MiniD will probably not support D2 until D2 gets out of alpha at least. MiniD probably doesn't compile under D2; it hasn't been tried to my knowledge.
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@338. This is based on the 0.99.7 Dominik 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.
GDC pre-release 0.25 is reported to have some odd codegen bugs with MiniD causing segfaults in the compiler. If you're getting segfaults, try downgrading to 0.24.
- The MiniD 1 Library Documentation - 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.
- The MiniD 2 Library Documentation - Still under development.
- Compilation Options - Customize your build of MiniD for different restrictions and capabilities.
Try it out!
The MiniD distribution comes with a command-line interpreter called MDCL. MDCL can be run in interactive mode (type the code in and it's run immediately), or it can be just run to execute 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 (by putting "#!/path/to/mdcl" as the first line).
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.
Other Downloads
Here are some syntax highlighters for code editors:
- MiniD 1/2 Highlighter for vim. Installation: copy the file to ~/.vim/syntax (if those dirs don't exist, create them). Then in ~/.vim/filetype.vim (again, if it doesn't exist, create it), add:
augroup filetypedetect au BufNewFile,BufRead *.md setf minid augroup END
- MiniD 1 Highlighter for gedit. Installation: copy the file to /usr/share/gtksourceview-2.0/language-specs/ as root to use it. Gedit must be restarted for the change to take effect. Then, the MiniD option will appear under View > Highlight Mode > Scripts. It has to be manually selected because Gedit wants to determine highlight according to "mimetype" instead of file extension, it seems.
- MiniD 1 Highlighter for ConTEXT. Installation: place in \YourConTEXTDir\Highlighters and restart ConTEXT. It is registered with the .md extension.
- MiniD 2 Highlighter for ConTEXT. Same installation as above. Note that if you have both the v1 and v2 highlighters installed, opening an .md file will cause ConTEXT to default to the v1 highlighter.
