MiniD 2 - Might as well be done

Jarrett Billingsley jarrett.billingsley at gmail.com
Mon Jun 15 16:31:33 PDT 2009


I'm bad at meeting deadlines.  Partly because I mismanage my time, but
a large part of it is also because being a perfectionist, I never know
when to _stop working on something_.  After nearly two years in
development, I think I'm ready to call MiniD 2 "gold."

http://www.dsource.org/projects/minid

I write lots of docs.  Please read them.

= Oh wow, an interpreted version of D! =

NO!  That was the aim _three years ago_ but by now it's a completely
different language.  Please read the docs before you form your
opinions on what it is :)

= What's changed since MiniD 1? =

Lots.  It's enough to say that it's practically a different language.
To be honest, I don't even consider MiniD 1 - either the language or
the implementation thereof - anything more than a crude, unfinished
work.  MiniD 2 is what I consider to be the first _actual_
language/implementation.

The MiniD 2 reference implementation is far more mature, complete, and
efficient than its predecessor.  It has been reimplemented pretty much
from scratch and now features its own heap and GC separate from D's.
While this does incur a bit of a hit on the terseness of the native
API, it also manifests itself in a frankly _incredible_ increase in
performance, as well as features that would have been difficult or
impossible to implement using the native GC (like weak references and
class finalizers).

What kind of performance, you ask?  Well, almost every test I've run
kicks the crap out of Python, and is more in the ballpark of Lua.  The
only tests that don't quite measure up are those which are GC-heavy.
The current implementation uses a simple mark-and-sweep GC, but that
is one of my main development priorities after this release.  If I can
reach Lua's performance - awesome!

The API is much more like Lua's now, though with some nice perks due
to overloading that aren't possible in a C API.  Writing code for what
is essentially a stack language is kind of nice, in some ways.  Being
such a departure from what most people are used to, though, it can
take some getting used to.

The API is also much more "there is one way to do it."  The old MiniD
1 - and early MiniD 2 - APIs sometimes had several, inconsistent
methods of acquiring information.  This has been entirely done away
with.  That being said, D's current protection mechanisms (and DMD's
forward reference issues) are woefully inadequate for dividing up the
API the way I want to, forcing almost all of the public API functions
into a single module.  Sorry for that.

= I'm bearophile, and I don't think it performs as well as <X>, and
isn't similar enough to Python. =

OK.  Give me some benchmarks, and I'll see what's taking so long.  As
for the language style?  Tough luck ;)  I admit the standard library
probably doesn't have as many lazy-evaluation functions and datatypes
as it could, but that can certainly change.  I am open to suggestions!

= Why do I need it? =

I don't know!  Maybe you're just interested in learning new languages.
 Maybe you've got a legitimate need for a scripting language in one of
the D apps you're writing.  Whatever.  I can't tell you why you need
it.  Only you know that.

For a high-level, pseudo-philosophical introduction to the language,
see http://www.dsource.org/projects/minid/wiki/Introduction2

I recommend you read the spec and the language tutorial if you're
wondering what the language is all about.  _Then_ can you tell me what
you do and don't like.

= What prerequisites do I need, and how do I install it? =

D1 with Tango 0.99.8, currently.  That's about it, as far as the core
language and its standard libraries are concerned.

Installation instructions are available here:
http://www.dsource.org/projects/minid/wiki/Installation  I plan on
putting some more detailed docs up especially w.r.t. feti's sandbox
script, since I haven't been able to get some configurations to work.

If you're having trouble installing a D compiler or build tool or
Tango, I'm sorry, but I just don't have the time or patience to help
you install the prerequisites.  I have spent far too much time helping
others install those and it's just.. well, it's not my fault that the
D toolchain is currently so fractured and hard-to-use, and I've kind
of lost the will to help anyone else.  Sorry :\

MiniD works fine with DMD and LDC.  GDC is too old to compile it.  Bug
David Friedman or Arthur about that.  :|

= How do I <x>? =

Please ask me.  Here on the newsgroups is OK, but for more long-term
conversations, *please* sign up for a dsource account and post your
questions to the MiniD dsource forum
(http://www.dsource.org/forums/viewforum.php?f=94).  If you don't have
a dsource account already, why not? ;)  If you're one of those people
who refuses to post on one of those "dirty, slow, inefficient" web
forums, well, I guess you're not getting any help!  Or you could just
email me, but by doing that, you'll be depriving anyone else from
seeing your question and the resulting answer.  Your choice.

I love writing documentation, and if you find any part of it
inadequate or confusing, *let me know*.  If there is a particular
style of documentation you respond particularly well to, *let me
know*.  I'm pretty responsive to communication, so if you've got
questions, ideas, suggestions, comments, flames - WHATEVER - please
let me know.

= You're drunk, aren't you? =

A little.

= What else? =

Nothing!  Really.  Except maybe if you're interested in 3D graphics,
there _are_ SDL and OpenGL bindings for MiniD already.  <_<

= I want to help! =

Then submit a patch!  I have to admit, I'm a bit like Walter in that I
might not accept your code unless I review it, know you personally to
be a skilled developer, and/or believe that it is a worthwhile
addition.  However, "unofficial" patches can be just as useful to
others as core language features.  Development is fun!  Contribute!

= What are your plans for the future? =

Some performance improvements; a better GC would be nice.  Haven't
done much GC research so I'd like to get into that.  Maybe a JIT
compiler a little further off.  More addon libraries, definitely!

That's all.  I don't think I'll have any kind of versioning scheme
save for the most important revisions.  Other than that, I think I'll
just base the "versions" off of the SVN revision that they correspond
to.  It's not like any other D library really has any kind of reliable
release schedule :P

Any questions, just ask, please!


More information about the Digitalmars-d-announce mailing list