Re: DMDScript
On Monday, 14 July 2014 at 21:22:12 UTC, Jason King wrote: My idea is to use (at least test) DMDScript for server side JS. I don't mean to sound like a D-hater here, but V8 has had about 2 years more work on it than DMDScript. At one time they were. IIRC, quite close performance-wise but lots of work and support by Google have probably levered past the advantages of being coded in D. My 2c only. I'm tinkering around with the original dmdscript a little bit, but it seems tedious. Even if V8 is better, I'd like to see, if I can get a proof of concept together at least, using vibe.d and dmdscript.
Re: DMDScript
On Sunday, 13 July 2014 at 07:18:38 UTC, Jason King wrote: On Friday, 11 July 2014 at 15:45:42 UTC, Chris wrote: Tried to compile on linux, got this error message (I guess I can fix it): dmd -c textgen.d textgen.d(36): Error: cannot implicitly convert expression (DMDScript fatal runtime error: ) of type string to char[] .. bunch more errors. You might try https://github.com/DmitryOlshansky/DMDScript which, according to it's notes has changes to make it compatible with D2. Just tried this. First, I had to replace import std.ctype; with import core.stdc.ctype. No big deal, but now I get this make -fposix.mak dmd -lib -O -release -inline -d dmdscript/darguments.d dmdscript/darray.d dmdscript/dboolean.d dmdscript/ddate.d dmdscript/ddeclaredfunction.d dmdscript/derror.d dmdscript/dfunction.d dmdscript/dglobal.d dmdscript/dmath.d dmdscript/dnative.d dmdscript/dnumber.d dmdscript/dobject.d dmdscript/dregexp.d dmdscript/dstring.d dmdscript/errmsgs.d dmdscript/expression.d dmdscript/functiondefinition.d dmdscript/identifier.d dmdscript/ir.d dmdscript/irstate.d dmdscript/iterator.d dmdscript/lexer.d dmdscript/opcodes.d dmdscript/parse.d dmdscript/program.d dmdscript/property.d dmdscript/date.d dmdscript/dateparse.d dmdscript/datebase.d dmdscript/protoerror.d dmdscript/RandAA.d dmdscript/scopex.d dmdscript/outbuffer.d dmdscript/script.d dmdscript/statement.d dmdscript/symbol.d dmdscript/text.d dmdscript/regexp.d dmdscript/threadcontext.d dmdscript/utf.d dmdscript/value.d dmdscript/extending.d -ofdmdscriptlib.a dmdscript/dregexp.d(487): Error: function dmdscript.dregexp.Dregexp.Call multiple overrides of same function dmdscript/dobject.d(47): Error: cannot take address of thread-local variable foo at compile time make: *** [dmdscriptlib.a] Error 1 My idea is to use (at least test) DMDScript for server side JS.
Re: DMDScript
My idea is to use (at least test) DMDScript for server side JS. I don't mean to sound like a D-hater here, but V8 has had about 2 years more work on it than DMDScript. At one time they were. IIRC, quite close performance-wise but lots of work and support by Google have probably levered past the advantages of being coded in D. My 2c only.
Re: DMDScript
On 07/11/2014 08:45 AM, Chris wrote: Tried to compile on linux, got this error message (I guess I can fix it): dmd -c textgen.d textgen.d(36): Error: cannot implicitly convert expression (DMDScript fatal runtime error: ) of type string to char[] Here is the relevant parts: struct Msgtable { char[] name; int value; char[] ident; } Msgtable errtable[] = [ { DMDScript fatal runtime error: , 0, ERR_RUNTIME_PREFIX }, // ... ] DMDScript was probably written for D1 and has never been ported to more recent D. Ali
Re: DMDScript
On Friday, 11 July 2014 at 15:45:42 UTC, Chris wrote: Tried to compile on linux, got this error message (I guess I can fix it): dmd -c textgen.d textgen.d(36): Error: cannot implicitly convert expression (DMDScript fatal runtime error: ) of type string to char[] .. bunch more errors. You might try https://github.com/DmitryOlshansky/DMDScript which, according to it's notes has changes to make it compatible with D2.
DMDScript
Tried to compile on linux, got this error message (I guess I can fix it): dmd -c textgen.d textgen.d(36): Error: cannot implicitly convert expression (DMDScript fatal runtime error: ) of type string to char[] textgen.d(36): Error: cannot implicitly convert expression (0) of type int to char[] textgen.d(36): Error: cannot implicitly convert expression (ERR_RUNTIME_PREFIX) of type string to char[] textgen.d(37): Error: cannot implicitly convert expression (No default value for COM object) of type string to char[] textgen.d(37): Error: cannot implicitly convert expression (0) of type int to char[] textgen.d(37): Error: cannot implicitly convert expression (ERR_COM_NO_DEFAULT_VALUE) of type string to char[] textgen.d(38): Error: cannot implicitly convert expression (%s does not have a [[Construct]] property) of type string to char[] textgen.d(38): Error: cannot implicitly convert expression (0) of type int to char[] textgen.d(38): Error: cannot implicitly convert expression (ERR_COM_NO_CONSTRUCT_PROPERTY) of type string to char[] textgen.d(39): Error: cannot implicitly convert expression (argument type mismatch for %s) of type string to char[] textgen.d(39): Error: cannot implicitly convert expression (0) of type int to char[] textgen.d(39): Error: cannot implicitly convert expression (ERR_DISP_E_TYPEMISMATCH) of type string to char[] textgen.d(40): Error: cannot implicitly convert expression (wrong number of arguments for %s) of type string to char[] textgen.d(40): Error: cannot implicitly convert expression (0) of type int to char[] textgen.d(40): Error: cannot implicitly convert expression (ERR_DISP_E_BADPARAMCOUNT) of type string to char[] textgen.d(41): Error: cannot implicitly convert expression (%s Invoke() fails with COM error %x) of type string to char[] textgen.d(41): Error: cannot implicitly convert expression (0) of type int to char[] textgen.d(41): Error: cannot implicitly convert expression (ERR_COM_FUNCTION_ERROR) of type string to char[] textgen.d(42): Error: cannot implicitly convert expression (Dcomobject: %s.%s fails with COM error %x) of type string to char[] textgen.d(42): Error: cannot implicitly convert expression (0) of type int to char[] textgen.d(42): Error: cannot implicitly convert expression (ERR_COM_OBJECT_ERROR) of type string to char[] linux.mak:178: recipe for target 'textgen.o' failed make: *** [textgen.o] Error 1
RE: dmdscript osx.mak
Hi Robert and Dmitry, Thanks for your replies and the heads up on the current status of DMDScript! Josh
dmdscript osx.mak
Hello, I apologize if this is the wrong forum to post this question, but I couldn't find a corresponding learn mailing list for DMDScript. I wanted to play around with DMDScript but cant seem to get started. I downloaded the source and attempted to make it via: $ make -f osx.mak But I get the following error: textgen.d(132): Error: cannot implicitly convert expression ~ some string ~ of type string to char[] Am I doing the right thing? Or how do I go about getting building 'ds' so I can run simpleton scripts? Josh
Re: dmdscript osx.mak
On 18/06/2011 07:35, Joshua Niehus wrote: Hello, I apologize if this is the wrong forum to post this question, but I couldn't find a corresponding learn mailing list for DMDScript. I wanted to play around with DMDScript but cant seem to get started. I downloaded the source and attempted to make it via: $ make -f osx.mak But I get the following error: textgen.d(132): Error: cannot implicitly convert expression ~ some string ~ of type string to char[] Am I doing the right thing? Or how do I go about getting building 'ds' so I can run simpleton scripts? Josh dmdscript is designed for D1, you're using D2. Someone has updated dmdscript for D2, there's an announcement on digitalmars.D.announce about it somewhere. Using that version will fix your issues. -- Robert http://octarineparrot.com/
Re: dmdscript osx.mak
On 18/06/2011 21:50, Robert Clipsham wrote: On 18/06/2011 07:35, Joshua Niehus wrote: Hello, I apologize if this is the wrong forum to post this question, but I couldn't find a corresponding learn mailing list for DMDScript. I wanted to play around with DMDScript but cant seem to get started. I downloaded the source and attempted to make it via: $ make -f osx.mak But I get the following error: textgen.d(132): Error: cannot implicitly convert expression ~ some string ~ of type string to char[] Am I doing the right thing? Or how do I go about getting building 'ds' so I can run simpleton scripts? Josh dmdscript is designed for D1, you're using D2. Someone has updated dmdscript for D2, there's an announcement on digitalmars.D.announce about it somewhere. Using that version will fix your issues. http://dsource.org/projects/dmdscript-2/wiki = there you go. I should probably note that if you plan on doing anything serious, you'd be better off writing a D wrapper for V8 or one of the other modern javascript engines. -- Robert http://octarineparrot.com/
Re: dmdscript osx.mak
On 18.06.2011 10:35, Joshua Niehus wrote: Hello, I apologize if this is the wrong forum to post this question, but I couldn't find a corresponding learn mailing list for DMDScript. I wanted to play around with DMDScript but cant seem to get started. I downloaded the source and attempted to make it via: $ make -f osx.mak But I get the following error: textgen.d(132): Error: cannot implicitly convert expression ~ some string ~ of type string to char[] Am I doing the right thing? Or how do I go about getting building 'ds' so I can run simpleton scripts? Josh It's pretty much like Robert says: original source for DMDscript is for D1 and wasn't update for quite some time. Still the D2 port should work with no problems. And even though I did it in the first place, the only benefit of it right now is that it's written in D and thus could be integrated with D projects slightly better. Still if you are up for some hacking give it a try. As for speed, yeah, it's something like around 20-200x slower at various workloads (e.g. numerics in JavaScript and such), so wouldn't recommend if you have performance in mind. -- Dmitry Olshansky