www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - MiniD binding library update, better compilation on Linux

reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
Haven't posted any announcements about my project here in a while, so now's 
as good a time as any.

So since 1.0 came out in August, there have been a few major bugfixes, and 
it's now technically at 1.1 because of a breaking change in the code 
generation for class declarations to fix a supercall bug.  It's also had 
some standard library functionality added, and some more useful stuff added 
to the native API as well.

What I've been working on most recently is (1) getting the thing to compile 
right under Linux with DSSS, and (2) rewriting the binding library to work 
around DMDWin's symbol length issues (*shakes fist*).  Let's go through 
them:

1) Most of the "getting it to compile right under Linux" was actually "me 
figuring out how the hell to get DSSS, GDC, and Tango to play nice on my 
computer".  Once I'd done that, it wasn't too difficult.  What I got out of 
this:

- Don't use 'dsss net install minid'.  It works, but since it blindly grabs 
the newest repo revision, which I may have been messing with, you might 
accidentally check out a nonfunctional or beta-y build of the library.  Much 
better is for you to check out the MiniD trunk manually, then change into 
its dir and do a 'dsss build && dsss install' there.  I have the latest 
stable repo listed on the front wiki page of the MiniD DSource page (see 
link at bottom).  In fact, for DSSS users on Windows, you should probably 
use the same procedure.

- I have no idea how to get bu[il]d to work on Linux, with either GDC or 
DMD.  And especially not with Tango.  I'm just completely stumped there.

2) The binding library design I was using before was like Pyd's, where you 
specify module/class members as variadic template parameter lists.  This was 
bad news with DMDWin, as it uses the terribly limited OMF object format and 
wrapping any module or class with more than ten or so members caused it to 
fail miserably.  Now it uses a style much like the _old_ Pyd, where you have 
a sort of "module/object under construction" which you add members to one at 
a time using chained method calls.  Because the MiniD binding library wasn't 
that complex to begin with I didn't have to sacrifice any features, so 
everything's cool, it's just the syntax has changed.

Along with that change, I also added support for wrapping structs (which 
appear as classes on the MiniD side).  There's also a lot more documentation 
on this library.

The last bit of news is that I'm now working on MiniD 2, since the v1 spec 
is frozen.  The development will probably follow a very similar trajectory 
to D's -- v1 will be supported, and will have bugfixes and maybe stdlib 
additions, but no changes to the language itself, while MD2 will be a moving 
target until it, too, has its spec frozen.  You can see some of the ideas I 
have for MD2 at the bottom of the Introduction page of the wiki (and feel 
free to come up with suggestions of your own!).

The project page for MiniD is here:  http://www.dsource.org/projects/minid

There you'll find the language spec, MiniD stdlib docs, native API docs, 
installation instructions, and other links. 
Nov 18 2007
next sibling parent Robert Fraser <fraserofthenight gmail.com> writes:
Jarrett Billingsley Wrote:

 Haven't posted any announcements about my project here in a while, so now's 
 as good a time as any.
 
 So since 1.0 came out in August, there have been a few major bugfixes, and 
 it's now technically at 1.1 because of a breaking change in the code 
 generation for class declarations to fix a supercall bug.  It's also had 
 some standard library functionality added, and some more useful stuff added 
 to the native API as well.
 
 What I've been working on most recently is (1) getting the thing to compile 
 right under Linux with DSSS, and (2) rewriting the binding library to work 
 around DMDWin's symbol length issues (*shakes fist*).  Let's go through 
 them:
 
 1) Most of the "getting it to compile right under Linux" was actually "me 
 figuring out how the hell to get DSSS, GDC, and Tango to play nice on my 
 computer".  Once I'd done that, it wasn't too difficult.  What I got out of 
 this:
 
 - Don't use 'dsss net install minid'.  It works, but since it blindly grabs 
 the newest repo revision, which I may have been messing with, you might 
 accidentally check out a nonfunctional or beta-y build of the library.  Much 
 better is for you to check out the MiniD trunk manually, then change into 
 its dir and do a 'dsss build && dsss install' there.  I have the latest 
 stable repo listed on the front wiki page of the MiniD DSource page (see 
 link at bottom).  In fact, for DSSS users on Windows, you should probably 
 use the same procedure.
 
 - I have no idea how to get bu[il]d to work on Linux, with either GDC or 
 DMD.  And especially not with Tango.  I'm just completely stumped there.
 
 2) The binding library design I was using before was like Pyd's, where you 
 specify module/class members as variadic template parameter lists.  This was 
 bad news with DMDWin, as it uses the terribly limited OMF object format and 
 wrapping any module or class with more than ten or so members caused it to 
 fail miserably.  Now it uses a style much like the _old_ Pyd, where you have 
 a sort of "module/object under construction" which you add members to one at 
 a time using chained method calls.  Because the MiniD binding library wasn't 
 that complex to begin with I didn't have to sacrifice any features, so 
 everything's cool, it's just the syntax has changed.
 
 Along with that change, I also added support for wrapping structs (which 
 appear as classes on the MiniD side).  There's also a lot more documentation 
 on this library.
 
 The last bit of news is that I'm now working on MiniD 2, since the v1 spec 
 is frozen.  The development will probably follow a very similar trajectory 
 to D's -- v1 will be supported, and will have bugfixes and maybe stdlib 
 additions, but no changes to the language itself, while MD2 will be a moving 
 target until it, too, has its spec frozen.  You can see some of the ideas I 
 have for MD2 at the bottom of the Introduction page of the wiki (and feel 
 free to come up with suggestions of your own!).
 
 The project page for MiniD is here:  http://www.dsource.org/projects/minid
 
 There you'll find the language spec, MiniD stdlib docs, native API docs, 
 installation instructions, and other links. 
 

Nice! I'm considering using MiniD for a side project, and knowing it's in active development and integrates easily with D is important. I can't seem to find anything on MiniD 2 on the Wiki; where's the link?
Nov 19 2007
prev sibling next sibling parent reply Sebastian Beschke <s.beschke gmx.de> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'd like to thank you for your work on MiniD (and your quick responses
to requests).

MiniD is an important building block of my current project, and I've so
far found it very pleasant to work with. Once you get used to it and get
a hold of all the concepts, it's mostly a "simply works" experience.

If there's one thing MiniD lacks, it's a really comprehensive manual. I
find myself looking at the source code to find out what a certain method
really does. Still, large parts of the interface are fairly clear and
self-documenting.

Keep it up :)

- -Sebastian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHQvrsKb/1n5A2TAMRAtCxAJ4hDbKGCHjVdby0YtxVi7uG/vvJ1gCcC4rU
lYQsojDgIfAnpbUyK13llyc=
=th9v
-----END PGP SIGNATURE-----
Nov 20 2007
parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Sebastian Beschke" <s.beschke gmx.de> wrote in message 
news:fhuttd$uja$1 digitalmars.com...

 I'd like to thank you for your work on MiniD (and your quick responses
 to requests).

 MiniD is an important building block of my current project, and I've so
 far found it very pleasant to work with. Once you get used to it and get
 a hold of all the concepts, it's mostly a "simply works" experience.

:)
 If there's one thing MiniD lacks, it's a really comprehensive manual. I
 find myself looking at the source code to find out what a certain method
 really does. Still, large parts of the interface are fairly clear and
 self-documenting.

 Keep it up :)

I've been wanting to make an online "book" about MiniD similar to Ierusalimschy's "Programming in Lua". Of course, I just haven't had the time :\ But in the meantime, if you have any questions about the documentation, what a method does, how to do something etc. _please_, please post something on the forums. Nothing helps improve docs and code more than an extra pair of eyes :) (also, are you "skabet"?)
Nov 20 2007
parent Sebastian Beschke <s.beschke gmx.de> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jarrett Billingsley schrieb:
 (also, are you "skabet"?) 

I'm randomZ on the dsource forums. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHQygVKb/1n5A2TAMRArI1AJoDM8onfukDU0xJUxt3/J8VV2DmTwCfU6LW tXDpyeWMyLWGpNM6s8NADkc= =CCqF -----END PGP SIGNATURE-----
Nov 20 2007
prev sibling parent reply Dejan Lekic <dejan.lekic gmail.com> writes:
Will MiniD support as much as possible of the D standard? If not, what 
are the reasons why one should not use DMDScript instead? (I can guess 
only one - license)
Nov 22 2007
parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Dejan Lekic" <dejan.lekic gmail.com> wrote in message 
news:fi55nn$30pl$1 digitalmars.com...
 Will MiniD support as much as possible of the D standard?

MiniD's a scripting language in the vein of Lua and Squirrel. Beyond some basic syntactic and semantic similarities to D, it bears little resemblance to it.
 If not, what are the reasons why one should not use DMDScript instead? (I 
 can guess only one - license)

Even DMDScript has nothing to do with D. For that matter, I have no idea why it's called DMDScript. Because the D version is compiled with DMD? Who knows. It's an implementation of ECMAScript (JavaScript). DMDScript is fine if you're making a DOM compatible web browser and not much else. As you've mentioned, the license is an issue. The native API is extremely basic. ECMAScript itself is not often used outside of web scripting mostly because it's sort of a vanilla language with not many features. MiniD as a language has a much richer set of features compared to ECMAScript. The reference implementation has also been designed from the ground up to be truly integrated with D: it uses D's exceptions, D's GC, makes heavy use of templates, and is object-oriented. No other scripting language implementation (even DMDScript) can make those claims when it comes to D.
Nov 22 2007
parent reply Dejan Lekic <dejan.lekic gmail.com> writes:
Actually, if DMDScript was "open", I would never, ever think about using 
anything else for scripting in my applications. Simply because it works 
perfectly together with D.
Second candidate is DLua, of course.
Nov 23 2007
parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Dejan Lekic" <dejan.lekic gmail.com> wrote in message 
news:fi6ekc$21qf$1 digitalmars.com...
 Actually, if DMDScript was "open", I would never, ever think about using 
 anything else for scripting in my applications. Simply because it works 
 perfectly together with D.
 Second candidate is DLua, of course.

No offense, but did you read my post? DMDScript's D API is pretty terrible compared to MiniD's. MiniD is the on that works perfectly together with D.
Nov 23 2007
parent Alan Knowles <alan akbkhome.com> writes:
Jarrett Billingsley wrote:
 "Dejan Lekic" <dejan.lekic gmail.com> wrote in message 
 news:fi6ekc$21qf$1 digitalmars.com...
 Actually, if DMDScript was "open", I would never, ever think about using 
 anything else for scripting in my applications. Simply because it works 
 perfectly together with D.
 Second candidate is DLua, of course.

No offense, but did you read my post? DMDScript's D API is pretty terrible compared to MiniD's. MiniD is the on that works perfectly together with D.

DMDScript just needs a bit of love: - example of binding code for Phobos to DMDScript: http://www.akbkhome.com/svn/gtkDS/wrap/APILookupPhobos.txt - Adding objects (a bit outdated as the code generator does all the work for you) http://www.akbkhome.com/blog.php/View/138/dmdscript__the_EMCAScript_javascript_engine_in_D__adding_objects.html It's an odd balance for new languages, For all it's woes DMDScript implements a known language (so no relearning, or remembering another languages libraries or quirks) Adding stuff to DMDScript is pretty quick now, - Hopefully some kind of System.exec()) and libtidy binding should be done next week. Regards Alan
 
 

Nov 23 2007