www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - MiniD 1.0 is getting very close...

reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
So I haven't made an announcement about MiniD on the newsgroups in a long 
time.  MiniD recently had its first birthday (since the initial inception of 
the idea.. it's since changed quite a bit from that), and appropriately 
version 1.0 is going to be out soon as a belated birthday present.

The feature set has been frozen, so what features it has now are the 1.0 
spec.  The standard library is mostly solidified -- the transition to Tango 
necessitated some changes in the IO model, but that's mostly been ironed 
out.  About the only thing that's still in flux is the native API.

The last big thing before the true 1.0 release is a Pyd-like binding library 
which makes it very easy to expose native D code to MiniD apps (and probably 
also functionality to make it easier to deal with MiniD code from the native 
app).  A simple example of the binding looks a bit like this:

WrapModule!
(
    "foo",
    WrapFunc!(one),
    WrapFunc!(two),
    WrapFunc!(three)
);

This will create and register a MiniD module with three functions inside it. 
This module can then be imported and used from MiniD code with no issue. 
The binding layer transparently translates between the native D types and 
the MiniD types; no special considerations (other than the use of 
convertible types for parameters and return values) have to be taken when 
writing the native code.

Of course this is easy but not necessarily the most performant.  It's great 
for quickly exposing functionality that wasn't designed for MiniD to your 
scripts, but if you want the best performance, you can still write native 
functions that are made to work with the language runtime.  The API is 
really starting to come into its own, and virtually anything you can do in 
MiniD code, you can do in native code.

Now that MiniD is Tango-based, I had another idea: use the Fiber class to 
allow native coroutines.  Until now, coroutines had to be script functions, 
as there's no way normally to suspend the execution of a native function. 
I've been playing around with Fiber, and I think it'll make native 
coroutines very doable.

In any case, once the binding library is done, and with a bit of testing, I 
think I'll be able to call this 1.0!

Oh, I suppose you all would like some links ;)  The main page is at 
http://www.dsource.org/projects/minid.  The forums are 
http://www.dsource.org/forums/viewforum.php?f=94, where many announcements 
are posted (and if you want to start some discussion, go right ahead). 
Lastly I recently opened an IRC channel on freenode; it's called #d.minid.

MiniD compiles with DMD 1.0 on Windows and Linux, and depends on the latest 
snapshot of Tango (not the latest stable release, the very 
bleeding-edging-est latest).  GDC is too old to compile it, so sorry Mac 
users. 
Jun 29 2007
next sibling parent "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message 
news:f633pe$1upp$1 digitalmars.com...
 MiniD compiles with DMD 1.0
I guess I should clarify this -- I mean it compiles with the D 1.0 spec compiler, something like 1.014 at the least. It doesn't (to my knowledge) compile with the D 2.0 compiler.
Jun 29 2007
prev sibling parent "Kristian Kilpi" <kjkilpi gmail.com> writes:
Great news! :)

There is happening so much with D right now that I can't keep up...


On Fri, 29 Jun 2007 17:08:37 +0300, Jarrett Billingsley  =

<kb3ctd2 yahoo.com> wrote:
 So I haven't made an announcement about MiniD on the newsgroups in a l=
ong
 time.  MiniD recently had its first birthday (since the initial  =
 inception of
 the idea.. it's since changed quite a bit from that), and appropriatel=
y
 version 1.0 is going to be out soon as a belated birthday present.

 The feature set has been frozen, so what features it has now are the 1=
.0
 spec.  The standard library is mostly solidified -- the transition to =
=
 Tango
 necessitated some changes in the IO model, but that's mostly been iron=
ed
 out.  About the only thing that's still in flux is the native API.

 The last big thing before the true 1.0 release is a Pyd-like binding  =
 library
 which makes it very easy to expose native D code to MiniD apps (and  =
 probably
 also functionality to make it easier to deal with MiniD code from the =
=
 native
 app).  A simple example of the binding looks a bit like this:

 WrapModule!
 (
     "foo",
     WrapFunc!(one),
     WrapFunc!(two),
     WrapFunc!(three)
 );

 This will create and register a MiniD module with three functions insi=
de =
 it.
 This module can then be imported and used from MiniD code with no issu=
e.
 The binding layer transparently translates between the native D types =
and
 the MiniD types; no special considerations (other than the use of
 convertible types for parameters and return values) have to be taken w=
hen
 writing the native code.

 Of course this is easy but not necessarily the most performant.  It's =
=
 great
 for quickly exposing functionality that wasn't designed for MiniD to y=
our
 scripts, but if you want the best performance, you can still write nat=
ive
 functions that are made to work with the language runtime.  The API is=
 really starting to come into its own, and virtually anything you can d=
o =
 in
 MiniD code, you can do in native code.

 Now that MiniD is Tango-based, I had another idea: use the Fiber class=
to
 allow native coroutines.  Until now, coroutines had to be script  =
 functions,
 as there's no way normally to suspend the execution of a native functi=
on.
 I've been playing around with Fiber, and I think it'll make native
 coroutines very doable.

 In any case, once the binding library is done, and with a bit of  =
 testing, I
 think I'll be able to call this 1.0!

 Oh, I suppose you all would like some links ;)  The main page is at
 http://www.dsource.org/projects/minid.  The forums are
 http://www.dsource.org/forums/viewforum.php?f=3D94, where many  =
 announcements
 are posted (and if you want to start some discussion, go right ahead).=
 Lastly I recently opened an IRC channel on freenode; it's called  =
 #d.minid.

 MiniD compiles with DMD 1.0 on Windows and Linux, and depends on the  =
 latest
 snapshot of Tango (not the latest stable release, the very
 bleeding-edging-est latest).  GDC is too old to compile it, so sorry M=
ac
 users.
Jun 29 2007