Jump to page: 1 24  
Page
Thread overview
Announcing DMDScript for D!
Jan 19, 2005
Walter
Jan 19, 2005
Charles
Jan 19, 2005
Martijn
Jan 20, 2005
Walter
Jan 20, 2005
Walter
Jan 24, 2005
Paul Clinch
Jan 19, 2005
Martijn
Jan 20, 2005
Walter
Jan 21, 2005
Manfred Nowak
Jan 21, 2005
Walter
Jan 20, 2005
Kris
Jan 20, 2005
Walter
Jan 20, 2005
Kris
Jan 20, 2005
John Reimer
Jan 20, 2005
Norbert Nemec
Jan 20, 2005
Walter
Jan 20, 2005
Lionello Lunesu
Jan 20, 2005
Stewart Gordon
Jan 20, 2005
Walter
Jan 20, 2005
Lionello Lunesu
Jan 29, 2005
Kenny B
Jan 20, 2005
Walter
Jan 20, 2005
Ben Hinkle
Jan 20, 2005
Walter
Jan 20, 2005
Chris Sauls
Jan 21, 2005
Walter
Jan 23, 2005
Chris Sauls
Jan 23, 2005
Walter
Jan 23, 2005
Chris Sauls
Jan 24, 2005
Walter
January 19, 2005
At last, D now has its own scripting language, DMDScript! DMDScript is an implementation of the ECMA 262 scripting language (also known as javascript). The engine is written 100% in D, comes with full source code, and linkable libraries for Windows and linux. This means that any D application for which adding on scripting capability makes sense can now do it.

If you examine the D source for DMDScript, some remarkable characteristics are apparent. The first is how portable it is - almost zero versioning between Windows and linux builds. Next is how compact it is. Did you ever think a full, professional ECMA scripting engine could be expressed in so few lines of code? So what about performance, you might say? Doesn't compact code come at a price of slow performance?

Try the benchmarks yourself (sieve.ds and sieve.html), comparing DMDScript
(by running sieve.ds) with the scripting engine in your browser (by loading
sieve.html into your browser). Post the numbers here!

Isn't D, with all its compactness and expressiveness, necessarilly slower than C++? DMDScript in D is a translation from DMDScript in C++. The D version runs faster!

DMDScript in D provides a shakedown cruise for the D programming language, being a substantial, professional quality application, proving that D has what it takes to outperform C++ in both programmer productivity and resulting application efficiency.

DMDScript in D comes with open source under the GPL license. Licenses are available for purchase from Digital Mars for use in commercial, closed source applications.

-Walter
www.digitalmars.com/dscript/ DMDScript scripting engine in D!


January 19, 2005
> www.digitalmars.com/dscript/ DMDScript scripting engine in D!

Server down ?

Charlie


"Walter" <newshound@digitalmars.com> wrote in message news:csmgiq$bdr$1@digitaldaemon.com...
> At last, D now has its own scripting language, DMDScript! DMDScript is an implementation of the ECMA 262 scripting language (also known as javascript). The engine is written 100% in D, comes with full source code, and linkable libraries for Windows and linux. This means that any D application for which adding on scripting capability makes sense can now
do
> it.
>
> If you examine the D source for DMDScript, some remarkable characteristics are apparent. The first is how portable it is - almost zero versioning between Windows and linux builds. Next is how compact it is. Did you ever think a full, professional ECMA scripting engine could be expressed in so few lines of code? So what about performance, you might say? Doesn't
compact
> code come at a price of slow performance?
>
> Try the benchmarks yourself (sieve.ds and sieve.html), comparing DMDScript
> (by running sieve.ds) with the scripting engine in your browser (by
loading
> sieve.html into your browser). Post the numbers here!
>
> Isn't D, with all its compactness and expressiveness, necessarilly slower than C++? DMDScript in D is a translation from DMDScript in C++. The D version runs faster!
>
> DMDScript in D provides a shakedown cruise for the D programming language, being a substantial, professional quality application, proving that D has what it takes to outperform C++ in both programmer productivity and resulting application efficiency.
>
> DMDScript in D comes with open source under the GPL license. Licenses are available for purchase from Digital Mars for use in commercial, closed source applications.
>
> -Walter
> www.digitalmars.com/dscript/ DMDScript scripting engine in D!
>
>


January 19, 2005
Walter wrote:

> DMDScript in D comes with open source under the GPL license. Licenses are
> available for purchase from Digital Mars for use in commercial, closed
> source applications.

I didn't get too far:

make -f linux.mak
make: *** No rule to make target `testscript.o', needed by `ds'.  Stop.

So I added a rule for it:

dmd -c -O -release testscript.d
Error: Error reading file 'dmdscript/errmsgs.d'

Seems to be a few files missing from the zipfile ?
ftp://ftp.digitalmars.com/dmdscript.1.03.zip

--anders
January 19, 2005
Got the same message using dmd 0.110. You need dmd 0.111 to build dmd script. Although I built on Win32 so I am not sure about Linux.

Martijn.

Anders F Björklund wrote:
> Walter wrote:
> 
>> DMDScript in D comes with open source under the GPL license. Licenses are
>> available for purchase from Digital Mars for use in commercial, closed
>> source applications.
> 
> 
> I didn't get too far:
> 
> make -f linux.mak
> make: *** No rule to make target `testscript.o', needed by `ds'.  Stop.
> 
> So I added a rule for it:
> 
> dmd -c -O -release testscript.d
> Error: Error reading file 'dmdscript/errmsgs.d'
> 
> Seems to be a few files missing from the zipfile ?
> ftp://ftp.digitalmars.com/dmdscript.1.03.zip
> 
> --anders
January 19, 2005
Walter wrote:

> If you examine the D source for DMDScript, some remarkable characteristics
> are apparent. The first is how portable it is - almost zero versioning
> between Windows and linux builds. 

It needs a few extra additions to be portable beyond "linux", though :

* The makefile for Linux was missing lines, and works poor with GNU Make

> # Debug build
> #DFLAGS=-I.. -g
> 
> # Release build
> DFLAGS=-I.. -O -release

> # Makerules:
> %.o : %.d
> 	 $(DMD) -c $(DFLAGS) $<

* version (D_InlineAsm) should be used on asm{ }, with D alternatives.

> value.d:154: sorry, unimplemented: assembler statements are not supported yet

* Since version(Posix) is still missing, it fails outside Windows/Linux:

> dglobal.d:622: static assert  (0) is false

* Maybe it was obvious that it needs new DMD 0.111 features to compile ?

> value.d:531: function std.string.toString (bit b) does not match argument types (long,uint)
> value.d:531: Error: expected 1 arguments, not 2

> dstring.d:186: undefined identifier module utf.stride

> ddate.d:89: undefined identifier module date.toUTCString
> ddate.d:89: function expected before (), not 'void'
> ddate.d:89: cannot implicitly convert expression module date.toUTCString(t) of type int to char[]

* It seems to have some quirks with the GDC compiler, in general:

> dregexp.d: In member function `Get':
> dregexp.d:212: internal compiler error: Segmentation fault

> irstate.d:200: function gcc.builtins.__builtin_va_end (inout char*) does not match argument types (uint*)
> irstate.d:200: cannot implicitly convert expression ap of type uint* to char*
> irstate.d:200: cast(char*)(ap) is not an lvalue

Beyond that, it looks really good! Looking forward to Darwin support...

--anders
January 19, 2005
Somehow this post ended up in the wrong thread (can't trust computers).

As a first quick test see the outcome below. This is done on a Athlon 1.3GHz, 256Mb, WinXP SP2. Of course I had to change the 'print' statements to 'WScript.Echo' statements.

C:\opt\dmdscript>ds sieve.ds
Digital Mars DMDScript 1.03
www.digitalmars.com
Compiled by Digital Mars DMD D compiler
Copyright (c) 1999-2005 by Digital Mars
written by Walter Bright
1 source files
10 iterations

1899 primes
elapsed time = 260

C:\opt\dmdscript>cscript sieve.js
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

10 iterations


1899 primes

elapsed time = 721


C:\opt\dmdscript>
January 19, 2005
Martijn wrote:

>> dmd -c -O -release testscript.d
>> Error: Error reading file 'dmdscript/errmsgs.d'
>>
>> Seems to be a few files missing from the zipfile ?
>
> Got the same message using dmd 0.110. You need
> dmd 0.111 to build dmd script. Although I built
> on Win32 so I am not sure about Linux.

testscript.d has a dependancy on errmsgs.d, which
should have been in the Makefile. That file is then
auto-generated by the Make rules. And the extra DFLAGS
setting of -I.. was missing, to make it find dmdscript/

Found it out eventually... ("diff win32.mak linux.mak")

--anders
January 20, 2005
Ak. I always goof up something. I've attached a corrected linux.mak. BTW, errmsgs.d is created by textgen.d.


"Anders F Björklund" <afb@algonet.se> wrote in message news:csmova$mu9$1@digitaldaemon.com...
> Walter wrote:
>
> > DMDScript in D comes with open source under the GPL license. Licenses
are
> > available for purchase from Digital Mars for use in commercial, closed source applications.
>
> I didn't get too far:
>
> make -f linux.mak
> make: *** No rule to make target `testscript.o', needed by `ds'.  Stop.
>
> So I added a rule for it:
>
> dmd -c -O -release testscript.d
> Error: Error reading file 'dmdscript/errmsgs.d'
>
> Seems to be a few files missing from the zipfile ? ftp://ftp.digitalmars.com/dmdscript.1.03.zip
>
> --anders



January 20, 2005
3x faster! Woo-hoo!


"Martijn" <mvandenboogaard@gmail.com> wrote in message news:csmqju$ok1$2@digitaldaemon.com...
> Somehow this post ended up in the wrong thread (can't trust computers).
>
> As a first quick test see the outcome below. This is done on a Athlon 1.3GHz, 256Mb, WinXP SP2. Of course I had to change the 'print' statements to 'WScript.Echo' statements.
>
> C:\opt\dmdscript>ds sieve.ds
> Digital Mars DMDScript 1.03
> www.digitalmars.com
> Compiled by Digital Mars DMD D compiler
> Copyright (c) 1999-2005 by Digital Mars
> written by Walter Bright
> 1 source files
> 10 iterations
>
> 1899 primes
> elapsed time = 260
>
> C:\opt\dmdscript>cscript sieve.js
> Microsoft (R) Windows Script Host Version 5.6
> Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
>
> 10 iterations
>
>
> 1899 primes
>
> elapsed time = 721
>
>
> C:\opt\dmdscript>


January 20, 2005
In article <csmgiq$bdr$1@digitaldaemon.com>, Walter says...
>
>DMDScript in D provides a shakedown cruise for the D programming language, being a substantial, professional quality application, proving that D has what it takes to outperform C++ in both programmer productivity and resulting application efficiency.

Walter,

Did you intend to imply that all past efforts, written thus far in D, did not provide a "shakedown cruise"? Or are somehow not subtantial, professional-quality applications? Or did not already prove that D has what it takes ... ?

It's interesting to see you do something like this, but I'm more than a little surprised at the language utilized here -- it can rather easily be interpreted as "this is the first time anything of value has been done with D" ... followed by lots of big exclamation marks

I sure hope you didn't intent it to come off in this manner. There again, I suspect the vast majority of this newsgroup already /knows/ all of these things about D. What gives?


« First   ‹ Prev
1 2 3 4