Thread overview | |||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 06, 2002 Dr. Dobb's and the D Programming Language | ||||
---|---|---|---|---|
| ||||
D made the cover of February Dr. Dobbs! www.ddj.com |
January 07, 2002 Re: Dr. Dobb's and the D Programming Language | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Walter a écrit :
> D made the cover of February Dr. Dobbs!
>
> www.ddj.com
Aoouuo !
Roland
|
January 09, 2002 Re: Dr. Dobb's and the D Programming Language | ||||
---|---|---|---|---|
| ||||
Posted in reply to Roland | Roland wrote:
> Walter a écrit :
>
> > D made the cover of February Dr. Dobbs!
> >
> > www.ddj.com
>
> Aoouuo !
>
> Roland
A concise, well-written article. Congrats!
I only wish it were twice as long, and mentioned the existence of the alpha version compiler!
-BobC
|
January 11, 2002 DDJ, D, XML, HTML, ECMAScript, DOM, etc., etc. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Walter wrote: > D made the cover of February Dr. Dobbs! > > www.ddj.com How do you think I found out about it? 8-) Greetings, everyone. I must say the concepts D brings about are really quite interesting. I come from a background of web design, and my own book, the JavaScript Developer's Dictionary, should be on shelves in a couple months. I'm fairly active in the Mozilla.org project as well, and I tinker around and study the WWW all the time. So maybe I can bring an outsider's perspective to all this. First off, let me point out one particular misconception on the D web site. The <code>...</code> tag, like many HTML elements, provides little more than stylistic appearance. It is NOT meant to contain live code, only examples thereof. The more appropriate element would be <object>...</object>. If you intend the code to be interpreted, perhaps a <script type="application/x-d">...</script> element would be appropriate. XML can handle scripting easily: we simply use an <html:script>...</html:script> element. The "html" part is an XML namespace. I do not know how they relate to D or C++ namespaces. But we typically define an XML namespace by using the prefix as a local name for an "xmlns" namespace: <root xmlns="http://digitalmars/xml-namespaces/root" xmlns:html="http://www.w3.org/1999/xhtml" > <html:script type="text/javascript"> alert("Hello World") </html:script> </root> Similarly, you could use <html:object><html:param /></html:object> elements if you decided not to go the scripting route. XML also allows the use of processing instructions <?target data ?>, where target identifies the program supposed to execute the code. PHP, for instance, uses <?php ?> (when you have the short form disabled). The data, for PHP anyway, indicates the code to execute. Now, for a change of subject. ECMAScript, popularly known by its Netscape-trademarked name JavaScript, and the W3C Document Object Model, are two of my favorite subjects. (I wrote a whole book on them, and I still learn new facts quite often.) I of course like the idea of mixing programming / scripting and markup languages together. I alluded to using D as a scripting language for (X)HTML pages earlier. I wonder if anyone has a working example of this I could see. I'll tell you, from a JavaScript developer's perspective, the concept of contracts just blew me away. I'm very very impressed by that, and it's one thing I already wish JavaScript could support easily. Alas... Personally, I'd go absolutely bonkers if someone could write an ECMAScript-compatible engine, like Mozilla.org's JavaScript1.5 beta engine. I don't know if you guys have been able to write a D compiler in D yet (I understand break-even is a very significant milestone), but if C++ can handle interpretation of another language... Of course, this whole paragraph is pipe dream stuff for a language whose compiler is in the alpha stage. Likewise, I'd love to see a DOM implemetation as well one day. That would require translating from the W3C DOM, particularly the IDL. Even if it's just determining the object tree, it'd be beautiful. Am I insane to mention these things here, now? Probably. Do I understand what you guys talk about? Somewhat. Would I be able to help you in the development of the D language? Only if it was in QA, most likely. Am I interested in this project? You betcha. I've got my hands in a couple dozen other projects, but I do want to follow this one, at least peripherally. I'll watch this thread for a few days, see what you guys think, and I'll keep in touch. I hope I haven't insulted your intelligences with the above comments. Bottom line is I like what I see, and I'd love to support you guys in building this language. (No, not with money. I don't have any.) Alex Vincent Vallejo, CA |
January 11, 2002 Re: DDJ, D, XML, HTML, ECMAScript, DOM, etc., etc. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alex Vincent | "Alex Vincent" <jscript@pacbell.net> wrote in message news:3C3E994B.7020806@pacbell.net... > First off, let me point out one particular misconception on the D web site. The <code>...</code> tag, like many HTML elements, provides little more than stylistic appearance. It is NOT meant to contain live code, only examples thereof. The more appropriate element would be <object>...</object>. If you intend the code to be interpreted, perhaps a <script type="application/x-d">...</script> element would be appropriate. It's not intended to be interpreted - D is not a scripting language for Web. I believe it was introduced to allow writing of commented, syntax-colored samples, probably even with embedded diagrams and screenies, but still compileable. Usually you get two files - one .html and one with the source. Now, you get one .html which you can compile. > Personally, I'd go absolutely bonkers if someone could write an ECMAScript-compatible engine, like Mozilla.org's JavaScript1.5 beta engine. I don't know if you guys have been able to write a D compiler in D yet (I understand break-even is a very significant milestone), but if C++ can handle interpretation of another language... Of course, this whole paragraph is pipe dream stuff for a language whose compiler is in the alpha stage. This is an interesting idea. Some other D features (like slicing) could also be used in ECMAScript-compatible language (DScript?). Definitely, this is not something to happen in near future... > Am I insane to mention these things here, now? Probably. Do I understand what you guys talk about? Somewhat. Would I be able to help you in the development of the D language? Only if it was in QA, most likely. You can share your ideas. Contribute code, sample programs. Translate APIs =)... |
January 11, 2002 D and XML (was: DDJ, D, XML, HTML, ECMAScript, DOM, etc., etc.) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alex Vincent | I too heard about D through the Dr. Dobbs article and was interested enough to checkout the website. The embeded HTML stuff reminded me of a random thought I had a while ago: rather than just put D source code inside of <code> and use HTML constructs like <font> and <br> for "pretty printing", why not make the whole thing XML? I haven't thought about this in near enough detail (remember, a "random thought") to say how it would work for everything, but the basic idea is that instead of writing HTML code like <code> void hello(int times) { int i; for (i = 0; i<times; i++) { printf("Hello World!\n"); } } </code> you would instead write XML something like <d:function name="hello" type="void"> <d:arg name="times" type="int" /> <d:var name="i" type="int" /> <dkwd:for init="i=0" test="i<times"; incr="i++"> <d:call name="printf"> <d:param value="Hello World!\n" type="string" /> </d:call> </dkwd:for> </d:function> With everything in XML you can use two different XSLT transforms: one to generate D code to feed to the compiler, and another to generate HTML for documentation. Dan "Alex Vincent" <jscript@pacbell.net> wrote in message news:3C3E994B.7020806@pacbell.net... > Walter wrote: > > D made the cover of February Dr. Dobbs! > > > > www.ddj.com > > How do you think I found out about it? 8-) > > Greetings, everyone. I must say the concepts D brings about are really quite interesting. I come from a background of web design, and my own book, the JavaScript Developer's Dictionary, should be on shelves in a couple months. I'm fairly active in the Mozilla.org project as well, and I tinker around and study the WWW all the time. > > So maybe I can bring an outsider's perspective to all this. > > First off, let me point out one particular misconception on the D web site. The <code>...</code> tag, like many HTML elements, provides little more than stylistic appearance. It is NOT meant to contain live code, only examples thereof. The more appropriate element would be <object>...</object>. If you intend the code to be interpreted, perhaps a <script type="application/x-d">...</script> element would be appropriate. > > XML can handle scripting easily: we simply use an <html:script>...</html:script> element. The "html" part is an XML namespace. I do not know how they relate to D or C++ namespaces. But we typically define an XML namespace by using the prefix as a local name for an "xmlns" namespace: > > <root xmlns="http://digitalmars/xml-namespaces/root" > xmlns:html="http://www.w3.org/1999/xhtml" > > > <html:script type="text/javascript"> > alert("Hello World") > </html:script> > </root> > > Similarly, you could use <html:object><html:param /></html:object> elements if you decided not to go the scripting route. > > XML also allows the use of processing instructions <?target data ?>, where target identifies the program supposed to execute the code. PHP, for instance, uses <?php ?> (when you have the short form disabled). The data, for PHP anyway, indicates the code to execute. > > Now, for a change of subject. ECMAScript, popularly known by its Netscape-trademarked name JavaScript, and the W3C Document Object Model, are two of my favorite subjects. (I wrote a whole book on them, and I still learn new facts quite often.) I of course like the idea of mixing programming / scripting and markup languages together. > > I alluded to using D as a scripting language for (X)HTML pages earlier. > I wonder if anyone has a working example of this I could see. I'll > tell you, from a JavaScript developer's perspective, the concept of > contracts just blew me away. I'm very very impressed by that, and it's > one thing I already wish JavaScript could support easily. Alas... > > Personally, I'd go absolutely bonkers if someone could write an ECMAScript-compatible engine, like Mozilla.org's JavaScript1.5 beta engine. I don't know if you guys have been able to write a D compiler in D yet (I understand break-even is a very significant milestone), but if C++ can handle interpretation of another language... Of course, this whole paragraph is pipe dream stuff for a language whose compiler is in the alpha stage. > > Likewise, I'd love to see a DOM implemetation as well one day. That would require translating from the W3C DOM, particularly the IDL. Even if it's just determining the object tree, it'd be beautiful. > > Am I insane to mention these things here, now? Probably. Do I understand what you guys talk about? Somewhat. Would I be able to help you in the development of the D language? Only if it was in QA, most likely. > > Am I interested in this project? You betcha. I've got my hands in a couple dozen other projects, but I do want to follow this one, at least peripherally. > > I'll watch this thread for a few days, see what you guys think, and I'll keep in touch. I hope I haven't insulted your intelligences with the above comments. Bottom line is I like what I see, and I'd love to support you guys in building this language. (No, not with money. I don't have any.) > > Alex Vincent > Vallejo, CA > |
January 12, 2002 Re: DDJ, D, XML, HTML, ECMAScript, DOM, etc., etc. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alex Vincent | "Alex Vincent" <jscript@pacbell.net> wrote in message news:3C3E994B.7020806@pacbell.net... > First off, let me point out one particular misconception on the D web site. The <code>...</code> tag, like many HTML elements, provides little more than stylistic appearance. It is NOT meant to contain live code, only examples thereof. The more appropriate element would be <object>...</object>. If you intend the code to be interpreted, perhaps a <script type="application/x-d">...</script> element would be appropriate. I did some research on this originally, and could find no official way of doing it. The <code> tag seemed like a good idea at the time. > XML can handle scripting easily: we simply use an <html:script>...</html:script> element. The "html" part is an XML namespace. I do not know how they relate to D or C++ namespaces. But we typically define an XML namespace by using the prefix as a local name for an "xmlns" namespace: > > <root xmlns="http://digitalmars/xml-namespaces/root" > xmlns:html="http://www.w3.org/1999/xhtml" > > > <html:script type="text/javascript"> > alert("Hello World") > </html:script> > </root> > > Similarly, you could use <html:object><html:param /></html:object> elements if you decided not to go the scripting route. > > XML also allows the use of processing instructions <?target data ?>, where target identifies the program supposed to execute the code. PHP, for instance, uses <?php ?> (when you have the short form disabled). The data, for PHP anyway, indicates the code to execute. I am clueless when it comes to XML ... > Now, for a change of subject. ECMAScript, popularly known by its Netscape-trademarked name JavaScript, and the W3C Document Object Model, are two of my favorite subjects. (I wrote a whole book on them, and I still learn new facts quite often.) I of course like the idea of mixing programming / scripting and markup languages together. I'm very familiar with ECMAScript, as I've written an implementation of it. It runs 10-20x faster than JavaScript. <g> > I alluded to using D as a scripting language for (X)HTML pages earlier. > I wonder if anyone has a working example of this I could see. I'll > tell you, from a JavaScript developer's perspective, the concept of > contracts just blew me away. I'm very very impressed by that, and it's > one thing I already wish JavaScript could support easily. Alas... I don't think D is suitable as a scripting language (I can get into why if you want). > Personally, I'd go absolutely bonkers if someone could write an ECMAScript-compatible engine, like Mozilla.org's JavaScript1.5 beta engine. Already done. I can send you an executable for it next week, and am looking for customers for it. It's a clean room implementation, so no IP problems, and includes Microsoft jscript extensions. It even can be plugged into Explorer. > I don't know if you guys have been able to write a D compiler > in D yet (I understand break-even is a very significant milestone), No, it's in bootstrap mode in C++. |
January 12, 2002 Re: D and XML (was: DDJ, D, XML, HTML, ECMAScript, DOM, etc., etc.) | ||||
---|---|---|---|---|
| ||||
Posted in reply to J. Daniel Smith | "J. Daniel Smith" <j_daniel_smith@deja.com> wrote in message news:a1n5rl$2g9q$1@digitaldaemon.com... >I haven't thought about this in near enough detail (remember, a > "random thought") to say how it would work for everything, but the basic > idea is that instead of writing HTML code like > <code> > void hello(int times) > { > int i; > for (i = 0; i<times; i++) > { > printf("Hello World!\n"); > } > } > </code> > you would instead write XML something like > <d:function name="hello" type="void"> > <d:arg name="times" type="int" /> > <d:var name="i" type="int" /> > <dkwd:for init="i=0" test="i<times"; incr="i++"> > <d:call name="printf"> > <d:param value="Hello World!\n" type="string" /> > </d:call> > </dkwd:for> > </d:function> Er, I like the way the former looks better? <g> |
January 12, 2002 Re: DDJ, D, XML, HTML, ECMAScript, DOM, etc., etc. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | "Walter" <walter@digitalmars.com> wrote in message news:a1o1hi$to$2@digitaldaemon.com... > I don't think D is suitable as a scripting language (I can get into why if > you want). However a scripting language could be derived from D. Imagine ECMAScript, but with things like DBC, "stricter" classes (as seen in PHP), array slicing etc, borrowed from D - syntactically as well. |
January 12, 2002 Re: DDJ, D, XML, HTML, ECMAScript, DOM, etc., etc. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Walter wrote: > I did some research on this originally, and could find no official way of > doing it. The <code> tag seemed like a good idea at the time. No biggie. <object>...</object> is better, possibly with <param /> elements. That's all. > I am clueless when it comes to XML ... I'll be more than happy to help you. > I'm very familiar with ECMAScript, as I've written an implementation of it. > It runs 10-20x faster than JavaScript. <g> Do you mean JS in the browser, or Mozilla.org's standalone JS Engine in C++? > I don't think D is suitable as a scripting language (I can get into why if > you want). Please do. Incidentally, I like the way Pavel thinks in his reply to your thread... > Already done. I can send you an executable for it next week, and am looking > for customers for it. It's a clean room implementation, so no IP problems, > and includes Microsoft jscript extensions. It even can be plugged into > Explorer. I'd love to get my hands on your implementation, see how it compares to the ECMAScript tests. > No, it's in bootstrap mode in C++. Let me guess: D in D is when you call it a "beta". 8-) |
Copyright © 1999-2021 by the D Language Foundation