|Posted by Adam D. Ruppe|
in reply to Matt
On Thursday, 19 September 2013 at 00:38:30 UTC, Matt wrote:
It used to be a lot faster than Firefox and IE, but over the years, they have gotten a lot faster and dmdscript really hasn't.
Nowadays, the major browser js engines are much faster than dmdscript, and have gotten some new features that dmdscript lacks too.
That said, I played with dmdscript for a while so let me talk about that..
> As an aside, I've been made aware of the idea of embedding it in another program, but I don't have any experience of this, nor have I seen any examples\tutorials.
It is easier if you find a port to D2... but they have probably fallen out of date too. I did it myself a year or two ago and it wasn't too hard, but did take a little while.
hasn't been updated for a long time, but if you look at the file pretty.d, it might help see how I extended it: the addFunction near the bottom of the code has a template to automatically wrap native functions for script use, and registers them.
A couple other people did too:
...and another one but I can't remember the link or who did it. But I don't think any of them have been kept up to date too.
But I do still have a copy of the code on my computer:
So, if you want to extend dmdscript with D1, it isn't as pretty as with D2 but still doable. This is the basic process used in my D2 pretty.d port too:
> If someone could either explain how to go about this, or point me in the direction of decent examples\tutorials, I would be much appreciative.
eh my code isn't really great but it's a start.