digitalmars.D - Adding D Editor Support
- John A. De Goes (8/8) Jun 12 2008 Hi,
- Tower Ty (3/17) Jun 12 2008 Better adjust your link as what you want people to do is visit your web ...
- BCS (2/10) Jun 12 2008 link looks fine to me. (OTOH if there is a UNA only page it would be bet...
- John A. De Goes (5/25) Jun 12 2008 Hi Tower,
- Chris R. Miller (6/11) Jun 12 2008 =2E The Personal Edition has been released free of charge (down from $10...
- Frank Benoit (2/3) Jun 13 2008 Why are you so unfriendly?
- Chris R. Miller (6/11) Jun 13 2008 Editors made by people who don't use the language - rather, by people=20
- John A. De Goes (6/11) Jun 13 2008 It's impossible for the developers of multi-language editors to become e...
- Robert Fraser (4/5) Jun 13 2008 It's still a competitor tot hose of us who are making other free editors...
- janderson (10/24) Jun 13 2008 The more competition the better I say. If people decide they don't like...
- Walter Bright (3/10) Jun 12 2008 Can you give us some examples of what form these snippets take in other
- John A. De Goes (5/16) Jun 12 2008 Hi Walter,
- Georg Wrede (13/34) Jun 12 2008 Either there's something about your company that those who've already
- John A. De Goes (25/64) Jun 12 2008 Thanks for the friendly reply. Looks like I caught people on a bad day. ...
- Walter Bright (6/6) Jun 12 2008 Along those lines, here's one I use all the time:
- John A. De Goes (4/12) Jun 13 2008 Looks good to me. Thanks.
- Ary Borenszweig (5/80) Jun 13 2008 Here are the snippets used by Descent:
- John A. De Goes (5/12) Jun 13 2008 Hi Ary,
- Robert Fraser (3/7) Jun 12 2008 There's multi-line error messages (for example, if there's an ambiguous
- Jarrett Billingsley (5/12) Jun 13 2008 And occasionally they have the right line but wrong file, and sometimes,...
- John A. De Goes (7/9) Jun 13 2008 Crap.
- Lutger (10/16) Jun 13 2008 ...
- John A. De Goes (4/27) Jun 13 2008 Thanks, Lutger. This should prove possible to support.
- Steven Schveighoffer (7/9) Jun 13 2008 The front end for D is open source:
- John A. De Goes (4/20) Jun 13 2008 Thanks Steve (and also Walter). I'm grepping the code now.
- Walter Bright (3/11) Jun 13 2008 No problem. dmd.zip comes with compiler source, just grep for calls to
- John A. De Goes (15/27) Jun 13 2008 Turns out the ambiguous argument types is really the only true multiline...
- Ary Borenszweig (2/14) Jun 13 2008 But some errors are reported in the closed-source part... :-(
- Georg Wrede (3/19) Jun 14 2008 What's their format?
- John A. De Goes (4/24) Jun 14 2008 If the error reporting is done through inheritance of the class 'Lexer',...
- Georg Wrede (14/39) Jun 15 2008 Thanks, John, for the (attempt to) answer.
- BLS (16/20) Jun 12 2008 A lot of DWT (SWT) JFace snippets are in my mind, but it depends on how
- John A. De Goes (6/22) Jun 13 2008 Hi Bjoern,
- BLS (15/21) Jun 13 2008 DWT is "per se" the standard GUI library for D. Means: Walter (the D
- John A. De Goes (4/32) Jun 13 2008 Thanks for the insight, Bjoern. Send me and e-mail and we can chat on re...
- Nick Sabalausky (11/23) Jun 14 2008 I know this isn't what you're asking for, and maybe it's already in ther...
- John A. De Goes (6/15) Jun 14 2008 Yep, one and the same. As far as I know, there's exactly one "John De Go...
- janderson (3/24) Jun 14 2008 Maybe you'll consider D when you decide on a language for your new game.
- John A. De Goes (4/30) Jun 15 2008 I wish -- D is really what C++ should have been, and wasn't. But my nex...
- Chris R. Miller (18/19) Jun 15 2008 next 'hobbyist' foray into games will probably involve the browser-based...
- Mike Parker (12/15) Jun 15 2008 Actually, when people use the term 'browser-based games' they are
- Nick Sabalausky (33/48) Jun 15 2008 If there's anything like leaderboards or multiplayer, then that would
- Georg Wrede (30/90) Jun 19 2008 (More off-topic rambling below.)
- Georg Wrede (15/120) Jun 20 2008 Merely changing the applet to flip the pictures ten times a second would...
- Sean Kelly (7/16) Jun 20 2008 No one ever said that banner ad creators had any degree of sense. There...
- Nick Sabalausky (5/26) Jun 20 2008 I find that any form of animation on a page makes it literally impossibl...
- John A. De Goes (5/5) Jun 16 2008 Yes, that's correct. JavaScript most likely. No database component at al...
- Brian Price (19/33) Jun 14 2008 Unsure how common this is but I find myself using the following handy co...
- John A. De Goes (11/14) Jun 14 2008 Looks great! I'll add it to the templates. All the examples so far have ...
- janderson (3/25) Jun 14 2008 I would say yes. Looking though the newsgroup, barely anyone uses the
- Georg Wrede (25/34) Jun 19 2008 Most of programming examples you can see in textbooks (and of course on
- Ty Tower (14/56) Jun 19 2008 Quote from George
- Georg Wrede (5/20) Jun 20 2008 Next time you try to publish a book, you'll see. He absolutely hates any...
- Nick Sabalausky (10/66) Jun 20 2008 You know, that's actually an interesting point. I wouldn't put it quite ...
- Mike Parker (10/83) Jun 20 2008 For 'Learn to Tango with D', we didn't have anyone telling to shorten
- Sean Kelly (8/13) Jun 20 2008 For my chapters, I found myself trying to produce compact examples
- Sean Kelly (12/19) Jun 20 2008 This format is actually pulled from Public Speaking, where it has been
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.
Jun 12 2008
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?
Jun 12 2008
Reply to Tower,John A. De Goes Wrote:link looks fine to me. (OTOH if there is a UNA only page it would be better)Hi, We're adding support for the D language to UNA (http://www.n-brain.net). The Personal Edition has been released freeBetter adjust your link as what you want people to do is visit your web site I guess
Jun 12 2008
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?
Jun 12 2008
John A. De Goes wrote:Hi, =20 We're adding support for the D language to UNA (http://www.n-brain.net)==2E The Personal Edition has been released free of charge (down from $100= ).=20 However, none of us have used D so we'd like a bit of help.Well there's your problem! Come back later when you're educated. If=20 you're having trouble, there are plenty of people who will help you get=20 going with D.
Jun 12 2008
Chris R. Miller schrieb:Well there's your problem! Come back later when you're educated.Why are you so unfriendly?
Jun 13 2008
Frank Benoit wrote:Chris R. Miller schrieb: =20Editors 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.Well there's your problem! Come back later when you're educated.=20 Why are you so unfriendly?
Jun 13 2008
Chris R. Miller Wrote: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
Jun 13 2008
John A. De Goes wrote:As for market share, you did hear me when I said UNA personal is now free?It's still a competitor tot hose of us who are making other free editors ;-P. But I see this as a good thing, since more competition = more benefit to everyone.
Jun 13 2008
Chris R. Miller wrote:Frank Benoit wrote: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. -JoelChris R. Miller schrieb: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.Well there's your problem! Come back later when you're educated.Why are you so unfriendly?
Jun 13 2008
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?
Jun 12 2008
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?
Jun 12 2008
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.
Jun 12 2008
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.
Jun 12 2008
Along those lines, here's one I use all the time: import std.stdio; int main(string[] args) { return 0; }
Jun 12 2008
Looks good to me. Thanks. Regards, John Walter Bright Wrote:Along those lines, here's one I use all the time: import std.stdio; int main(string[] args) { return 0; }
Jun 13 2008
Here are the snippets used by Descent: http://dsource.org/projects/descent/browser/trunk/descent.ui/templates/default-templates.xml There should probably be more, because we didn't spend much time with that file. John A. De Goes a écrit :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.
Jun 13 2008
Hi Ary, Nice! Thank you so much. I'd be happy to send you our template file when it's finished. Regards, John Ary Borenszweig Wrote:Here are the snippets used by Descent: http://dsource.org/projects/descent/browser/trunk/descent.ui/templates/default-templates.xml There should probably be more, because we didn't spend much time with that file.
Jun 13 2008
John A. De Goes wrote: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"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.
Jun 12 2008
"Robert Fraser" <fraserofthenight gmail.com> wrote in message news:g2sp22$1dnc$1 digitalmars.com...John A. De Goes wrote:And occasionally they have the right line but wrong file, and sometimes, _sometimes_ they have nothing at all. But those aren't intended ;)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"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.
Jun 13 2008
Robert Fraser Wrote: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
Jun 13 2008
John A. De Goes wrote:Robert Fraser Wrote:... Here is the ambiguous overload: crap.d(13): function crap.foo called with argument types: (int) matches both: crap.foo(uint) and: crap.foo(ulong) I have not heard about UNA before, it looks really nice!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.
Jun 13 2008
Thanks, Lutger. This should prove possible to support. Regards, John Lutger Wrote:John A. De Goes wrote:Robert Fraser Wrote:... Here is the ambiguous overload: crap.d(13): function crap.foo called with argument types: (int) matches both: crap.foo(uint) and: crap.foo(ulong) I have not heard about UNA before, it looks really nice!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.
Jun 13 2008
"John A. De Goes" wroteAnyone having inside knowledge of the format care to save me some time here?The front end for D is open source: http://www.dsource.org/projects/dmdfe That might help. Good luck, I have trouble understanding what some of the errors mean anyways :) -Steve
Jun 13 2008
Thanks Steve (and also Walter). I'm grepping the code now. Regards, John Steven Schveighoffer Wrote:"John A. De Goes" wroteAnyone having inside knowledge of the format care to save me some time here?The front end for D is open source: http://www.dsource.org/projects/dmdfe That might help. Good luck, I have trouble understanding what some of the errors mean anyways :) -Steve
Jun 13 2008
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!
Jun 13 2008
Turns out the ambiguous argument types is really the only true multiline (i.e. the one error that cannot be understood just by looking at what follows the colon on the first line). ------------------- dsymbol.c: error("Dsymbol '%s' has no size\n", toChars()); dsymbol.c: //printf("Dsymbol::error()\n"); func.c: error(loc, "called with argument types:\n\t(%s)\nmatches both:\n\t%s%s\nand:\n\t%s%s", lexer.c: error("undefined escape hex sequence \\%c\n",c); lexer.c: error("undefined escape sequence \\%c\n",c); mars.c: { error("use -profile instead of -gt\n"); mars.c: { error("unrecognized file extension %s\n", ext); root.c: error("Error reading file '%s'\n",name->toChars()); root.c: error("Error writing file '%s'\n",name->toChars()); root.c: error("Error appending to file '%s'\n",name->toChars()); template.c: error("forward reference to template declaration %s\n", tempdecl->toChars()); toobj.c: error("%s %s is hidden in %s\n", fd->toParent()->toChars(), fd->toChars(), toChars()); Walter Bright Wrote: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!
Jun 13 2008
Walter Bright a écrit :John A. De Goes wrote:But some errors are reported in the closed-source part... :-(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!
Jun 13 2008
Ary Borenszweig wrote:Walter Bright a écrit :What's their format? Do they ever contain file/line numbers?John A. De Goes wrote:But some errors are reported in the closed-source part... :-(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!
Jun 14 2008
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 :What's their format? Do they ever contain file/line numbers?John A. De Goes wrote:But some errors are reported in the closed-source part... :-(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!
Jun 14 2008
John A. De Goes wrote: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: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).Ary Borenszweig wrote:Walter Bright a écrit :What's their format? Do they ever contain file/line numbers?John A. De Goes wrote:But some errors are reported in the closed-source part... :-(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!
Jun 15 2008
John A. De Goes schrieb: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
Jun 12 2008
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
Jun 13 2008
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).That is pretty cool!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?DWT is "per se" the standard GUI library for D. Means: Walter (the D 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
Jun 13 2008
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).That is pretty cool!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?DWT is "per se" the standard GUI library for D. Means: Walter (the D 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
Jun 13 2008
"John A. De Goes" <john.withoutspam. n-brain.net> wrote in message news:g2rt5g$28e3$1 digitalmars.com...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.
Jun 14 2008
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
Jun 14 2008
John A. De Goes wrote:Nick Sabalausky Wrote:Maybe you'll consider D when you decide on a language for your new game. -JoelI 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
Jun 14 2008
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:Maybe you'll consider D when you decide on a language for your new game. -JoelI 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
Jun 15 2008
John A. De Goes wrote:I=10 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. 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.
Jun 15 2008
Chris R. Miller wrote: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.
Jun 15 2008
"Mike Parker" <aldacron gmail.com> wrote in message news:g34k0q$1uns$1 digitalmars.com...Chris R. Miller wrote: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.
Jun 15 2008
Nick Sabalausky wrote:"Mike Parker" <aldacron gmail.com> wrote in message news:g34k0q$1uns$1 digitalmars.com...(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.Chris R. Miller wrote: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.
Jun 19 2008
Georg Wrede wrote:Nick Sabalausky wrote: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."Mike Parker" <aldacron gmail.com> wrote in message news:g34k0q$1uns$1 digitalmars.com...(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.Chris R. Miller wrote: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.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.
Jun 20 2008
== Quote from Georg Wrede (georg nospam.org)'s articleGeorg Wrede wrote: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. SeanAll 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.
Jun 20 2008
"Sean Kelly" <sean invisibleduck.org> wrote in message news:g3gq00$1kio$1 digitalmars.com...== Quote from Georg Wrede (georg nospam.org)'s articleI 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.Georg Wrede wrote: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. SeanAll 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.
Jun 20 2008
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.
Jun 16 2008
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.Unsure how common this is but I find myself using the following handy construct (assume module name can be inserted by {module}: version({module}_test) { import std.stdio; unittest { } int main() { return 0; } } This allows me to use the command line: dmd file1.d file2.d file3.d somelib.lib -unittest -version=file1_test. This results in only the tests from the requested file being generated in the resulting executable. Is it possible for custom snippets to be added by the user? I look forward to trying out your IDE. Thanks, Brian
Jun 14 2008
Brian Price Wrote:This allows me to use the command line: dmd file1.d file2.d file3.d somelib.lib -unittest -version=file1_test.Looks great! I'll add it to the templates. All the examples so far have used block-aligned styling: a { } In Java, for example, the most popular convention by far is to place the opening brace at the end of the preceding line. Are the examples I've seen representative of the more popular conventions within the D community?Is it possible for custom snippets to be added by the user?Yes, indeed. I'd just like to ship with some decent snippets already built in.I look forward to trying out your IDE.That's great. Send us some feedback after you've used it for a while. Regards, John
Jun 14 2008
John A. De Goes wrote:Brian Price Wrote:I would say yes. Looking though the newsgroup, barely anyone uses the end of line syntax.This allows me to use the command line: dmd file1.d file2.d file3.d somelib.lib -unittest -version=file1_test.Looks great! I'll add it to the templates. All the examples so far have used block-aligned styling: a { } In Java, for example, the most popular convention by far is to place the opening brace at the end of the preceding line. Are the examples I've seen representative of the more popular conventions within the D community?Is it possible for custom snippets to be added by the user?Yes, indeed. I'd just like to ship with some decent snippets already built in.I look forward to trying out your IDE.That's great. Send us some feedback after you've used it for a while. Regards, John
Jun 14 2008
John A. De Goes wrote:Looks great! I'll add it to the templates. All the examples so far have used block-aligned styling: a { } In Java, for example, the most popular convention by far is to place the opening brace at the end of the preceding line. Are the examples I've seen representative of the more popular conventions within the D community?Most of programming examples you can see in textbooks (and of course on many web sites) use the brace-at-end-of-line. People who've learnt to program from them get used to the "look", and then of course perceive it as prettier. Now, there are a couple of (rational) reasons for this custom. One is, in short examples it is nice to have the entire code snippet as short as possible, so that you can view some of the explaining text both before and after the code snippet at a glance. The other reason is, in textbooks there's a scarcity of dead wood. The publisher has to enforce brevity, and this is (from his POV) an unobtrusive way to achieve much of it. In an environment where yuou aren't constrained by space, it soon becomes practice to use the braces-on-own-lines convention. It uses more space, but if your screen has a resolution that allows it, then you don't care. Code with braces on their own lines is more manageable. One can grep for opening/closing braces, programs get clearer to grasp at a glance, etc. (Yes I know, now 500 people are going to contest my position. All I can say is, what one is used to looks clearer and more natural. But I'm talking a bigger perspective here.) On a 25-line monitor I'd use the brace-at-end convention, too. Oh, and the end result: I see no significan difference between C, C++, Java, and a few other languages, versus D, in the choice of bracing. It's mostly just a programmer preference. And both are used.
Jun 19 2008
Georg Wrede Wrote:John A. De Goes wrote:Quote from George "The other reason is, in textbooks there's a scarcity of dead wood. The publisher has to enforce brevity, and this is (from his POV) an unobtrusive way to achieve much of it." Well George if this is good and valid info I will eat my hat. Puts the credibility of the rest of your writing in doubt. Pick up most programming texts and they are crammed with "Here is what this chapter will teach you" "Here is a load of unnecessary garbage" "Here is the guts of it" "Here is what you have learnt in this chapter" "Here's what we will cover in the next chapter" and so on , so there is not much care about brevity that I have seen!Looks great! I'll add it to the templates. All the examples so far have used block-aligned styling: a { } In Java, for example, the most popular convention by far is to place the opening brace at the end of the preceding line. Are the examples I've seen representative of the more popular conventions within the D community?Most of programming examples you can see in textbooks (and of course on many web sites) use the brace-at-end-of-line. People who've learnt to program from them get used to the "look", and then of course perceive it as prettier. Now, there are a couple of (rational) reasons for this custom. One is, in short examples it is nice to have the entire code snippet as short as possible, so that you can view some of the explaining text both before and after the code snippet at a glance. The other reason is, in textbooks there's a scarcity of dead wood. The publisher has to enforce brevity, and this is (from his POV) an unobtrusive way to achieve much of it. In an environment where yuou aren't constrained by space, it soon becomes practice to use the braces-on-own-lines convention. It uses more space, but if your screen has a resolution that allows it, then you don't care. Code with braces on their own lines is more manageable. One can grep for opening/closing braces, programs get clearer to grasp at a glance, etc. (Yes I know, now 500 people are going to contest my position. All I can say is, what one is used to looks clearer and more natural. But I'm talking a bigger perspective here.) On a 25-line monitor I'd use the brace-at-end convention, too. Oh, and the end result: I see no significan difference between C, C++, Java, and a few other languages, versus D, in the choice of bracing. It's mostly just a programmer preference. And both are used.
Jun 19 2008
Ty Tower wrote:Quote from George "The other reason is, in textbooks there's a scarcity of dead wood. The publisher has to enforce brevity, and this is (from his POV) an unobtrusive way to achieve much of it." Well George if this is good and valid info I will eat my hat. Puts the credibility of the rest of your writing in doubt.Next time you try to publish a book, you'll see. He absolutely hates any space usage that he doesn't understand the value of.Pick up most programming texts and they are crammed with "Here is what this chapter will teach you" "Here is a load of unnecessary garbage" "Here is the guts of it" "Here is what you have learnt in this chapter" "Here's what we will cover in the next chapter" and so on , so there is not much care about brevity that I have seen!I know. Those books are written for (I don't seem to find the word). I was talking about serious books.
Jun 20 2008
"Ty Tower" <tytower hotmail.com> wrote in message news:g3fg35$1t3l$1 digitalmars.com...Georg Wrede Wrote:You know, that's actually an interesting point. I wouldn't put it quite so harshly, but I have seen a lot of programming books that do have a lot of what I would consider to be fluff (and I don't mean sidebar text (that can be interesting), but rather some of the things Ty points out. For instance, you can see what a chapter covers just by skimming through it). So in a way, it does seem a little odd that there tends to be fuss over code length (I can understand limited horizontal space though) when there's all of that other, IMHO, redundant/superfluous stuff.John A. De Goes wrote:Quote from George "The other reason is, in textbooks there's a scarcity of dead wood. The publisher has to enforce brevity, and this is (from his POV) an unobtrusive way to achieve much of it." Well George if this is good and valid info I will eat my hat. Puts the credibility of the rest of your writing in doubt. Pick up most programming texts and they are crammed with "Here is what this chapter will teach you" "Here is a load of unnecessary garbage" "Here is the guts of it" "Here is what you have learnt in this chapter" "Here's what we will cover in the next chapter" and so on , so there is not much care about brevity that I have seen!Looks great! I'll add it to the templates. All the examples so far have used block-aligned styling: a { } In Java, for example, the most popular convention by far is to place the opening brace at the end of the preceding line. Are the examples I've seen representative of the more popular conventions within the D community?Most of programming examples you can see in textbooks (and of course on many web sites) use the brace-at-end-of-line. People who've learnt to program from them get used to the "look", and then of course perceive it as prettier. Now, there are a couple of (rational) reasons for this custom. One is, in short examples it is nice to have the entire code snippet as short as possible, so that you can view some of the explaining text both before and after the code snippet at a glance. The other reason is, in textbooks there's a scarcity of dead wood. The publisher has to enforce brevity, and this is (from his POV) an unobtrusive way to achieve much of it. In an environment where yuou aren't constrained by space, it soon becomes practice to use the braces-on-own-lines convention. It uses more space, but if your screen has a resolution that allows it, then you don't care. Code with braces on their own lines is more manageable. One can grep for opening/closing braces, programs get clearer to grasp at a glance, etc. (Yes I know, now 500 people are going to contest my position. All I can say is, what one is used to looks clearer and more natural. But I'm talking a bigger perspective here.) On a 25-line monitor I'd use the brace-at-end convention, too. Oh, and the end result: I see no significan difference between C, C++, Java, and a few other languages, versus D, in the choice of bracing. It's mostly just a programmer preference. And both are used.
Jun 20 2008
Nick Sabalausky wrote:"Ty Tower" <tytower hotmail.com> wrote in message news:g3fg35$1t3l$1 digitalmars.com...For 'Learn to Tango with D', we didn't have anyone telling to shorten example code. We /were/ working within pretty tight constraints as far as page limit (the First Press series of books are intended to be short). But code size was never an issue. The only guideline for code was for formatting. Each line needed to be within a fixed-width. Frequently, they asked us to add more info to a chapter. They generally wanted the opening paragraphs to summarize the contents. I expected them to ask for a summary at the end of each chapter as well, since that format is so common in tech books, but they never did.Georg Wrede Wrote:You know, that's actually an interesting point. I wouldn't put it quite so harshly, but I have seen a lot of programming books that do have a lot of what I would consider to be fluff (and I don't mean sidebar text (that can be interesting), but rather some of the things Ty points out. For instance, you can see what a chapter covers just by skimming through it). So in a way, it does seem a little odd that there tends to be fuss over code length (I can understand limited horizontal space though) when there's all of that other, IMHO, redundant/superfluous stuff.John A. De Goes wrote:Quote from George "The other reason is, in textbooks there's a scarcity of dead wood. The publisher has to enforce brevity, and this is (from his POV) an unobtrusive way to achieve much of it." Well George if this is good and valid info I will eat my hat. Puts the credibility of the rest of your writing in doubt. Pick up most programming texts and they are crammed with "Here is what this chapter will teach you" "Here is a load of unnecessary garbage" "Here is the guts of it" "Here is what you have learnt in this chapter" "Here's what we will cover in the next chapter" and so on , so there is not much care about brevity that I have seen!Looks great! I'll add it to the templates. All the examples so far have used block-aligned styling: a { } In Java, for example, the most popular convention by far is to place the opening brace at the end of the preceding line. Are the examples I've seen representative of the more popular conventions within the D community?Most of programming examples you can see in textbooks (and of course on many web sites) use the brace-at-end-of-line. People who've learnt to program from them get used to the "look", and then of course perceive it as prettier. Now, there are a couple of (rational) reasons for this custom. One is, in short examples it is nice to have the entire code snippet as short as possible, so that you can view some of the explaining text both before and after the code snippet at a glance. The other reason is, in textbooks there's a scarcity of dead wood. The publisher has to enforce brevity, and this is (from his POV) an unobtrusive way to achieve much of it. In an environment where yuou aren't constrained by space, it soon becomes practice to use the braces-on-own-lines convention. It uses more space, but if your screen has a resolution that allows it, then you don't care. Code with braces on their own lines is more manageable. One can grep for opening/closing braces, programs get clearer to grasp at a glance, etc. (Yes I know, now 500 people are going to contest my position. All I can say is, what one is used to looks clearer and more natural. But I'm talking a bigger perspective here.) On a 25-line monitor I'd use the brace-at-end convention, too. Oh, and the end result: I see no significan difference between C, C++, Java, and a few other languages, versus D, in the choice of bracing. It's mostly just a programmer preference. And both are used.
Jun 20 2008
== Quote from Mike Parker (aldacron gmail.com)'s articleFor 'Learn to Tango with D', we didn't have anyone telling to shorten example code. We /were/ working within pretty tight constraints as far as page limit (the First Press series of books are intended to be short). But code size was never an issue. The only guideline for code was for formatting. Each line needed to be within a fixed-width.For my chapters, I found myself trying to produce compact examples because doing so increased the likelihood that the example wouldn't wrap to the following page... or push trailing description off to the following page. The rest is just personal preference however. I very much prefer example code that illustrates the point being discussed with a minimum of unrelated stuff. Sean
Jun 20 2008
== Quote from Ty Tower (tytower hotmail.com)'s articlePick up most programming texts and they are crammed with "Here is what this chapter will teach you" "Here is a load of unnecessary garbage" "Here is the guts of it" "Here is what you have learnt in this chapter" "Here's what we will cover in the next chapter" and so on , so there is not much care about brevity that I have seen!This format is actually pulled from Public Speaking, where it has been shown that listeners retain the material better if you basically do: 1. "This is what I'm going to tell you" 2. Tell them 3. "In summary, here is what I've just told you" It's also good practice to limit an instructional lecture to no more than 3-4 main points. Done right, I think this is actually a very good format, even in a book. "The Pragmatic Programmer," for example, follows this format and it's one of the best programming books I've ever read, and also one of the most concise. Sean
Jun 20 2008