Hi,
We're adding support for the D language to UNA (http://www.n-brain.net). The
Personal Edition has been released free of charge (down from $100).
However, none of us have used D so we'd like a bit of help.
We've added support (in dev version) to matching messages of the form:
foo.d(5): Warning: silly variable name
foo.d(5): Error: spelling error in variable name "foobir"
Assuming this is correct, we'd like to proceed with adding commonly used source
code constructs, D idioms, and so forth. We call this 'source snippets'. Each
source snippet has a few letter textual key. Typing that key and invoking the
source snippet button inserts the snippet.
So I'm soliciting for everyone's favorite source snippet.

Hi,
We're adding support for the D language to UNA (http://www.n-brain.net). The
Personal Edition has been released free of charge (down from $100).
However, none of us have used D so we'd like a bit of help.
We've added support (in dev version) to matching messages of the form:
foo.d(5): Warning: silly variable name
foo.d(5): Error: spelling error in variable name "foobir"
Assuming this is correct, we'd like to proceed with adding commonly used
source code constructs, D idioms, and so forth. We call this 'source snippets'.
Each source snippet has a few letter textual key. Typing that key and invoking
the source snippet button inserts the snippet.
So I'm soliciting for everyone's favorite source snippet.

Better adjust your link as what you want people to do is visit your web site I
guess
What benefits does your editor have that say KDevelop does not?

Hi Tower,
I'm not trying to persuade you to stop using KDevelop. By all means, continue
to use your favorite development tool. I'm just soliciting regular D
programmers on common constructs and idioms in the language, which are not easy
to pick up without months of experience developing in a language.
Regards,
John
Tower Ty Wrote:

John A. De Goes Wrote:

Hi,
We're adding support for the D language to UNA (http://www.n-brain.net). The
Personal Edition has been released free of charge (down from $100).
However, none of us have used D so we'd like a bit of help.
We've added support (in dev version) to matching messages of the form:
foo.d(5): Warning: silly variable name
foo.d(5): Error: spelling error in variable name "foobir"
Assuming this is correct, we'd like to proceed with adding commonly used
source code constructs, D idioms, and so forth. We call this 'source snippets'.
Each source snippet has a few letter textual key. Typing that key and invoking
the source snippet button inserts the snippet.
So I'm soliciting for everyone's favorite source snippet.

Better adjust your link as what you want people to do is visit your web site I
guess
What benefits does your editor have that say KDevelop does not?

Editors made by people who don't use the language - rather, by people=20
who don't even know the language at all - are as a general rule very bad.=
I'm a firm believer in using the software you make, so people who toss=20
in a few features to rope in a little more market share tend to tick me=20
off. Go big or go home, either do it right or not at all in my mind.

Editors made by people who don't use the language - rather, by people
who don't even know the language at all - are as a general rule very bad.

Maybe that's because, as a general rule, they don't solicit feedback from the
target community.

I'm a firm believer in using the software you make, so people who toss
in a few features to rope in a little more market share tend to tick me
off. Go big or go home, either do it right or not at all in my mind.

It's impossible for the developers of multi-language editors to become experts
in all the languages those editors support. The best they can do is consult
with experts.
As for market share, you did hear me when I said UNA personal is now free?
Regards,
John

Editors made by people who don't use the language - rather, by people
who don't even know the language at all - are as a general rule very bad.
I'm a firm believer in using the software you make, so people who toss
in a few features to rope in a little more market share tend to tick me
off. Go big or go home, either do it right or not at all in my mind.

The more competition the better I say. If people decide they don't like
n-brain, they won't use it. Let the people decide. Having D in yet
another editor gives people choice. Its yet another marketing resource
for D. The more people that use D the better support D will get.
Also many languages share the same core mechanics so having a
multi-language editor is not all bad. Hell, VS was never designed for
Lua or DSL but I need to switch to that sometimes and I want to use
something I'm familiar with.
-Joel

Assuming this is correct, we'd like to proceed with adding commonly
used source code constructs, D idioms, and so forth. We call this
'source snippets'. Each source snippet has a few letter textual key.
Typing that key and invoking the source snippet button inserts the
snippet.
So I'm soliciting for everyone's favorite source snippet.

Can you give us some examples of what form these snippets take in other
languages like C++ and Java?

Hi Walter,
See my other reply in this same thread for examples of commonly used constructs
in Java.
Regards,
John
Walter Bright Wrote:

John A. De Goes wrote:

Assuming this is correct, we'd like to proceed with adding commonly
used source code constructs, D idioms, and so forth. We call this
'source snippets'. Each source snippet has a few letter textual key.
Typing that key and invoking the source snippet button inserts the
snippet.
So I'm soliciting for everyone's favorite source snippet.

Can you give us some examples of what form these snippets take in other
languages like C++ and Java?

Hi,
We're adding support for the D language to UNA
(http://www.n-brain.net). The Personal Edition has been released free
of charge (down from $100).
However, none of us have used D so we'd like a bit of help.
We've added support (in dev version) to matching messages of the
form:
foo.d(5): Warning: silly variable name foo.d(5): Error: spelling
error in variable name "foobir"
Assuming this is correct, we'd like to proceed with adding commonly
used source code constructs, D idioms, and so forth. We call this
'source snippets'. Each source snippet has a few letter textual key.
Typing that key and invoking the source snippet button inserts the
snippet.
So I'm soliciting for everyone's favorite source snippet.

Either there's something about your company that those who've already
posted in this thread know and don't like, or the guys simply were in a
bad mood.
Personally I'm glad that D support is being added by a new vendor, that
is always welcome.
---
You've already probably downloaded the DMD compiler to get the
documentation and lists of reserved words, etc. Witht that same download
comes a wealth of source code, from which it should be possible to
collect the most used idioms.
They aren't all that different from what the typical Java or C idioms
are, so it might be enough to just have most basic construct snippets.

Thanks for the friendly reply. Looks like I caught people on a bad day. :-)
I have identified all the basic constructs, but wonder if I may be missing some
things. For example, in Java, the following idioms are quite common (the first
two, in concurrent programming):
synchronized (object) {
object.notifyAll();
}
synchronized (object) {
while (!condition) {
try {
object.wait();
}
catch (InterruptedException e) {
break;
}
}
}
new Runnable() {
public void run() {
}
}
public static void main(String[] args) {
}
These among many others. But I lack the familiarity with D to make such
judgements. I was hoping regular D programmers had some oft-used favorites they
could throw in.
Regards,
John
Georg Wrede Wrote:

John A. De Goes wrote:

Hi,
We're adding support for the D language to UNA
(http://www.n-brain.net). The Personal Edition has been released free
of charge (down from $100).
However, none of us have used D so we'd like a bit of help.
We've added support (in dev version) to matching messages of the
form:
foo.d(5): Warning: silly variable name foo.d(5): Error: spelling
error in variable name "foobir"
Assuming this is correct, we'd like to proceed with adding commonly
used source code constructs, D idioms, and so forth. We call this
'source snippets'. Each source snippet has a few letter textual key.
Typing that key and invoking the source snippet button inserts the
snippet.
So I'm soliciting for everyone's favorite source snippet.

Either there's something about your company that those who've already
posted in this thread know and don't like, or the guys simply were in a
bad mood.
Personally I'm glad that D support is being added by a new vendor, that
is always welcome.
---
You've already probably downloaded the DMD compiler to get the
documentation and lists of reserved words, etc. Witht that same download
comes a wealth of source code, from which it should be possible to
collect the most used idioms.
They aren't all that different from what the typical Java or C idioms
are, so it might be enough to just have most basic construct snippets.

Thanks for the friendly reply. Looks like I caught people on a bad day. :-)
I have identified all the basic constructs, but wonder if I may be missing
some things. For example, in Java, the following idioms are quite common (the
first two, in concurrent programming):
synchronized (object) {
object.notifyAll();
}
synchronized (object) {
while (!condition) {
try {
object.wait();
}
catch (InterruptedException e) {
break;
}
}
}
new Runnable() {
public void run() {
}
}
public static void main(String[] args) {
}
These among many others. But I lack the familiarity with D to make such
judgements. I was hoping regular D programmers had some oft-used favorites they
could throw in.
Regards,
John
Georg Wrede Wrote:

John A. De Goes wrote:

Hi,
We're adding support for the D language to UNA
(http://www.n-brain.net). The Personal Edition has been released free
of charge (down from $100).
However, none of us have used D so we'd like a bit of help.
We've added support (in dev version) to matching messages of the
form:
foo.d(5): Warning: silly variable name foo.d(5): Error: spelling
error in variable name "foobir"
Assuming this is correct, we'd like to proceed with adding commonly
used source code constructs, D idioms, and so forth. We call this
'source snippets'. Each source snippet has a few letter textual key.
Typing that key and invoking the source snippet button inserts the
snippet.
So I'm soliciting for everyone's favorite source snippet.

posted in this thread know and don't like, or the guys simply were in a
bad mood.
Personally I'm glad that D support is being added by a new vendor, that
is always welcome.
---
You've already probably downloaded the DMD compiler to get the
documentation and lists of reserved words, etc. Witht that same download
comes a wealth of source code, from which it should be possible to
collect the most used idioms.
They aren't all that different from what the typical Java or C idioms
are, so it might be enough to just have most basic construct snippets.

There's multi-line error messages (for example, if there's an ambiguous
overload), and occasionally messages don't have a line, just a file.

Crap.
Now it's easy enough to support a new style of error reporting, if the format
is consistent, but not so easy when it's hard to break things down into a small
number of patterns. Multiline errors are particularly difficult because it's
often not apparent when they end, or what is the most important part of the
message.
Without documentation on the format, the best I can do is to experiment with
the compiler and try to elicit all possible errors/warnings. And hope they fall
into a small number of consistent patterns (which seems likely given that all
the errors I encountered so far matched the above patterns).
Anyone having inside knowledge of the format care to save me some time here?
(Walter, you listening? :-)
Regards,
John

Without documentation on the format, the best I can do is to
experiment with the compiler and try to elicit all possible
errors/warnings. And hope they fall into a small number of consistent
patterns (which seems likely given that all the errors I encountered
so far matched the above patterns).
Anyone having inside knowledge of the format care to save me some
time here? (Walter, you listening? :-)

No problem. dmd.zip comes with compiler source, just grep for calls to
the function "error(". No need to experiment!

Without documentation on the format, the best I can do is to
experiment with the compiler and try to elicit all possible
errors/warnings. And hope they fall into a small number of consistent
patterns (which seems likely given that all the errors I encountered
so far matched the above patterns).
Anyone having inside knowledge of the format care to save me some
time here? (Walter, you listening? :-)

No problem. dmd.zip comes with compiler source, just grep for calls to
the function "error(". No need to experiment!

Without documentation on the format, the best I can do is to
experiment with the compiler and try to elicit all possible
errors/warnings. And hope they fall into a small number of consistent
patterns (which seems likely given that all the errors I encountered
so far matched the above patterns).
Anyone having inside knowledge of the format care to save me some
time here? (Walter, you listening? :-)

No problem. dmd.zip comes with compiler source, just grep for calls to
the function "error(". No need to experiment!

Without documentation on the format, the best I can do is to
experiment with the compiler and try to elicit all possible
errors/warnings. And hope they fall into a small number of consistent
patterns (which seems likely given that all the errors I encountered
so far matched the above patterns).
Anyone having inside knowledge of the format care to save me some
time here? (Walter, you listening? :-)

No problem. dmd.zip comes with compiler source, just grep for calls to
the function "error(". No need to experiment!

If the error reporting is done through inheritance of the class 'Lexer', then
they should obey the same general convention. Though I have no idea if the
private part has an dependencies on the public part.
Regards,
John
Georg Wrede Wrote:

Ary Borenszweig wrote:

Walter Bright a écrit :

John A. De Goes wrote:

Without documentation on the format, the best I can do is to
experiment with the compiler and try to elicit all possible
errors/warnings. And hope they fall into a small number of consistent
patterns (which seems likely given that all the errors I encountered
so far matched the above patterns).
Anyone having inside knowledge of the format care to save me some
time here? (Walter, you listening? :-)

No problem. dmd.zip comes with compiler source, just grep for calls to
the function "error(". No need to experiment!

If the error reporting is done through inheritance of the class
'Lexer', then they should obey the same general convention. Though I
have no idea if the private part has an dependencies on the public
part.
Georg Wrede Wrote:

Ary Borenszweig wrote:

Walter Bright a écrit :

John A. De Goes wrote:

Without documentation on the format, the best I can do is to
experiment with the compiler and try to elicit all possible
errors/warnings. And hope they fall into a small number of
consistent patterns (which seems likely given that all the
errors I encountered so far matched the above patterns).
Anyone having inside knowledge of the format care to save me
some time here? (Walter, you listening? :-)

No problem. dmd.zip comes with compiler source, just grep for
calls to the function "error(". No need to experiment!

But some errors are reported in the closed-source part... :-(

What's their format? Do they ever contain file/line numbers?

Thanks, John, for the (attempt to) answer.
I may have been too sloppy with my post, actually I was implicitly
soliciting Walter's answer to this.
The proprietary part of the compiler (AFAICT) is from the legacy(?, and
still maintained) C++ compiler that Walter's written for years ago (and
which still is one of the fastest around, and especially, it's THE first
C++-direct compiler in existence (from what I've been told)).
Therefore any formats in the closed-source are (IIUC) definitely not
related to the open-source D-front-end. And very _specifically_, not
inherited _from_ the OS front-end.
Apologies for the diffuse target in my post, I was actually implicitly
asking Walter, although it may have appearaed like I was asking you (an
unreasonable question, if I ever saw one).

Hi,
We're adding support for the D language to UNA (http://www.n-brain.net). The
Personal Edition has been released free of charge (down from $100).

Assuming this is correct, we'd like to proceed with adding commonly used
source code constructs, D idioms, and so forth. We call this 'source snippets'.
Each source snippet has a few letter textual key. Typing that key and invoking
the source snippet button inserts the snippet.

A lot of DWT (SWT) JFace snippets are in my mind, but it depends on how
flexible your snippet editor is.
For instance :
JFSF =
class SimpleForm : ApplicationWindow {
.........
}
should become :
class {1} : ApplicationWindow {
.........
}
so typing JFSF should open a popup asking for the the classname.
In case that your IDE is that flexible, a couple a DWT, JFace snippets,
are possible... Otherwise take it as enhancement suggestion :)
Bjoern

Hi Bjoern,
Yes, this is possible. You just use a macro in the source snippet, e.g.
${CLASS}, and then when you insert it, it places the caret at the first macro:
filling it in replaces all instances of the macro, and hitting Enter takes you
to the next one. No pop up dialogs, but it accomplishes the same thing (with
less invasiveness and annoyance).
Where do DWT and JFace fit into the grand scheme of things? That is, are they
as ubiquitous in D as Swing and SWT are in the Java community?
Regards,
John
BLS Wrote:

A lot of DWT (SWT) JFace snippets are in my mind, but it depends on how
flexible your snippet editor is.
For instance :
JFSF =
class SimpleForm : ApplicationWindow {
.........
}
should become :
class {1} : ApplicationWindow {
.........
}
so typing JFSF should open a popup asking for the the classname.
In case that your IDE is that flexible, a couple a DWT, JFace snippets,
are possible... Otherwise take it as enhancement suggestion :)
Bjoern

Hi Bjoern,
Yes, this is possible. You just use a macro in the source snippet, e.g.
${CLASS}, and then when you insert it, it places the caret at the first macro:
filling it in replaces all instances of the macro, and hitting Enter takes you
to the next one. No pop up dialogs, but it accomplishes the same thing (with
less invasiveness and annoyance).

Where do DWT and JFace fit into the grand scheme of things? That is, are they
as ubiquitous in D as Swing and SWT are in the Java community?

language creator) declared SWT/DWT as standard GUI. DWT is ATM en pair
with SWT 3.4M7, in other words bleeding edge.
So yes, DWT/JFace/Forms is for D what SWT etc. means for Eclipse/Java.
(It was allmost Frank Benoit, who made that hercules work) further
information at : http://www.dsource.org/projects/dwt
You'll also find links to DWT/JFace/Forms snippets on this page which
are most probabely usefull as snippet templates..
OFF TOPIC
Since about 3 years I am working on a realtime developer collaboration
IDE. (slightly different in that I am using a C/S RDBMS as SCM) Would be
interesting to exchange some ideas ...
Regards, Bjoern

Thanks for the insight, Bjoern. Send me and e-mail and we can chat on real-time
collaboration (I'm very much interested in the work other people are doing in
this area).
Regards,
John
BLS Wrote:

John A. De Goes schrieb:

Hi Bjoern,
Yes, this is possible. You just use a macro in the source snippet, e.g.
${CLASS}, and then when you insert it, it places the caret at the first macro:
filling it in replaces all instances of the macro, and hitting Enter takes you
to the next one. No pop up dialogs, but it accomplishes the same thing (with
less invasiveness and annoyance).

Where do DWT and JFace fit into the grand scheme of things? That is, are they
as ubiquitous in D as Swing and SWT are in the Java community?

language creator) declared SWT/DWT as standard GUI. DWT is ATM en pair
with SWT 3.4M7, in other words bleeding edge.
So yes, DWT/JFace/Forms is for D what SWT etc. means for Eclipse/Java.
(It was allmost Frank Benoit, who made that hercules work) further
information at : http://www.dsource.org/projects/dwt
You'll also find links to DWT/JFace/Forms snippets on this page which
are most probabely usefull as snippet templates..
OFF TOPIC
Since about 3 years I am working on a realtime developer collaboration
IDE. (slightly different in that I am using a C/S RDBMS as SCM) Would be
interesting to exchange some ideas ...
Regards, Bjoern

Hi,
We're adding support for the D language to UNA (http://www.n-brain.net).
The Personal Edition has been released free of charge (down from $100).
However, none of us have used D so we'd like a bit of help.
We've added support (in dev version) to matching messages of the form:
foo.d(5): Warning: silly variable name
foo.d(5): Error: spelling error in variable name "foobir"
Assuming this is correct, we'd like to proceed with adding commonly used
source code constructs, D idioms, and so forth. We call this 'source
snippets'. Each source snippet has a few letter textual key. Typing that
key and invoking the source snippet button inserts the snippet.
So I'm soliciting for everyone's favorite source snippet.

I know this isn't what you're asking for, and maybe it's already in there (I
haven't looked), but *please* make sure the syntax hightlighting *properly*
supports both C-style block comments *and* D's nested block comments. It's a
minor issue of course, but a real pet peeve of mine. Most of the D editors
I've tried either highlight D's nested comments (ie, "/+ +/") as if they
behaved like the non-nestable "/* */" comments, or don't even recognize them
as comments at all.
BTW, Are you the same John De Goes that wrote a software-3D book about ten
or so years ago? I still have that around here somewhere. Good book.

I know this isn't what you're asking for, and maybe it's already in there (I
haven't looked), but *please* make sure the syntax hightlighting *properly*
supports both C-style block comments *and* D's nested block comments. It's a
minor issue of course, but a real pet peeve of mine. Most of the D editors
I've tried either highlight D's nested comments (ie, "/+ +/") as if they
behaved like the non-nestable "/* */" comments, or don't even recognize them
as comments at all.

I'll confess right now that all comments are nestable, even C-style comments.
It's something we'll be addressing in a later issue. Personally, I've always
been annoyed that comments couldn't be nested. Clearly an artifact of early
primitive parser technology.

BTW, Are you the same John De Goes that wrote a software-3D book about ten
or so years ago? I still have that around here somewhere. Good book.

Yep, one and the same. As far as I know, there's exactly one "John De Goes" in
the whole world, and he's sitting right here talking to you. :-)
Glad you enjoyed the book. I haven't done anything in the gaming industry for
years, but I'm looking to get back into the industry, at least in a hobbyist
role, later this year.
Regards,
John

I know this isn't what you're asking for, and maybe it's already in there (I
haven't looked), but *please* make sure the syntax hightlighting *properly*
supports both C-style block comments *and* D's nested block comments. It's a
minor issue of course, but a real pet peeve of mine. Most of the D editors
I've tried either highlight D's nested comments (ie, "/+ +/") as if they
behaved like the non-nestable "/* */" comments, or don't even recognize them
as comments at all.

I'll confess right now that all comments are nestable, even C-style comments.
It's something we'll be addressing in a later issue. Personally, I've always
been annoyed that comments couldn't be nested. Clearly an artifact of early
primitive parser technology.

BTW, Are you the same John De Goes that wrote a software-3D book about ten
or so years ago? I still have that around here somewhere. Good book.

Yep, one and the same. As far as I know, there's exactly one "John De Goes" in
the whole world, and he's sitting right here talking to you. :-)
Glad you enjoyed the book. I haven't done anything in the gaming industry for
years, but I'm looking to get back into the industry, at least in a hobbyist
role, later this year.
Regards,
John

Maybe you'll consider D when you decide on a language for your new game.
-Joel

I wish -- D is really what C++ should have been, and wasn't. But my next
'hobbyist' foray into games will probably involve the browser-based casual
gaming market.
Regards,
John
janderson Wrote:

John A. De Goes wrote:

Nick Sabalausky Wrote:

I know this isn't what you're asking for, and maybe it's already in there (I
haven't looked), but *please* make sure the syntax hightlighting *properly*
supports both C-style block comments *and* D's nested block comments. It's a
minor issue of course, but a real pet peeve of mine. Most of the D editors
I've tried either highlight D's nested comments (ie, "/+ +/") as if they
behaved like the non-nestable "/* */" comments, or don't even recognize them
as comments at all.

I'll confess right now that all comments are nestable, even C-style comments.
It's something we'll be addressing in a later issue. Personally, I've always
been annoyed that comments couldn't be nested. Clearly an artifact of early
primitive parser technology.

BTW, Are you the same John De Goes that wrote a software-3D book about ten
or so years ago? I still have that around here somewhere. Good book.

Yep, one and the same. As far as I know, there's exactly one "John De Goes" in
the whole world, and he's sitting right here talking to you. :-)
Glad you enjoyed the book. I haven't done anything in the gaming industry for
years, but I'm looking to get back into the industry, at least in a hobbyist
role, later this year.
Regards,
John

Maybe you'll consider D when you decide on a language for your new game.
-Joel

I=10 wish -- D is really what C++ should have been, and wasn't. But my =

casual gaming market.
That really is a shame. D has some great libraries to help you get=20
started! There's Arclib, which handles input, graphics, as well as=20
sound. It's based on OpenGL, so it's fast (but it's 2D, just floating=20
sprites on the top of the view frustum). There's also Derelict, which=20
gives SDL/OpenGL/OpenAL support. The there's also DAllegro (which I'm=20
using at the moment) which gives you the Allegro game library=20
(http://www.allegro.cc/).
If you want to try some web-based games, DDBI can handle the database=20
layer, and FastCGI4D (http://dsource.org/projects/fastcgi4d) can handle=20
the serving web pages part.
If you use D for the browser based stuff, you'll have the great=20
advantage of not needing to sink all the extra money into a server with=20
extra RAM to support J2EE, which can consume a frightful amount of memory=
!
Just something to think about.

If you use D for the browser based stuff, you'll have the great
advantage of not needing to sink all the extra money into a server with
extra RAM to support J2EE, which can consume a frightful amount of memory!

Actually, when people use the term 'browser-based games' they are
usually referring to Flash, Silverlight, Java Applets, or some sort of
custom browser plugin (i.e. games that run within the browser). I'm
thinking that's what John is referring to. D provides no benefit there.
What you are talking about are generally referred to as 'web-based
games' (i.e. games played via HTTP requests and/or browser scripting).
And really, with Java you don't need a J2EE stack for that. A
low-overhead app server like Jetty coupled with Servlets and JSP pages
will do nicely. I'd prefer that to a PHP solution. D would work just as
well in that environment, but my gut tells me there'd be little
difference in memory overhead.

If you use D for the browser based stuff, you'll have the great advantage
of not needing to sink all the extra money into a server with extra RAM
to support J2EE, which can consume a frightful amount of memory!

Actually, when people use the term 'browser-based games' they are usually
referring to Flash, Silverlight, Java Applets, or some sort of custom
browser plugin (i.e. games that run within the browser). I'm thinking
that's what John is referring to. D provides no benefit there.
What you are talking about are generally referred to as 'web-based games'
(i.e. games played via HTTP requests and/or browser scripting). And
really, with Java you don't need a J2EE stack for that. A low-overhead app
server like Jetty coupled with Servlets and JSP pages will do nicely. I'd
prefer that to a PHP solution. D would work just as well in that
environment, but my gut tells me there'd be little difference in memory
overhead.

If there's anything like leaderboards or multiplayer, then that would
require a backend, and that backend could be written in D.
I would *love* for D to be a viable language for the front-end though. I
truly despise Flash (including the official IDE), but I'm working on a
project right now for which Flash is, unfortunately, the best option. [side
rant] And the client (people, not browser) are on shared hosting so it's
gotta use PHP for the backend, and I hate that every bit as much. [end side
rant]. I truly wish I could just do the whole damn thing in D.
Which does bring me to one of the few things I *do* think VMs are good for:
Embedded webpage applets should be in a sandbox. That's why I would actually
like to see D support compiling to the JVM (*in addition* to native code, of
course). Because that way I could use D as a replacement for Flash.
Come to think of it, doesn't the newest version of Flash support using C++
as an alternative to ECMAScript? I thought I heard that somewhere. If it
does, maybe that opens the door for Flash-using-D? Anyone know? But then
again anything beyond Flash 7 is poorly supported on embedded systems and as
I understand it (which is to say: not very well) Adobe's newer "Flash Lite"
strategy seems like more work for embedded browser developers than the old
Flash SDK. But I'm probably wrong on that. Actually that reminds me, I have
no idea how the Java Applet support is on embedded browsers. Might not be
great either. Dang.
And heck, as long as I'm in pipe-dream land, along with "using D for stuff
embedded in webpages", some D-to-PHP and D-to-ASP converters would be nice.
That'd let me use D for back-end even when I have no control over the
server. 'Course, you'd be giving up anything nice about being
natively-compiled, but at least I wouldn't have to use
ASP/PHP/some-other-dynamically-typed-flavor-of-the-month (all I really mean
by that last one is that to a non-fan of such languages like me, it seems
like popular dynamically typed languages keep popping up all over the
place).
Sorry for rambling and ranting so far offtopic.

If you use D for the browser based stuff, you'll have the great advantage
of not needing to sink all the extra money into a server with extra RAM
to support J2EE, which can consume a frightful amount of memory!

Actually, when people use the term 'browser-based games' they are usually
referring to Flash, Silverlight, Java Applets, or some sort of custom
browser plugin (i.e. games that run within the browser). I'm thinking
that's what John is referring to. D provides no benefit there.
What you are talking about are generally referred to as 'web-based games'
(i.e. games played via HTTP requests and/or browser scripting). And
really, with Java you don't need a J2EE stack for that. A low-overhead app
server like Jetty coupled with Servlets and JSP pages will do nicely. I'd
prefer that to a PHP solution. D would work just as well in that
environment, but my gut tells me there'd be little difference in memory
overhead.

If there's anything like leaderboards or multiplayer, then that would
require a backend, and that backend could be written in D.
I would *love* for D to be a viable language for the front-end though. I
truly despise Flash (including the official IDE), but I'm working on a
project right now for which Flash is, unfortunately, the best option. [side
rant] And the client (people, not browser) are on shared hosting so it's
gotta use PHP for the backend, and I hate that every bit as much. [end side
rant]. I truly wish I could just do the whole damn thing in D.
Which does bring me to one of the few things I *do* think VMs are good for:
Embedded webpage applets should be in a sandbox. That's why I would actually
like to see D support compiling to the JVM (*in addition* to native code, of
course). Because that way I could use D as a replacement for Flash.
Come to think of it, doesn't the newest version of Flash support using C++
as an alternative to ECMAScript? I thought I heard that somewhere. If it
does, maybe that opens the door for Flash-using-D? Anyone know? But then
again anything beyond Flash 7 is poorly supported on embedded systems and as
I understand it (which is to say: not very well) Adobe's newer "Flash Lite"
strategy seems like more work for embedded browser developers than the old
Flash SDK. But I'm probably wrong on that. Actually that reminds me, I have
no idea how the Java Applet support is on embedded browsers. Might not be
great either. Dang.
And heck, as long as I'm in pipe-dream land, along with "using D for stuff
embedded in webpages", some D-to-PHP and D-to-ASP converters would be nice.
That'd let me use D for back-end even when I have no control over the
server. 'Course, you'd be giving up anything nice about being
natively-compiled, but at least I wouldn't have to use
ASP/PHP/some-other-dynamically-typed-flavor-of-the-month (all I really mean
by that last one is that to a non-fan of such languages like me, it seems
like popular dynamically typed languages keep popping up all over the
place).
Sorry for rambling and ranting so far offtopic.

(More off-topic rambling below.)
The other week I actually bought a new computer (2.4GHz 4-CPU, 4GB,
etc.) simply because I got an assignment for a client that my current
computers couldn't handle. (For the record, I've moved to this Century!)
Now, running Linux, I had the performance meter running on one of the
desktops, and I was reading TV programs in a browser, D documentation on
another, and E-mail in another. Then there was the desktop where I'd
gathered all the windows I needed to study and try Lua.
All of a sudden I heard the CPU fan revving up. I wondered what could be
the reason for it since I hadn't done anything exceptional for half an
hour. Turns out there's a banner ad on the TV programming page that
flashes pictures as fast as it can, with no pauses. Until that
particular commercial got on (because of an automatic background reload
of the TV programming page) the CPU load was at 0.1 0.01 0.0 0.02. When
it got started the load went to 0.1 0.3 0.0 0.02.
In other words, one of my four CPUs was loaded to 30% simply because of
this stupid banner. Since the CPU fan started revving up, I understood
that the computer was using more power. Later I put a gadeget I have,
that's a meter of Electric currency consuption, and it showed almost a
10% increase in power. On a 1-CPU machine the consumption should go up
much more than that.
Think about it. If such a web site is for TV programming in America, and
it puts such a banner on its pages, we might have 50 million people
having this page visible. A 10% increase in electricity consumption
should mean 200W * +10% * 50M = over one megawatt. That's equal to the
output of one nuclear power plant.
So, don't believe this. I didn't. But I've done the math several times
over, and I can't help getting to this answer.
Greenpeace sure ought to go shoot the guy.

If you use D for the browser based stuff, you'll have the great
advantage of not needing to sink all the extra money into a server
with extra RAM to support J2EE, which can consume a frightful amount
of memory!

Actually, when people use the term 'browser-based games' they are
usually referring to Flash, Silverlight, Java Applets, or some sort
of custom browser plugin (i.e. games that run within the browser).
I'm thinking that's what John is referring to. D provides no benefit
there.
What you are talking about are generally referred to as 'web-based
games' (i.e. games played via HTTP requests and/or browser
scripting). And really, with Java you don't need a J2EE stack for
that. A low-overhead app server like Jetty coupled with Servlets and
JSP pages will do nicely. I'd prefer that to a PHP solution. D would
work just as well in that environment, but my gut tells me there'd be
little difference in memory overhead.

If there's anything like leaderboards or multiplayer, then that would
require a backend, and that backend could be written in D.
I would *love* for D to be a viable language for the front-end though.
I truly despise Flash (including the official IDE), but I'm working on
a project right now for which Flash is, unfortunately, the best
option. [side rant] And the client (people, not browser) are on shared
hosting so it's gotta use PHP for the backend, and I hate that every
bit as much. [end side rant]. I truly wish I could just do the whole
damn thing in D.
Which does bring me to one of the few things I *do* think VMs are good
for: Embedded webpage applets should be in a sandbox. That's why I
would actually like to see D support compiling to the JVM (*in
addition* to native code, of course). Because that way I could use D
as a replacement for Flash.
Come to think of it, doesn't the newest version of Flash support using
C++ as an alternative to ECMAScript? I thought I heard that somewhere.
If it does, maybe that opens the door for Flash-using-D? Anyone know?
But then again anything beyond Flash 7 is poorly supported on embedded
systems and as I understand it (which is to say: not very well)
Adobe's newer "Flash Lite" strategy seems like more work for embedded
browser developers than the old Flash SDK. But I'm probably wrong on
that. Actually that reminds me, I have no idea how the Java Applet
support is on embedded browsers. Might not be great either. Dang.
And heck, as long as I'm in pipe-dream land, along with "using D for
stuff embedded in webpages", some D-to-PHP and D-to-ASP converters
would be nice. That'd let me use D for back-end even when I have no
control over the server. 'Course, you'd be giving up anything nice
about being natively-compiled, but at least I wouldn't have to use
ASP/PHP/some-other-dynamically-typed-flavor-of-the-month (all I really
mean by that last one is that to a non-fan of such languages like me,
it seems like popular dynamically typed languages keep popping up all
over the place).
Sorry for rambling and ranting so far offtopic.

(More off-topic rambling below.)
The other week I actually bought a new computer (2.4GHz 4-CPU, 4GB,
etc.) simply because I got an assignment for a client that my current
computers couldn't handle. (For the record, I've moved to this Century!)
Now, running Linux, I had the performance meter running on one of the
desktops, and I was reading TV programs in a browser, D documentation on
another, and E-mail in another. Then there was the desktop where I'd
gathered all the windows I needed to study and try Lua.
All of a sudden I heard the CPU fan revving up. I wondered what could be
the reason for it since I hadn't done anything exceptional for half an
hour. Turns out there's a banner ad on the TV programming page that
flashes pictures as fast as it can, with no pauses.

Merely changing the applet to flip the pictures ten times a second would
drop the CPU usage to almost undetectable levels. And the banner would
still look the same.

Until that
particular commercial got on (because of an automatic background reload
of the TV programming page) the CPU load was at 0.1 0.01 0.0 0.02. When
it got started the load went to 0.1 0.3 0.0 0.02.

Sloppy writing. The above is actually not the output of /uptime/ or
such, I was thinking in percentages as seen from the cpu meter graph. So
a 0.3 here means 30%. This does not change anything, it's still valid.

In other words, one of my four CPUs was loaded to 30% simply because of
this stupid banner. Since the CPU fan started revving up, I understood
that the computer was using more power. Later I put a gadeget I have,
that's a meter of Electric currency consuption, and it showed almost a
10% increase in power. On a 1-CPU machine the consumption should go up
much more than that.
Think about it. If such a web site is for TV programming in America, and
it puts such a banner on its pages, we might have 50 million people
having this page visible. A 10% increase in electricity consumption
should mean 200W * +10% * 50M = over one megawatt. That's equal to the
output of one nuclear power plant.

Suppose a banner ad company which has deals with, say, half of the most
visited pages, decides to put a particular ad on everybody's screen
(which could happen if a major company (Coca-Cola, Apple, etc) decides
to bring out a product with a bang), that has such a badly designed
Flash banner, the electric company really should see a stunning
difference in electricity consumption.

So, don't believe this. I didn't. But I've done the math several times
over, and I can't help getting to this answer.
Greenpeace sure ought to go shoot the guy.

They should. It's really a frivolous use of other peoples' computing
power and energy.

All of a sudden I heard the CPU fan revving up. I wondered what could be
the reason for it since I hadn't done anything exceptional for half an
hour. Turns out there's a banner ad on the TV programming page that
flashes pictures as fast as it can, with no pauses.

drop the CPU usage to almost undetectable levels. And the banner would
still look the same.

No one ever said that banner ad creators had any degree of sense. There are
some sites I refuse to go to now because of misbehaved banner ads the sites
contained. In the case of unitedmedia.com (one site on my list), they had an
ad for a while that acted like a mini browser bomb. They can't have possibly
tested it at all.
Sean

All of a sudden I heard the CPU fan revving up. I wondered what could
be
the reason for it since I hadn't done anything exceptional for half an
hour. Turns out there's a banner ad on the TV programming page that
flashes pictures as fast as it can, with no pauses.

drop the CPU usage to almost undetectable levels. And the banner would
still look the same.

No one ever said that banner ad creators had any degree of sense. There
are
some sites I refuse to go to now because of misbehaved banner ads the
sites
contained. In the case of unitedmedia.com (one site on my list), they had
an
ad for a while that acted like a mini browser bomb. They can't have
possibly
tested it at all.
Sean

I find that any form of animation on a page makes it literally impossible
for me to actually read the page. So I disabled GIF animation and favicons,
and installed Firefox's "Flashblock" and "QuickJava" plugins.

Yes, that's correct. JavaScript most likely. No database component at all. And
for back end work, it's really
hard to beat the dynamic languages these days.
D is an excellent fit for systems-level programming, desktop games, and many
other areas, but when you
don't need the speed, you're paying for something you don't have to pay for --
by giving up the features
of a dynamic language.