Re: DMDScript now under Boost license

2010-04-02 Thread Bernard Helyer
On 31/03/10 13:34, Adam Ruppe wrote: All right, now I'm actually done for the day. Updated the zip at the link: http://arsdnet.net/dcode/dmdscript_d2.zip To add a pretty interface (pretty.d). It is incomplete, but works to play with. test.d is an example of how to use it. auto se = new

Re: DMDScript now under Boost license

2010-03-31 Thread Philippe Sigaud
On Wed, Mar 31, 2010 at 21:21, Adam D. Ruppe wrote: > On Wed, Mar 31, 2010 at 09:03:10PM +0200, Philippe Sigaud wrote: > > Cool, I wasn't sure it'd work. Now we know what this new trait is for :) > > It is slightly different than my old code: the getPlainName helper function > is not required with

Re: DMDScript now under Boost license

2010-03-31 Thread Adam D. Ruppe
On Wed, Mar 31, 2010 at 09:03:10PM +0200, Philippe Sigaud wrote: > Cool, I wasn't sure it'd work. Now we know what this new trait is for :) It is slightly different than my old code: the getPlainName helper function is not required with the __trait. (It truncated the string at the first paren, sin

Re: DMDScript now under Boost license

2010-03-31 Thread Philippe Sigaud
On Wed, Mar 31, 2010 at 20:22, Adam D. Ruppe wrote: > On Wed, Mar 31, 2010 at 08:06:11PM +0200, Philippe Sigaud wrote: > > enum string scriptName = getPlainName!(__traits(identifier, T)); > > Outstanding! That did it. > > Cool, I wasn't sure it'd work. Now we know what this new trait is for :)

Re: DMDScript now under Boost license

2010-03-31 Thread Adam D. Ruppe
On Wed, Mar 31, 2010 at 08:06:11PM +0200, Philippe Sigaud wrote: > enum string scriptName = getPlainName!(__traits(identifier, T)); Outstanding! That did it. I'll update the zip on my website at the end of the day. I now have wrapping of exceptions from script/native set up too. When I have the

Re: DMDScript now under Boost license

2010-03-31 Thread Philippe Sigaud
On Wed, Mar 31, 2010 at 02:34, Adam Ruppe wrote: > All right, now I'm actually done for the day. > > Updated the zip at the link: > http://arsdnet.net/dcode/dmdscript_d2.zip > >se.addFunction!(fun, "fun"); // adding D functions is just giving > the names. the second arg is required since

Re: DMDScript now under Boost license

2010-03-31 Thread bearophile
> What I think I'd like in D is something like this, but I think there's no > need to use JavaScript for this, it can be used just D code: > https://developer.mozilla.org/en/Treehydra This page explains what Treehydra is: https://developer.mozilla.org/En/Treehydra_Manual >Treehydra is meant to b

Re: DMDScript now under Boost license

2010-03-30 Thread Adam Ruppe
All right, now I'm actually done for the day. Updated the zip at the link: http://arsdnet.net/dcode/dmdscript_d2.zip To add a pretty interface (pretty.d). It is incomplete, but works to play with. test.d is an example of how to use it. auto se = new ScriptEngine; se.addFunction!(

Re: DMDScript now under Boost license

2010-03-30 Thread Eric Poggel
On 3/22/2010 3:30 AM, Walter Bright wrote: http://www.digitalmars.com/dscript/index.html Much appreciated! Also wondering how its performance compares against V8.

Re: DMDScript now under Boost license

2010-03-30 Thread Adam Ruppe
On 3/29/10, Robert Clipsham wrote: > I seem to recall it is, and a fairly old D1 at that... You could always > update it and send a patch Walter's way, see if he accepts it :) Walter seems to have fixed it up the the new D1; it compiled there. And I just spent the day making a port to D2. There'

Re: DMDScript now under Boost license

2010-03-29 Thread bearophile
Walter Bright: > I thought about that a lot, but CTFE seems to fill that gap well enough. CTFE works at compile-time, while people add scripting languages like Python, JavaScript, Groovy, Jpython, Jruby, etc, to run-time C/C++/Java code for other purposes. For example games are often written in

Re: DMDScript now under Boost license

2010-03-29 Thread strtr
Walter Bright Wrote: > strtr wrote: > > Scripting in de form of a dialect/subset of D in the std/language. > > I don't know enough about scripting to say anything specific/useful. > > It's just that if scripting were part of D, I would have used it already > > where the possibilities mentioned by

Re: DMDScript now under Boost license

2010-03-29 Thread Walter Bright
strtr wrote: Scripting in de form of a dialect/subset of D in the std/language. I don't know enough about scripting to say anything specific/useful. It's just that if scripting were part of D, I would have used it already where the possibilities mentioned by Robert Clipsham just look that much b

Re: DMDScript now under Boost license

2010-03-29 Thread strtr
Walter Bright Wrote: > strtr wrote: > > Walter Bright Wrote: > > > >> http://www.digitalmars.com/dscript/index.html > > > > Would it be possible to have some sort of scripting as part of D? > > What did you have in mind? Scripting in de form of a dialect/subset of D in the std/language. I don'

Re: DMDScript now under Boost license

2010-03-29 Thread Robert Clipsham
On 29/03/10 20:07, Adam D. Ruppe wrote: On Mon, Mar 29, 2010 at 07:45:39PM +0100, Robert Clipsham wrote: You could always write a nice wrapper function/template which automatically does all that guff for you :) If you do, I'm sure Walter wouldn't mind adding it into dmdscript providing you licen

Re: DMDScript now under Boost license

2010-03-29 Thread Adam D. Ruppe
On Mon, Mar 29, 2010 at 07:45:39PM +0100, Robert Clipsham wrote: > You could always write a nice wrapper function/template which > automatically does all that guff for you :) If you do, I'm sure Walter > wouldn't mind adding it into dmdscript providing you license it > appropriately :) Yup, tha

Re: DMDScript now under Boost license

2010-03-29 Thread Robert Clipsham
On 29/03/10 19:30, Adam D. Ruppe wrote: On Mon, Mar 29, 2010 at 06:49:35PM +0100, Robert Clipsham wrote: I haven't played with dmdscript, but I'd guess there's a simple way to expose D functions to it. It isn't terribly complex, but it is a bit wordy. The docs are here: http://www.digitalmars.

Re: DMDScript now under Boost license

2010-03-29 Thread Adam D. Ruppe
On Mon, Mar 29, 2010 at 06:49:35PM +0100, Robert Clipsham wrote: > I haven't played with dmdscript, but > I'd guess there's a simple way to expose D functions to it. It isn't terribly complex, but it is a bit wordy. The docs are here: http://www.digitalmars.com/dscript/extending.html You have to

Re: DMDScript now under Boost license

2010-03-29 Thread Robert Clipsham
On 29/03/10 18:41, Adam Ruppe wrote: I think it would be pretty great if you could add functions, etc., to the scripting language with a simple one liner: mixin makeAccessibleFromScript!(scriptEngine, foo); You can do with with MiniD, LuaD, PyD, Monster, and possibly others to allow you to sc

Re: DMDScript now under Boost license

2010-03-29 Thread Adam Ruppe
I think it would be pretty great if you could add functions, etc., to the scripting language with a simple one liner: mixin makeAccessibleFromScript!(scriptEngine, foo); Or something similar. The template there could mix in a wrapper function for whatever foo() happens to be, and register it with

Re: DMDScript now under Boost license

2010-03-28 Thread Walter Bright
strtr wrote: Walter Bright Wrote: http://www.digitalmars.com/dscript/index.html Would it be possible to have some sort of scripting as part of D? What did you have in mind?

Re: DMDScript now under Boost license

2010-03-28 Thread strtr
Walter Bright Wrote: > http://www.digitalmars.com/dscript/index.html Would it be possible to have some sort of scripting as part of D?

Re: DMDScript now under Boost license

2010-03-26 Thread Walter Bright
Walter Bright wrote: http://www.digitalmars.com/dscript/index.html Now on reddit! http://www.reddit.com/r/programming/comments/biufj/javascript_engine_released_under_boost_license/

Re: DMDScript now under Boost license

2010-03-22 Thread Bernard Helyer
On 22/03/10 20:30, Walter Bright wrote: http://www.digitalmars.com/dscript/index.html Oh wow, awesome!

Re: DMDScript now under Boost license

2010-03-22 Thread Lutger
Thank you. Under svn there is both the gpl and boost license files, and no indication which is the right one. Could you remove gpl.txt to avoid confusion?

DMDScript now under Boost license

2010-03-22 Thread Walter Bright
http://www.digitalmars.com/dscript/index.html