MiniD 1.0 released!

Robert Fraser fraserofthenight at gmail.coim
Wed Aug 1 00:48:42 PDT 2007


Jarrett Billingsley Wrote:

> After more than a year of brainstorming, writing, re-writing, taking ideas 
> from other languages and generally having a good time, I've come to what I 
> feel is a good place to call it 1.0.
> 
> == What is MiniD? ==
> 
> MiniD is a scripting language written entirely in D, designed around D's 
> features and with D's semantics in mind.  It's based mainly off of Lua and 
> Squirrel, with influences from D and JavaScript.
> 
> MiniD is meant to be an extensible extension language, like Lua.  That is, 
> rather than trying to be a huge do-everything language like Python, it's 
> meant to be a smaller, more compact (but still expressive) language for 
> writing programs and scripts meant to be run in the context of a larger 
> program.  It's extensible in that the "host" program can provide functions 
> and classes as hooks into application-specific functionality, and it's an 
> extension language in that it can be used to extend the capabilities of the 
> host program.
> 
> MiniD makes it easy to interface between native and script code.  The 
> low-level API is muct simpler to use and cleaner than that of most languages 
> implemented in C, and there is also a Pyd-like binding library to make it 
> possible to quickly expose free functions and class types to MiniD.
> 
> == Why MiniD? ==
> 
> Why MiniD instead of something like Lua, Python, or DMDScript?  Lua and 
> Python are both written in C, and as such have (compared to what D provides) 
> clumsy APIs.  They also have their own memory management and error handling 
> schemes, two things that D provides natively.  DMDScript has a D 
> implementation, but it's not free for all use.  MiniD is written in D, has a 
> simple-to-use API, takes advantage of as many D features as possible (the 
> GC, exceptions, templates, classes), and is licensed under the zlib/libpng 
> license, which means you can use it for just about anything.
> 
> == Describe the language. ==
> 
> - Uses a C-style syntax with a lot of D influences.
> 
> - Is dynamically typed, with booleans, integers, double-precision floats, 
> UTF-32 characters and strings, tables (maps), arrays, first-class functions, 
> and classes.
> 
> - Is object-oriented, with a class-based OOP model with support for single 
> inheritance and dynamic modification of classes (as they are a first-class 
> type).
> 
> - Makes it easy to make larger codebases with native support for modules and 
> packages.
> 
> - Supports a form of collaborative multithreading with coroutines.  A 
> coroutine is like a function which you pause and resume explicitly. 
> Coroutines can be used to make iterators and to simulate simple 
> multithreading.
> 
> == Describe the API. ==
> 
> - Supports code sandboxing through the use of multiple "contexts", into 
> which libraries can be loaded.  You can create a sandbox by only loading a 
> restricted set of libraries into a context, and then running code in it.
> 
> - Is templated in many places to support IFTI, and converts between native D 
> types and MiniD types in many places as well, in order to avoid lots of 
> tedious explicit types needing to be specified and conversions to be done.
> 
> - Makes it easy to write native functions using the API.  No confusing 
> excessive stack manipulation like with Lua or Squirrel.  No reference 
> counting like with Python.  Just get the values and manipulate them with a 
> program state.
> 
> - Makes it really easy to expose native functions and classes to MiniD 
> through a templated binding library, similar to Pyd.  Can bind free 
> functions, classes, and in classes, constructors (even multiple constructors 
> with the same number of parameters, unlike Pyd), methods, and properties 
> (through a convention, as MiniD itself does not have explicit properties). 
> Even supports binding multiple D classes which are in an inheritance 
> hierarchy, but notably does _not_ yet support MiniD classes then inheriting 
> from those exposed D classes.
> 
> == Licensing and Compatibility ==
> 
> MiniD is licensed under zlib/libpng, which basically means (1) I'd like you 
> to give me credit if you use it, (2) you can't say that you made it, and (3) 
> you can modify it all you want and even release your own modified version of 
> the language, but you can't call a modified version "MiniD".
> 
> MiniD is, as far as I know, only compatible with D 1 (last compiled with D 
> 1.020).  Because it uses some newer features, it is not known to work with 
> GDC 0.23, but may compile with one of the newer patches.
> 
> MiniD is based entirely on Tango, the alternative standard library for D. 
> MiniD was last built with Tango 0.99.
> 
> MiniD is built with Bu[il]d, but should also work with DSSS.  Not real sure 
> if it works with dsss net.  DSSS is still largely a mystery to me.
> 
> MiniD should compile on any platform for which there's a functional 
> compiler.  It has been developed and tested on Windows, and has also been 
> compiled and tested on Ubuntu 7.04.
> 
> == Links ==
> 
> The main page for MiniD is http://www.dsource.org/projects/minid.  The 
> forums are at http://www.dsource.org/forums/viewforum.php?f=94; I use the 
> forums for announcements, and you can also start discussions there.
> 
> You can find information on downloading the library on the main page. 
> There's also a link to MDCL, the MiniD Command-Line interpreter, for which 
> Windows binaries are provided.  If you're on another system, you can check 
> out the trunk and compile MDCL manually.
> 
> Any questions, comments etc.  Either reply here or post on the forums :) 
> 
> 

Awesome; great job. From a cursory look, I like what's going on there, but the things keeping me from turning away from Perl for general scripting purposes are the lack of an eval() and first-class regexes. Still, this looks like an awesome language for scripting within the context of another application, which I guess is the point. 

Anyways, congratulations on 1.0!



More information about the Digitalmars-d-announce mailing list