digitalmars.D - D learning curve
- Erik Lechak (6/6) Jun 13 2008 Hello all,
- Walter Bright (4/11) Jun 13 2008 Thanks for doing this.
- Lutger (2/15) Jun 13 2008 Good idea, I'll add some things.
- Jason House (4/14) Jun 13 2008 To answer one of your questions...
- Jarrett Billingsley (18/27) Jun 13 2008 So you know, the difference between Phobos 1 and Phobos 2 is not what
- Erik Lechak (6/11) Jun 13 2008 I installed gdc-4.1. I just assumed the Debian package name gdc-4.2 wou...
- Jarrett Billingsley (7/21) Jun 13 2008 It's GDC, linked against GCC 4.2. And, shock of all shocks, gdc-4.1 is ...
- Erik Lechak (20/39) Jun 13 2008 Holy smokes! That makes sense. I read a little too much into the gdc v...
- BCS (2/6) Jun 13 2008 looking stupid is a step on the way to not /being/ stupid.
- Sascha Katzner (13/17) Jun 14 2008 ^^^^^^^^
- Lutger (4/24) Jun 14 2008 You could look at the library code and projects at dsource that is being
- Sascha Katzner (12/15) Jun 14 2008 If a specific project is significant or not is a highly subjective
- Lutger (13/22) Jun 15 2008 Sure I agree, there is no objective measure, picking any criteria is
- Sascha Katzner (4/6) Jun 15 2008 RAmen to that, brother! :)
- Charles Hixson (22/28) Jun 14 2008 Which is[was?] a real problem as, for me at least, tango keeps breaking
- Robert Fraser (15/47) Jun 14 2008 I've never had problems this bad, but I am disappointed that Tango
- Sascha Katzner (13/16) Jun 15 2008 If you want "blazing fast" code, it is mostly the better choice to use
- janderson (6/39) Jun 14 2008 What I do is pick a version of the compiler that works and stick with
- Jarrett Billingsley (9/25) Jun 14 2008 I'm mostly going off of what Lutger has said, as well as a somewhat
- Sascha Katzner (10/16) Jun 14 2008 I think it is pretty safe to assume that the majority of Tango users
- Nick Sabalausky (7/10) Jun 14 2008 I might be off-base, but I've always thought of it like this:
- Jonathan Crapuchettes (6/16) Jun 13 2008 Just as a heads-up, I use both dmd and gdc on a regular basis and I have...
- Lars Ivar Igesund (9/22) Jun 18 2008 I'd just like to note that you can download the compilers from the Tango
Hello all, I just started documenting my trip down the D learning curve. For anyone that's interested or if your a newbie and don't want to repeat my mistakes take a look at : http://www.lechak.info/wiki/index.php?title=D_Language If you have anything to add or can clarify anything please don't hesitate to add to the wiki. Thanks, Erik Lechak
Jun 13 2008
Erik Lechak wrote:Hello all, I just started documenting my trip down the D learning curve. For anyone that's interested or if your a newbie and don't want to repeat my mistakes take a look at : http://www.lechak.info/wiki/index.php?title=D_Language If you have anything to add or can clarify anything please don't hesitate to add to the wiki.Thanks for doing this. Can you please rename the page to "D programming language" rather than "D language" ? That makes it more google-friendly.
Jun 13 2008
Erik Lechak wrote:Hello all, I just started documenting my trip down the D learning curve. For anyone that's interested or if your a newbie and don't want to repeat my mistakes take a look at : http://www.lechak.info/wiki/index.php?title=D_Language If you have anything to add or can clarify anything please don't hesitate to add to the wiki. Thanks, Erik LechakGood idea, I'll add some things.
Jun 13 2008
To answer one of your questions... gdmd has the same command-line usage as dmd. This allows tools to be written in one way but use either dmd or gcc as their compiler. For example, dmd and gdmd use -release while gdc uses -frelease. Also, I'm sure the newsgroup would be interested in hearing why you couldn't get dsss to work reliably. The configs are usually very simple. What problems did you hit? Setting the initial config? Writing the config file in your source directory? Lack of module declarations? Erik Lechak Wrote:Hello all, I just started documenting my trip down the D learning curve. For anyone that's interested or if your a newbie and don't want to repeat my mistakes take a look at : http://www.lechak.info/wiki/index.php?title=D_Language If you have anything to add or can clarify anything please don't hesitate to add to the wiki. Thanks, Erik Lechak
Jun 13 2008
"Erik Lechak" <prochak netzero.net> wrote in message news:g2tf85$ig2$1 digitalmars.com...Hello all, I just started documenting my trip down the D learning curve. For anyone that's interested or if your a newbie and don't want to repeat my mistakes take a look at : http://www.lechak.info/wiki/index.php?title=D_Language If you have anything to add or can clarify anything please don't hesitate to add to the wiki. Thanks, Erik LechakSo you know, the difference between Phobos 1 and Phobos 2 is not what version of GDC you're using. It's that there are currently two versions of D itself: D1, which came out at the beginning of 2007 and which is the only version GDC (whatever version it is) supports. And D2, which is currently in an alpha state, which only DMD supports (but there's DMD1 as well). The Digital Mars pages are rather biased to D2 -- almost every link leads to the D2 documentation, so it's understandable that you ended up at the wrong Phobos docs. Also, you might already be aware but the bindings project on dsource (http://www.dsource.org/projects/bindings) has many bindings to common C libraries. Together with BCD and Derelict, which you mentioned, most common C libraries have already been bound, making the somewhat desperate-sounding situation you posit in your wiki a little less desperate ;) (BCD also has a lot more bindings than the wiki page suggests. See here http://www.dsource.org/projects/bcd/browser/trunk/bindings/bcd for a full list.)
Jun 13 2008
Hello Jarrett,So you know, the difference between Phobos 1 and Phobos 2 is not what version of GDC you're using. It's that there are currently two versions of D itself: D1, which came out at the beginning of 2007 and which is the only version GDC (whatever version it is) supports. And D2, which is currently in an alpha state, which only DMD supports (but there's DMD1 as well).I installed gdc-4.1. I just assumed the Debian package name gdc-4.2 would contain the compiler for D2 and the Phobos2 library. But now you have me wondering what is in the gdc-4.2 package. I think from now on I'm not going to think of D as having a "standard library", until it has a standard library. Thanks, Erik Lechak
Jun 13 2008
"Erik Lechak" <prochak netzero.net> wrote in message news:g2un94$16u9$1 digitalmars.com...Hello Jarrett,It's GDC, linked against GCC 4.2. And, shock of all shocks, gdc-4.1 is GDC linked against GCC 4.1 ;)So you know, the difference between Phobos 1 and Phobos 2 is not what version of GDC you're using. It's that there are currently two versions of D itself: D1, which came out at the beginning of 2007 and which is the only version GDC (whatever version it is) supports. And D2, which is currently in an alpha state, which only DMD supports (but there's DMD1 as well).I installed gdc-4.1. I just assumed the Debian package name gdc-4.2 would contain the compiler for D2 and the Phobos2 library. But now you have me wondering what is in the gdc-4.2 package.I think from now on I'm not going to think of D as having a "standard library", until it has a standard library.It *has* a standard library. It's Phobos. It just so happens that many D users use Tango instead ;) Of course that begs the question: is a "standard library" that is used by a minority all that "standard"?
Jun 13 2008
Hello Jarrett,"Erik Lechak" <prochak netzero.net> wrote in message news:g2un94$16u9$1 digitalmars.com...Holy smokes! That makes sense. I read a little too much into the gdc version number rather than look at the obvious. Newsgroups are a great resource ( for making yourself look stupid ). So the moral of the story is: Debian package gdc-4.1: Phobos version 1 standard library gdc - a D (version 1) compiler gdmd - gdc with command line options mirroring dmd Debian package gdc-4.2: Phobos version 1 standard library gdc - a D (version 1) compiler gdmd - gdc with command line options mirroring dmd Digital Mars package dmd.1.030.zip Phobos version 1 standard library dmd - a D (version 1 ) compiler (Windows and Linux) Digital Mars package dmd.2.014.zip Phobos version 2 standard library dmd - a D (version 2 ) compiler (Windows and Linux) Thanks again, Erik LechakHello Jarrett,It's GDC, linked against GCC 4.2. And, shock of all shocks, gdc-4.1 is GDC linked against GCC 4.1 ;)So you know, the difference between Phobos 1 and Phobos 2 is not what version of GDC you're using. It's that there are currently two versions of D itself: D1, which came out at the beginning of 2007 and which is the only version GDC (whatever version it is) supports. And D2, which is currently in an alpha state, which only DMD supports (but there's DMD1 as well).I installed gdc-4.1. I just assumed the Debian package name gdc-4.2 would contain the compiler for D2 and the Phobos2 library. But now you have me wondering what is in the gdc-4.2 package.
Jun 13 2008
Reply to Erik,Holy smokes! That makes sense. I read a little too much into the gdc version number rather than look at the obvious. Newsgroups are a great resource ( for making yourself look stupid ).looking stupid is a step on the way to not /being/ stupid.
Jun 13 2008
Jarrett Billingsley wrote:It *has* a standard library. It's Phobos. It just so happens that many D users use Tango instead ;) Of course that begs the question: is a "standard library" that is used by a minority all that "standard"?^^^^^^^^ Do you have any proof other than the very unrepresentative poll in this newsgroup that Tango has more users than Phobos? As far as I know no one knows the ratio of Phobos and Tango users, so this statement is only an assumption, based on what exactly? The hopes of Tango followers? I don't mean to affront you or any other Tango user, but I respond very harsh if I'm under the impression that someone uses propaganda to push his goal. Are there any download counts published that could give us a *hint* of which library is used more often? LLAP, Sascha
Jun 14 2008
Sascha Katzner wrote:Jarrett Billingsley wrote:You could look at the library code and projects at dsource that is being written. Most projects and almost every big project uses Tango. That is maybe even more important than the number of users.It *has* a standard library. It's Phobos. It just so happens that many D users use Tango instead ;) Of course that begs the question: is a "standard library" that is used by a minority all that "standard"?^^^^^^^^ Do you have any proof other than the very unrepresentative poll in this newsgroup that Tango has more users than Phobos? As far as I know no one knows the ratio of Phobos and Tango users, so this statement is only an assumption, based on what exactly? The hopes of Tango followers? I don't mean to affront you or any other Tango user, but I respond very harsh if I'm under the impression that someone uses propaganda to push his goal. Are there any download counts published that could give us a *hint* of which library is used more often? LLAP, Sascha
Jun 14 2008
Lutger wrote:You could look at the library code and projects at dsource that is being written. Most projects and almost every big project uses Tango. That is maybe even more important than the number of users.If a specific project is significant or not is a highly subjective decision and the pure count of projects which depend on either Phobos or Tango doesn't say much about the real spread or significance of either one. If you want to use other libraries and projects as a benchmark, you have to weight them according to an objective criteria, such as their users and their relevance... which seems to me more complex than the original question. And even if you successfully master this you don't account for a lot of people who don't use any third party libs. LLAP, Sascha
Jun 14 2008
Sascha Katzner wrote:Lutger wrote:Sure I agree, there is no objective measure, picking any criteria is somewhat arbitrary and biased. I don't think anyone here has even measured anything. But if such objectivity would be a requirement, we would be powerless to make any assertion whatsoever, since even picking the criteria is a biased act. Yet it really isn't all that relevant imho. It's undeniably that Tango is important enough to D programming that it has it's place in the D programming landscape for at least, let's say a significant number of people. It's also fact that phobos is still relevant and has even picked up speed since D2. Hopefully when D2 is getting finalized, this issue will be void and null for the better of D.You could look at the library code and projects at dsource that is being written. Most projects and almost every big project uses Tango. That is maybe even more important than the number of users.If a specific project is significant or not is a highly subjective decision and the pure count of projects which depend on either Phobos or Tango doesn't say much about the real spread or significance of either one.
Jun 15 2008
Lutger wrote:Hopefully when D2 is getting finalized, this issue will be void and null for the better of D.RAmen to that, brother! :) LLAP, Sascha
Jun 15 2008
On Sat, 14 Jun 2008 12:18:00 +0200, Lutger wrote:Sascha Katzner wrote:beingJarrett Billingsley wrote:..You could look at the library code and projects at dsource that iswritten. Most projects and almost every big project uses Tango. That is maybe even more important than the number of users.Which is[was?] a real problem as, for me at least, tango keeps breaking with each new release of D. And I didn't find DSSS to be all that workable either. DMD works fine, and so does Phobos. Tango was unending problems. And I frequently switch to DMD2 for a new release (and sometimes switch back to DMD), so Tango isn't even consistently an option. Perhaps some of the problems of which I'm complaining have been fixed. I last checked over 6 months ago. But I'm not real inspired to try it out again, either. If I wanted to spend all my time fighting with my computer I'd install Gentoo. The upshot is that if a project requires Tango, I generally assume that if I try to use it I'll end up spending all my time in compilation and configuration, and figuring out why what I tried didn't work. I don't know what configurations the Tango people expect a system to have, but mine doesn't have them. Once I tried setting up a special user who only executed DMD1.x (forget which version) with Tango. After 3-4 days I gave that up as a bad job. I didn't even know why it wasn't working. OTOH, I've got to admit that many people seem to really like Tango. And I have no clue as to what the differences between our systems are. (Though there's probably typically so many differences that even that wouldn't help much.)
Jun 14 2008
Charles Hixson wrote:On Sat, 14 Jun 2008 12:18:00 +0200, Lutger wrote:I've never had problems this bad, but I am disappointed that Tango releases make no attempt to be backwards compatible (they deprecate some syntax for one release and then get rid of it). Already, the simplest code in the book is not working. Pretty soon, anything that depends on the old collection packages is going to break. If you want to use two libraries that depend on different versions of Tango, you're going to be spending some time fixing them up. Of course, Phobos 2 might have this problem, I'm not sure.Sascha Katzner wrote:beingJarrett Billingsley wrote:..You could look at the library code and projects at dsource that iswritten. Most projects and almost every big project uses Tango. That is maybe even more important than the number of users.Which is[was?] a real problem as, for me at least, tango keeps breaking with each new release of D. And I didn't find DSSS to be all that workable either. DMD works fine, and so does Phobos. Tango was unending problems. And I frequently switch to DMD2 for a new release (and sometimes switch back to DMD), so Tango isn't even consistently an option. Perhaps some of the problems of which I'm complaining have been fixed. I last checked over 6 months ago. But I'm not real inspired to try it out again, either. If I wanted to spend all my time fighting with my computer I'd install Gentoo. The upshot is that if a project requires Tango, I generally assume that if I try to use it I'll end up spending all my time in compilation and configuration, and figuring out why what I tried didn't work. I don't know what configurations the Tango people expect a system to have, but mine doesn't have them. Once I tried setting up a special user who only executed DMD1.x (forget which version) with Tango. After 3-4 days I gave that up as a bad job. I didn't even know why it wasn't working.OTOH, I've got to admit that many people seem to really like Tango. And I have no clue as to what the differences between our systems are. (Though there's probably typically so many differences that even that wouldn't help much.)The GC/runtime/IO is faster & less buggy than Phobos's in general, so for production code (or code you want to be blazing fast), Tango is th better choice. The upper-level library also has a MUCH nicer API, IMO (you can use it Java-style, like I do, or C/free-function style if you prefer, while Phobos is a hodgepodge of different APIs that don't fit together as well).
Jun 14 2008
Robert Fraser wrote:The GC/runtime/IO is faster & less buggy than Phobos's in general, so for production code (or code you want to be blazing fast), Tango is th better choice.If you want "blazing fast" code, it is mostly the better choice to use customized code. Libraries tend to be over protective (for a good reason) and therefore sometimes wasting a lot of time with unnecessary stuff like error checking for errors that could never occur in a specific situation. Tasks like memory management and IO are very good examples for this. When I'm using a library I don't expect to get the fastest code, but _reliable_ code that I don't have to write on my own. Your observation that Phobos seems to have more bugs _could_be_ a direct consequence of that it is used by more people... SCNR ;) LLAP, Sascha
Jun 15 2008
Charles Hixson wrote:On Sat, 14 Jun 2008 12:18:00 +0200, Lutger wrote:What I do is pick a version of the compiler that works and stick with that. As long as you don't need newer versions of tango or other apis that works fine for mw. I sometimes try out updates however if they fail, or are too tricky to fix, I rollback. -JoelSascha Katzner wrote:beingJarrett Billingsley wrote:..You could look at the library code and projects at dsource that iswritten. Most projects and almost every big project uses Tango. That is maybe even more important than the number of users.Which is[was?] a real problem as, for me at least, tango keeps breaking with each new release of D. And I didn't find DSSS to be all that workable either. DMD works fine, and so does Phobos. Tango was unending problems. And I frequently switch to DMD2 for a new release (and sometimes switch back to DMD), so Tango isn't even consistently an option. Perhaps some of the problems of which I'm complaining have been fixed. I last checked over 6 months ago. But I'm not real inspired to try it out again, either. If I wanted to spend all my time fighting with my computer I'd install Gentoo. The upshot is that if a project requires Tango, I generally assume that if I try to use it I'll end up spending all my time in compilation and configuration, and figuring out why what I tried didn't work. I don't know what configurations the Tango people expect a system to have, but mine doesn't have them. Once I tried setting up a special user who only executed DMD1.x (forget which version) with Tango. After 3-4 days I gave that up as a bad job. I didn't even know why it wasn't working. OTOH, I've got to admit that many people seem to really like Tango. And I have no clue as to what the differences between our systems are. (Though there's probably typically so many differences that even that wouldn't help much.)
Jun 14 2008
"Sascha Katzner" <sorry.no spam.invalid> wrote in message news:g2vrqi$ui1$1 digitalmars.com...Jarrett Billingsley wrote:I'm mostly going off of what Lutger has said, as well as a somewhat subjective rating based on my experience on the D IRC channel. As for download counts, I'm not so sure any real comparison could be made. Phobos comes with the compiler, which can be obtained from many sources (directly from DM, the GDC sourceforge page, debian packages). Also, Tango can be checked out of SVN anonymously so I don't think there's any reliable way of knowing how many people have it.It *has* a standard library. It's Phobos. It just so happens that many D users use Tango instead ;) Of course that begs the question: is a "standard library" that is used by a minority all that "standard"?^^^^^^^^ Do you have any proof other than the very unrepresentative poll in this newsgroup that Tango has more users than Phobos? As far as I know no one knows the ratio of Phobos and Tango users, so this statement is only an assumption, based on what exactly? The hopes of Tango followers? I don't mean to affront you or any other Tango user, but I respond very harsh if I'm under the impression that someone uses propaganda to push his goal. Are there any download counts published that could give us a *hint* of which library is used more often? LLAP, Sascha
Jun 14 2008
Jarrett Billingsley wrote:As for download counts, I'm not so sure any real comparison could be made. Phobos comes with the compiler, which can be obtained from many sources (directly from DM, the GDC sourceforge page, debian packages). Also, Tango can be checked out of SVN anonymously so I don't think there's any reliable way of knowing how many people have it.I think it is pretty safe to assume that the majority of Tango users prefer the pre-bundled package and not the subversion way (the same should be true for DMD/Phobos). And since the compiler is already included in this release you don't have to subtract this count from the one of the DM website. So I think if you account for the same time period the download counts should be a very good hint for the usage ratio of the two libraries. LLAP, Sascha
Jun 14 2008
"Jarrett Billingsley" <kb3ctd2 yahoo.com> wrote in message news:g2unqe$18lg$1 digitalmars.com...It *has* a standard library. It's Phobos. It just so happens that many D users use Tango instead ;) Of course that begs the question: is a "standard library" that is used by a minority all that "standard"?I might be off-base, but I've always thought of it like this: Phobos: Official Standard Tango: De Facto Standard Of course, Phobos being the only one that supports D2 right now kinda changes things for the moment.
Jun 14 2008
Just as a heads-up, I use both dmd and gdc on a regular basis and I have found that as nice as gdc is, dmd is a lot more bug free. I usually try gdc first and if there is a bug then I compile with dmd. Thought that might help a little at times. JC Erik Lechak wrote:Hello all, I just started documenting my trip down the D learning curve. For anyone that's interested or if your a newbie and don't want to repeat my mistakes take a look at : http://www.lechak.info/wiki/index.php?title=D_Language If you have anything to add or can clarify anything please don't hesitate to add to the wiki. Thanks, Erik Lechak
Jun 13 2008
Erik Lechak wrote:Hello all, I just started documenting my trip down the D learning curve. For anyone that's interested or if your a newbie and don't want to repeat my mistakes take a look at : http://www.lechak.info/wiki/index.php?title=D_Language If you have anything to add or can clarify anything please don't hesitate to add to the wiki. Thanks, Erik LechakI'd just like to note that you can download the compilers from the Tango pages too, in which case they come with Tango instead of Phobos (some downloads do have Tangobos though). -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Jun 18 2008