digitalmars.D - The proper case for D.
- Steve Teale (10/10) Jun 19 2009 Can this group come up with a proper, sober (OK, I'm not), case for D.
- superdan (2/3) Jun 19 2009 den pretty please explain why anyone should give a flyin' fuck fer yer d...
- grauzone (2/7) Jun 19 2009 You just gave a flying fuck.
- superdan (2/10) Jun 19 2009 negative. i stopped readin' after da first line. dat counts at most for ...
- Steve Teale (2/7) Jun 21 2009 Love you man. You're on the spot! I have no excuse.
- superdan (6/15) Jun 21 2009 not shure u r bein' sarcastic but i'm a gonna take dat at face value. ak...
- Pete O'dowd (3/24) Jun 21 2009 Wow - Boyz n da Hood... Are you writing with a full keyboard?
- superdan (2/29) Jun 22 2009 menace ii society akshully. heh.
- Adam D. Ruppe (12/14) Jun 19 2009 It is a better C; D is what C++ wishes it was.
- Steve Teale (2/23) Jun 21 2009 Yes, you're right about not needing a debugger. Walter's compilers have ...
- BCS (8/17) Jun 19 2009 "D is a low level language that can masquerade as a high level language"...
- Sean Kelly (1/1) Jun 19 2009 Uppercase. Calling it 'd' lacks a certain punch.
- Danny Wilson (3/5) Jun 19 2009 Thats awesome, made me chuckle. :-)
- Jarrett Billingsley (2/3) Jun 19 2009 "The groan heard 'round the world"
- Daniel Keep (4/5) Jun 20 2009 You know, that's exactly what I assumed the post was going to be about
- Tim Matthews (7/7) Jun 19 2009 Many will argue that D has lots of features found in many other
- hasen (27/48) Jun 20 2009 I think the proper case for D has to be in the form of (several)
- Frank Rundell (5/10) Jun 20 2009 And your response is why D is never going to be more than a beta compile...
- Lutger (9/30) Jun 20 2009 ?
- Lutger (3/4) Jun 20 2009 Or is everybody drunk, am I missing a party?
- grauzone (5/20) Jun 20 2009 Some people think D2 tries too much, and neglects the really important
- Lutger (6/27) Jun 20 2009 So the better direction according to some is to stagnate language design...
- grauzone (8/13) Jun 20 2009 Eh, you seriously think D2 would still be in use at that time? We will
- Robert Fraser (6/11) Jun 20 2009 With objconv, it might be possible to use a different linker on Windows....
- Walter Bright (10/15) Jun 20 2009 Optlink does not discard unreference symbols, it just doesn't pull them
- Jarrett Billingsley (4/9) Jun 20 2009 http://d.puremagic.com/issues/show_bug.cgi?id=424
- Walter Bright (4/14) Jun 20 2009 1. Robert doesn't say if that is the issue or not.
- Jarrett Billingsley (6/25) Jun 20 2009 Fair enough, though I'm just speaking from experience here. Large
- Walter Bright (2/8) Jun 21 2009 Thank you.
- Robert Fraser (18/27) Jun 21 2009 Hmmm... well, I built a 3rd-party library (Platinum UPnP + Neptune) into...
- Walter Bright (2/22) Jun 21 2009 It may be a problem with objconv where it puts everything into one obj f...
- Robert Fraser (8/33) Jun 21 2009 Update on this -- I built it as a DLL in VS, exposing only the functions...
- Walter Bright (14/16) Jun 21 2009 Let's say the C++ source file looks like:
- robert fraser (2/23) Jun 21 2009 Ah, thanks for the explanation. I didn't understand it pulled in whole o...
- Walter Bright (6/9) Jun 21 2009 The linker can eliminate some unused COMDATs from the object file, but
- BCS (2/9) Jun 21 2009 what is needed is a reference graph tool and .exe inspector tool.
- Lutger (9/25) Jun 20 2009 D1 is stable and actively supported. Tango has the functionality. LDC ha...
- Steve Teale (2/16) Jun 21 2009 You are of course completely correct in this, but the question is,
- =?UTF-8?B?IkrDqXLDtG1lIE0uIEJlcmdlciI=?= (15/31) Jun 21 2009 cy
- dsimcha (18/38) Jun 20 2009 But linkers are an implementation detail, threading is really central to...
- Bruno Deligny (13/34) Jun 20 2009 I totally agree!
- Walter Bright (4/9) Jun 20 2009 Knowing the guts of object file formats, the MachO format (used on the
- Steve Teale (3/15) Jun 21 2009 OK Walter, I'd have to go back again and cover that, but at the time I h...
Can this group come up with a proper, sober (OK, I'm not), case for D. This would clearly have to steer clear of the standard libraries, I can't see how any outside observer is going to be impressed by the fact that we have two. And D is a computer programming language. So we should deal with it as that first. Andrei's article had a lot of good points primarily revolving around the need to concentrate on concurrency, but I suspect that we should probably stress the basics. When Bjarne Stroustrup was originally promoting C++, he made a strong point that you could at least consider it to be a 'better C'. This point, it seemed to me, was lost on many. Now we are looking for radical arguments as to why D is a cool language. Maybe we should remember the basics, and concentrate less on the vapor. Bearophile made a counter-argument. But this also did not stress our basic weaknesses. Most of us are using DMD, which on Windows uses a 20 year old linker, and utilizes an antique object file format. Under Linux, it can't produce the position-independent code that's required to create reliable shared libraries. Unless you use alpha-level code, you can't load arbitrary D modules at run-time. There isn't a decent debugger for either Windows or Linux. There may never be one if the potential authors see the constant focus on meta-programming - that must make life hell for them. I'm not advocating a return to D1, but I do want to see closure on D2, and an ascent from the constant alpha state. Then after that, I'd like to see a more formal system of RFCs for library proposals, and a recognized pattern for voting on them so that anyone who kept up-to-date with the process would not be surprised by what suddenly appeared in Phobos, or perhaps it should be the D Standard Library (DSL). When all that had happened I could forget computer programming and get on with my woodwork relatively secure in the knowledge that I had chosen to support a winner, and the Walter's efforts were not in vain.
Jun 19 2009
Steve Teale Wrote:Can this group come up with a proper, sober (OK, I'm not)den pretty please explain why anyone should give a flyin' fuck fer yer drunken rant.
Jun 19 2009
superdan wrote:Steve Teale Wrote:You just gave a flying fuck.Can this group come up with a proper, sober (OK, I'm not)den pretty please explain why anyone should give a flyin' fuck fer yer drunken rant.
Jun 19 2009
grauzone Wrote:superdan wrote:negative. i stopped readin' after da first line. dat counts at most for a crawlin' fuck.Steve Teale Wrote:You just gave a flying fuck.Can this group come up with a proper, sober (OK, I'm not)den pretty please explain why anyone should give a flyin' fuck fer yer drunken rant.
Jun 19 2009
superdan Wrote:Steve Teale Wrote:Love you man. You're on the spot! I have no excuse.Can this group come up with a proper, sober (OK, I'm not)den pretty please explain why anyone should give a flyin' fuck fer yer drunken rant.
Jun 21 2009
Steve Teale Wrote:superdan Wrote:not shure u r bein' sarcastic but i'm a gonna take dat at face value. akshully steve u got an excuse. u and i r part of a larger social phenom. i saw many times in da group: sum'thin' good happens with d. then da group reacts negatively with da speed o' light. its like physix: ackshon and reackshon. walt adds features. den we bitch fuck them features, he has 3000 bugs up his ass. walt fixes bugs. den we bitch that not'n' new is cummin' down da pike. andre asks about ranges. we get motherfuckin' bikeshed fight. andre implements them ranges. we bitch about namez syntax and all shit up to the motherfuckin' wazoo. of course if we dun understand ranges dats his fault too. been busy work past week but saw good things. andreis book is on amazon so ppl know it's cummin'. then da case fer d comes out. loved it. even better reddit loves it. momentum iz there. den wat do we do. bearophile writes other side of the coin. what in the name of fuck is his problem. backstabbin' mo'fucker are da nicest words that cum 2 mind after racking 'n' waterboarding my brain. EXIT_SUCCESS up yer ass. den cums da proper case fer d. only good thing is sean's cumback o' da year. thanx sean. den cherry on da cake. finally grauzone. where therez any negative shit about d u bet grauzone is on it like flies on shit. so we get this piece of brain vomit. leave them threadz alone. focus all on rewritin' da windows linker. what an assfucked strategy dat iz. i bet soon ppl will say yeah d is a shitty language but hey it got a great linker. what da fuck. anyway steve. my point is we r part of some weird twilite zone. if d ever becumz successful theres gonna be murder in dis group.Steve Teale Wrote:Love you man. You're on the spot! I have no excuse.Can this group come up with a proper, sober (OK, I'm not)den pretty please explain why anyone should give a flyin' fuck fer yer drunken rant.
Jun 21 2009
superdan Wrote:Steve Teale Wrote:Wow - Boyz n da Hood... Are you writing with a full keyboard? P.O.superdan Wrote:not shure u r bein' sarcastic but i'm a gonna take dat at face value. akshully steve u got an excuse. u and i r part of a larger social phenom. i saw many times in da group: sum'thin' good happens with d. then da group reacts negatively with da speed o' light. its like physix: ackshon and reackshon. walt adds features. den we bitch fuck them features, he has 3000 bugs up his ass. walt fixes bugs. den we bitch that not'n' new is cummin' down da pike. andre asks about ranges. we get motherfuckin' bikeshed fight. andre implements them ranges. we bitch about namez syntax and all shit up to the motherfuckin' wazoo. of course if we dun understand ranges dats his fault too. been busy work past week but saw good things. andreis book is on amazon so ppl know it's cummin'. then da case fer d comes out. loved it. even better reddit loves it. momentum iz there. den wat do we do. bearophile writes other side of the coin. what in the name of fuck is his problem. backstabbin' mo'fucker are da nicest words that cum 2 mind after racking 'n' waterboarding my brain. EXIT_SUCCESS up yer ass. den cums da proper case fer d. only good thing is sean's cumback o' da year. thanx sean. den cherry on da cake. finally grauzone. where therez any negative shit about d u bet grauzone is on it like flies on shit. so we get this piece of brain vomit. leave them threadz alone. focus all on rewritin' da windows linker. what an assfucked strategy dat iz. i bet soon ppl will say yeah d is a shitty language but hey it got a great linker. what da fuck. anyway steve. my point is we r part of some weird twilite zone. if d ever becumz successful theres gonna be murder in dis group.Steve Teale Wrote:Love you man. You're on the spot! I have no excuse.Can this group come up with a proper, sober (OK, I'm not)den pretty please explain why anyone should give a flyin' fuck fer yer drunken rant.
Jun 21 2009
Pete Odowd Wrote:superdan Wrote:menace ii society akshully. heh.Steve Teale Wrote:Wow - Boyz n da Hood... Are you writing with a full keyboard? P.O.superdan Wrote:not shure u r bein' sarcastic but i'm a gonna take dat at face value. akshully steve u got an excuse. u and i r part of a larger social phenom. i saw many times in da group: sum'thin' good happens with d. then da group reacts negatively with da speed o' light. its like physix: ackshon and reackshon. walt adds features. den we bitch fuck them features, he has 3000 bugs up his ass. walt fixes bugs. den we bitch that not'n' new is cummin' down da pike. andre asks about ranges. we get motherfuckin' bikeshed fight. andre implements them ranges. we bitch about namez syntax and all shit up to the motherfuckin' wazoo. of course if we dun understand ranges dats his fault too. been busy work past week but saw good things. andreis book is on amazon so ppl know it's cummin'. then da case fer d comes out. loved it. even better reddit loves it. momentum iz there. den wat do we do. bearophile writes other side of the coin. what in the name of fuck is his problem. backstabbin' mo'fucker are da nicest words that cum 2 mind after racking 'n' waterboarding my brain. EXIT_SUCCESS up yer ass. den cums da proper case fer d. only good thing is sean's cumback o' da year. thanx sean. den cherry on da cake. finally grauzone. where therez any negative shit about d u bet grauzone is on it like flies on shit. so we get this piece of brain vomit. leave them threadz alone. focus all on rewritin' da windows linker. what an assfucked strategy dat iz. i bet soon ppl will say yeah d is a shitty language but hey it got a great linker. what da fuck. anyway steve. my point is we r part of some weird twilite zone. if d ever becumz successful theres gonna be murder in dis group.Steve Teale Wrote:Love you man. You're on the spot! I have no excuse.Can this group come up with a proper, sober (OK, I'm not)den pretty please explain why anyone should give a flyin' fuck fer yer drunken rant.
Jun 22 2009
On Fri, Jun 19, 2009 at 03:00:17PM -0400, Steve Teale wrote:Can this group come up with a proper, sober (OK, I'm not), case for D.It is a better C; D is what C++ wishes it was. My biggest love of D is two words: nested functions. I tend to write it as if it was just C with the suck yanked out. D2 is a better D1; you can write it in a similar way, but get even more help from the compiler to catch errors. D is the safe AND convenient language.There isn't a decent debugger for either Windows or Linux.I find gdb works well enough for me on linux. I use the -gc "pretend to be C" option. But I rarely really need the debugger, thanks to the compiler. -- Adam D. Ruppe http://arsdnet.net
Jun 19 2009
Adam D. Ruppe Wrote:On Fri, Jun 19, 2009 at 03:00:17PM -0400, Steve Teale wrote:Yes, you're right about not needing a debugger. Walter's compilers have always given you a good idea of where you should look. But there are lots of potential users who do not know how to debug without an IDE debugger. After all, the seat-of-the-pants way is quite hard work.Can this group come up with a proper, sober (OK, I'm not), case for D.It is a better C; D is what C++ wishes it was. My biggest love of D is two words: nested functions. I tend to write it as if it was just C with the suck yanked out. D2 is a better D1; you can write it in a similar way, but get even more help from the compiler to catch errors. D is the safe AND convenient language.There isn't a decent debugger for either Windows or Linux.I find gdb works well enough for me on linux. I use the -gc "pretend to be C" option. But I rarely really need the debugger, thanks to the compiler. -- Adam D. Ruppe http://arsdnet.net
Jun 21 2009
Reply to Steve,When Bjarne Stroustrup was originally promoting C++, he made a strong point that you could at least consider it to be a 'better C'. This point, it seemed to me, was lost on many. Now we are looking for radical arguments as to why D is a cool language. Maybe we should remember the basics, and concentrate less on the vapor."D is a low level language that can masquerade as a high level language" It has the low level stuff but if you just choose not to use them it looks and to a great extent acts like a high level one.Bearophile made a counter-argument. But this also did not stress our basic weaknesses. Most of us are using DMD, which on Windows uses a 20 year old linker, and utilizes an antique object file format.DMD now has 3 (or is it 4) different object file outputters. it shouldn't be hard from somone who knows somthing about a better format to be able to figure out how to patch one in and send Walter a patch.or perhaps it should be the D Standard Library (DSL).No, DSL is already used. DSR? D standard runtime?
Jun 19 2009
Uppercase. Calling it 'd' lacks a certain punch.
Jun 19 2009
Op Fri, 19 Jun 2009 22:53:54 +0200 schreef Sean Kelly <sean invisibleduck.org>:Uppercase.Thats awesome, made me chuckle. :-)Calling it 'd' lacks a certain punch.
Jun 19 2009
On Fri, Jun 19, 2009 at 4:53 PM, Sean Kelly<sean invisibleduck.org> wrote:Uppercase. =A0Calling it 'd' lacks a certain punch."The groan heard 'round the world"
Jun 19 2009
Sean Kelly wrote:Uppercase. Calling it 'd' lacks a certain punch.You know, that's exactly what I assumed the post was going to be about when I saw the title... :D
Jun 20 2009
Many will argue that D has lots of features found in many other languages but I think that it was born from and is still chosen for need for the need to run high performance code on the bare metal without using C++ so try this: 1. Find code written in C++. 2. Attempt to re write it as D. This 2 step should expose the cases not to use D.
Jun 19 2009
Steve Teale wrote:Can this group come up with a proper, sober (OK, I'm not), case for D. This would clearly have to steer clear of the standard libraries, I can't see how any outside observer is going to be impressed by the fact that we have two. And D is a computer programming language. So we should deal with it as that first. Andrei's article had a lot of good points primarily revolving around the need to concentrate on concurrency, but I suspect that we should probably stress the basics. When Bjarne Stroustrup was originally promoting C++, he made a strong point that you could at least consider it to be a 'better C'. This point, it seemed to me, was lost on many. Now we are looking for radical arguments as to why D is a cool language. Maybe we should remember the basics, and concentrate less on the vapor. Bearophile made a counter-argument. But this also did not stress our basic weaknesses. Most of us are using DMD, which on Windows uses a 20 year old linker, and utilizes an antique object file format. Under Linux, it can't produce the position-independent code that's required to create reliable shared libraries. Unless you use alpha-level code, you can't load arbitrary D modules at run-time. There isn't a decent debugger for either Windows or Linux. There may never be one if the potential authors see the constant focus on meta-programming - that must make life hell for them. I'm not advocating a return to D1, but I do want to see closure on D2, and an ascent from the constant alpha state. Then after that, I'd like to see a more formal system of RFCs for library proposals, and a recognized pattern for voting on them so that anyone who kept up-to-date with the process would not be surprised by what suddenly appeared in Phobos, or perhaps it should be the D Standard Library (DSL). When all that had happened I could forget computer programming and get on with my woodwork relatively secure in the knowledge that I had chosen to support a winner, and the Walter's efforts were not in vain.I think the proper case for D has to be in the form of (several) real-world applications/system-utilities that people outside this newsgroup will *want* to use, not because they're written in D, but because these programs actually do something useful that a lot of people would really want. Games are certainly a good use case for D, but developing a good game takes a long time and in the end it won't compete with any of the available commercial games. There are (surprisingly) many small utilities that do something very simple, yet they're very useful and are used by a lots of people, Just to name a few ... - Launchy - safarp (simple and fast add/remove programs) - Sumatra PDF viewer - WinDjView - Fotografix (extremely tiny image editor, http://lmadhavan.com/software/fotografix/ ) - Rapid Environment Editor - WinDirStat - Unlocker These are very useful "system" (kinda?) utilities ,IMO there's lots of room for programs in this category to be written in D, either programs that are not written yet, or written but have sub-optimal performance. (for instance, launchy can be slow sometimes). Of course, the end users of such utilities might not care much about what language they're written in; but that's exactly the point.
Jun 20 2009
superdan Wrote:Steve Teale Wrote:And your response is why D is never going to be more than a beta compiler and interesting discussion piece between a small number of programmers. If it wants to compete with the 'big boys' it needs an IDE, a GUI library that can compile and work, a debugger that understands D, a proper linker, packaged releases for linux, an installer for Windows, etc. D2 is in danger of becoming a camel i.e. a horse designed by a committee... Frank.Can this group come up with a proper, sober (OK, I'm not)den pretty please explain why anyone should give a flyin' fuck fer yer drunken rant.
Jun 20 2009
Frank Rundell wrote:superdan Wrote:? As far as I know, the 'committee' consists of a gang of three, with Walter firmly at the driving seat, all working very hard to flesh out a language, create an innovative library and quality compiler. All the tools and libraries you mention are being created. In addition there's also LDC which is shaping up nicely. Not to say everything is already here, but that is a question of time and manpower, not direction. What's up with all the negativity lately? Impatience?Steve Teale Wrote:And your response is why D is never going to be more than a beta compiler and interesting discussion piece between a small number of programmers. If it wants to compete with the 'big boys' it needs an IDE, a GUI library that can compile and work, a debugger that understands D, a proper linker, packaged releases for linux, an installer for Windows, etc. D2 is in danger of becoming a camel i.e. a horse designed by a committee... Frank.Can this group come up with a proper, sober (OK, I'm not)den pretty please explain why anyone should give a flyin' fuck fer yer drunken rant.
Jun 20 2009
Lutger wrote: ...What's up with all the negativity lately? Impatience?Or is everybody drunk, am I missing a party?
Jun 20 2009
Some people think D2 tries too much, and neglects the really important things at the same time. For example, D2 tries to solve the concurrency issue (which is a hot topic which makes D look good at sites like stackoverflow), while still relying on a 20 years old linker written in assembler.D2 is in danger of becoming a camel i.e. a horse designed by a committee... Frank.? As far as I know, the 'committee' consists of a gang of three, with Walter firmly at the driving seat, all working very hard to flesh out a language, create an innovative library and quality compiler. All the tools and libraries you mention are being created. In addition there's also LDC which is shaping up nicely. Not to say everything is already here, but that is a question of time and manpower, not direction. What's up with all the negativity lately? Impatience?
Jun 20 2009
grauzone wrote:So the better direction according to some is to stagnate language design for D2 so Walter Bright can reinvent the linker? So that years later when asked why D didn't do more for concurrency when it was needed, you'd have to reply: "well there wasn't any time to deal with such trivial issues, the language designer had to work on the toolchain."Some people think D2 tries too much, and neglects the really important things at the same time. For example, D2 tries to solve the concurrency issue (which is a hot topic which makes D look good at sites like stackoverflow), while still relying on a 20 years old linker written in assembler.D2 is in danger of becoming a camel i.e. a horse designed by a committee... Frank.? As far as I know, the 'committee' consists of a gang of three, with Walter firmly at the driving seat, all working very hard to flesh out a language, create an innovative library and quality compiler. All the tools and libraries you mention are being created. In addition there's also LDC which is shaping up nicely. Not to say everything is already here, but that is a question of time and manpower, not direction. What's up with all the negativity lately? Impatience?
Jun 20 2009
So the better direction according to some is to stagnate language design for D2 so Walter Bright can reinvent the linker? So that years later when askedNo, but to use a real linker instead of that piece of crap.why D didn't do more for concurrency when it was needed, you'd have to reply: "well there wasn't any time to deal with such trivial issues, the language designer had to work on the toolchain."Eh, you seriously think D2 would still be in use at that time? We will have D325858 which broke backwards compatibility for the 325858th time. This issue (multithreading) seriously could wait a bit longer. The most hilarious thing is that multithreading support in Phobos was incredibly buggy, and even today, basic multithreading primitives like condition variables are lacking from Phobos. Oh yeah, we got builtin mutexes so that we can say "D supports multithreading on the language level". Funny.
Jun 20 2009
grauzone wrote:With objconv, it might be possible to use a different linker on Windows. I'm considering doing so since Optlink won't work with the debug build of one of my libraries (it's 22MB), and it doesn't seem to discard any unreferenced library symbols, so the release build of my code is ~9.5MB, while it should be ~4.So the better direction according to some is to stagnate language design for D2 so Walter Bright can reinvent the linker? So that years later when askedNo, but to use a real linker instead of that piece of crap.
Jun 20 2009
Robert Fraser wrote:I'm considering doing so since Optlink won't work with the debug build of one of my libraries (it's 22MB),Is this reported in bugzilla?and it doesn't seem to discard any unreferenced library symbols, so the release build of my code is ~9.5MB, while it should be ~4.Optlink does not discard unreference symbols, it just doesn't pull them in from the library. If it did always pull in everything from the library, then the minimum D executable size will be the size of Phobos. Since that isn't happening, something else is happening with your code. I bet that those unreferenced symbols *are* being referenced. You can determine this by using the librarian to remove those 'unreferenced' symbols from Phobos, and then link, and see if there are any unresolved symbol error messages.
Jun 20 2009
On Sat, Jun 20, 2009 at 11:35 PM, Walter Bright<newshound1 digitalmars.com> wrote:Robert Fraser wrote:http://d.puremagic.com/issues/show_bug.cgi?id=424 He's not the only one. Ask me, Tom S., eldar..I'm considering doing so since Optlink won't work with the debug build of one of my libraries (it's 22MB),Is this reported in bugzilla?
Jun 20 2009
Jarrett Billingsley wrote:On Sat, Jun 20, 2009 at 11:35 PM, Walter Bright<newshound1 digitalmars.com> wrote:1. Robert doesn't say if that is the issue or not. 2. The last comment in the bug report is a request for a reproducible test case. I need one.Robert Fraser wrote:http://d.puremagic.com/issues/show_bug.cgi?id=424 He's not the only one. Ask me, Tom S., eldar..I'm considering doing so since Optlink won't work with the debug build of one of my libraries (it's 22MB),Is this reported in bugzilla?
Jun 20 2009
On Sun, Jun 21, 2009 at 1:27 AM, Walter Bright<newshound1 digitalmars.com> wrote:Jarrett Billingsley wrote:Fair enough, though I'm just speaking from experience here. Large objects =3D lots of fixups =3D dead OPTLINK.On Sat, Jun 20, 2009 at 11:35 PM, Walter Bright<newshound1 digitalmars.com> wrote:1. Robert doesn't say if that is the issue or not.Robert Fraser wrote:http://d.puremagic.com/issues/show_bug.cgi?id=3D424 He's not the only one. =A0Ask me, Tom S., eldar..I'm considering doing so since Optlink won't work with the debug build of one of my libraries (it's 22MB),Is this reported in bugzilla?2. The last comment in the bug report is a request for a reproducible tes=tcase. I need one.I've just posted one.
Jun 20 2009
Jarrett Billingsley wrote:On Sun, Jun 21, 2009 at 1:27 AM, Walter Bright<newshound1 digitalmars.com> wrote:Thank you.2. The last comment in the bug report is a request for a reproducible test case. I need one.I've just posted one.
Jun 21 2009
Walter Bright wrote:Optlink does not discard unreference symbols, it just doesn't pull them in from the library. If it did always pull in everything from the library, then the minimum D executable size will be the size of Phobos. Since that isn't happening, something else is happening with your code. I bet that those unreferenced symbols *are* being referenced. You can determine this by using the librarian to remove those 'unreferenced' symbols from Phobos, and then link, and see if there are any unresolved symbol error messages.Hmmm... well, I built a 3rd-party library (Platinum UPnP + Neptune) into two static libraries (with VS). I then wrote a C wrapper function around one, just to test out the functionality I needed (a fraction of what was available). Originally, I wanted to statically link it with my D project so I ran objconv on the libs (COFF -> OMF). I created a test D app that was basically just: extern(C) int cMain(); int main(char[][] args) { return cMain(); } ... And linked it to the OMF version of the library. Worked fine, but the result was ~12MB, which is about 200k larger than the two libraries. I'm now using VC++ to build it into a DLL that exposes the function. 802kb for a debug DLL, 280k for a release. The same thing is happening with my other library (ffmpeg -- libavcodec, libavformat, libavutil and swscale), which I built as static libraries with MinGW gcc and converted again with objconv. In this case, I'm too lazy to create a DLL to wrap only the functions I want, though I may end up doing just that once my project gets closer to usable.
Jun 21 2009
Robert Fraser wrote:Hmmm... well, I built a 3rd-party library (Platinum UPnP + Neptune) into two static libraries (with VS). I then wrote a C wrapper function around one, just to test out the functionality I needed (a fraction of what was available). Originally, I wanted to statically link it with my D project so I ran objconv on the libs (COFF -> OMF). I created a test D app that was basically just: extern(C) int cMain(); int main(char[][] args) { return cMain(); } ... And linked it to the OMF version of the library. Worked fine, but the result was ~12MB, which is about 200k larger than the two libraries. I'm now using VC++ to build it into a DLL that exposes the function. 802kb for a debug DLL, 280k for a release. The same thing is happening with my other library (ffmpeg -- libavcodec, libavformat, libavutil and swscale), which I built as static libraries with MinGW gcc and converted again with objconv. In this case, I'm too lazy to create a DLL to wrap only the functions I want, though I may end up doing just that once my project gets closer to usable.It may be a problem with objconv where it puts everything into one obj file.
Jun 21 2009
Walter Bright wrote:Robert Fraser wrote:Update on this -- I built it as a DLL in VS, exposing only the functions I need. The DLL is just under 5MB in release mode, and it took my main program down to 823k. Your explanation sounds likely, however it seems VS is discriminating on the per-symbol level...? I'm going to need to make sure runtime CPU detection was still built in, though; VS may have been too smart for its own good.Hmmm... well, I built a 3rd-party library (Platinum UPnP + Neptune) into two static libraries (with VS). I then wrote a C wrapper function around one, just to test out the functionality I needed (a fraction of what was available). Originally, I wanted to statically link it with my D project so I ran objconv on the libs (COFF -> OMF). I created a test D app that was basically just: extern(C) int cMain(); int main(char[][] args) { return cMain(); } ... And linked it to the OMF version of the library. Worked fine, but the result was ~12MB, which is about 200k larger than the two libraries. I'm now using VC++ to build it into a DLL that exposes the function. 802kb for a debug DLL, 280k for a release. The same thing is happening with my other library (ffmpeg -- libavcodec, libavformat, libavutil and swscale), which I built as static libraries with MinGW gcc and converted again with objconv. In this case, I'm too lazy to create a DLL to wrap only the functions I want, though I may end up doing just that once my project gets closer to usable.It may be a problem with objconv where it puts everything into one obj file.
Jun 21 2009
Robert Fraser wrote:Your explanation sounds likely, however it seems VS is discriminating on the per-symbol level...?Let's say the C++ source file looks like: ---------------------------- int foo() { ... } int bar() { ... } ---------------------------- it is compiled and put into a library. Your program references foo(). Pulling in the object module from the library that contains foo() also pulls in bar(), because bar() is in the same object module. If bar() references a bunch of other stuff, that gets pulled in, too. VS may contain some scheme to split a source file into multiple object modules which prevents this. Note that dmd will split a single source file into multiple object modules when you compile with -lib.
Jun 21 2009
Walter Bright Wrote:Robert Fraser wrote:Ah, thanks for the explanation. I didn't understand it pulled in whole object files at once, though given that libraries are just archives of object files, I should have assumed.Your explanation sounds likely, however it seems VS is discriminating on the per-symbol level...?Let's say the C++ source file looks like: ---------------------------- int foo() { ... } int bar() { ... } ---------------------------- it is compiled and put into a library. Your program references foo(). Pulling in the object module from the library that contains foo() also pulls in bar(), because bar() is in the same object module. If bar() references a bunch of other stuff, that gets pulled in, too. VS may contain some scheme to split a source file into multiple object modules which prevents this. Note that dmd will split a single source file into multiple object modules when you compile with -lib.
Jun 21 2009
robert fraser wrote:Ah, thanks for the explanation. I didn't understand it pulled in whole object files at once, though given that libraries are just archives of object files, I should have assumed.The linker can eliminate some unused COMDATs from the object file, but in general this isn't very effective because most of the semantic information is gone. That's what makes the -lib switch so nifty, it does the splitting up with full knowledge of the semantic info, so it does a proper job of it.
Jun 21 2009
Hello Robert,The same thing is happening with my other library (ffmpeg -- libavcodec, libavformat, libavutil and swscale), which I built as static libraries with MinGW gcc and converted again with objconv. In this case, I'm too lazy to create a DLL to wrap only the functions I want, though I may end up doing just that once my project gets closer to usable.what is needed is a reference graph tool and .exe inspector tool.
Jun 21 2009
grauzone wrote:And this real linker is going to magically appear from nowhere?So the better direction according to some is to stagnate language design for D2 so Walter Bright can reinvent the linker? So that years later when askedNo, but to use a real linker instead of that piece of crap.D1 is stable and actively supported. Tango has the functionality. LDC has the linker and work is being done that other OS. Now, what is problem? Really I don't understand. But ok, if you don't think of multithreading to be a big deal and find existing solutions perfectly adequate, generic programming a niche functionality and functional programming overrated, then the whole D2 deal certainly looks like a wasted effort better spend on writing a linker.why D didn't do more for concurrency when it was needed, you'd have to reply: "well there wasn't any time to deal with such trivial issues, the language designer had to work on the toolchain."Eh, you seriously think D2 would still be in use at that time? We will have D325858 which broke backwards compatibility for the 325858th time. This issue (multithreading) seriously could wait a bit longer. The most hilarious thing is that multithreading support in Phobos was incredibly buggy, and even today, basic multithreading primitives like condition variables are lacking from Phobos. Oh yeah, we got builtin mutexes so that we can say "D supports multithreading on the language level". Funny.
Jun 20 2009
You are of course completely correct in this, but the question is, can you do a new linker? I can't. There must be someone out there who can - please, please.So the better direction according to some is to stagnate language design for D2 so Walter Bright can reinvent the linker? So that years later when asked why D didn't do more for concurrency when it was needed, you'd have to reply: "well there wasn't any time to deal with such trivial issues, the language designer had to work on the toolchain."What's up with all the negativity lately? Impatience?Some people think D2 tries too much, and neglects the really important things at the same time. For example, D2 tries to solve the concurrency issue (which is a hot topic which makes D look good at sites like stackoverflow), while still relying on a 20 years old linker written in assembler.
Jun 21 2009
Steve Teale wrote:tWhat's up with all the negativity lately? Impatience?Some people think D2 tries too much, and neglects the really importan=cythings at the same time. For example, D2 tries to solve the concurren=inissue (which is a hot topic which makes D look good at sites like stackoverflow), while still relying on a 20 years old linker written =gn for=20assembler.So the better direction according to some is to stagnate language desi=asked=20D2 so Walter Bright can reinvent the linker? So that years later when ==20why D didn't do more for concurrency when it was needed, you'd have to=he=20reply: "well there wasn't any time to deal with such trivial issues, t=an - please, please.language designer had to work on the toolchain."You are of course completely correct in this, but the question is, can you do a new linker? I can't. There must be someone out there who c==20 =20http://www.gnu.org/software/binutils/ ? Jerome --=20 mailto:jeberger free.fr http://jeberger.free.fr Jabber: jeberger jabber.fr
Jun 21 2009
== Quote from grauzone (none example.net)'s articleBut linkers are an implementation detail, threading is really central to what you'd call "the language". To me the most important thing for Walter is to get a stable, well-thought out spec and a "good enough" reference/proof of concept implementation of that spec out the door. This means implementing all features that are going to be implemented and fixing real showstopper bugs that severely affect the usability of these features ASAP. For most people, while having a less than ideal toolchain is annoying, having a moving target is completely useless. Furthermore, if D didn't bother with new features and was just a slightly better C++/Java, the switching costs wouldn't be justified. Another thing to take into account is that mistakes in the spec (and to some extent the reference implementation is a de facto spec) are a lot more permanent than bad toolchain implementaitons. Creating a real top-of-the-line toolchain is something that can be done after the spec is finalized and the features implemented without breaking anything. This includes improving the linker, fixing bugs that don't fundamentally affect the usability of language features, improving performance, etc. It is also something that can be (and is being) done by the community, i.e. people other than Walter.Some people think D2 tries too much, and neglects the really important things at the same time. For example, D2 tries to solve the concurrency issue (which is a hot topic which makes D look good at sites like stackoverflow), while still relying on a 20 years old linker written in assembler.D2 is in danger of becoming a camel i.e. a horse designed by a committee... Frank.? As far as I know, the 'committee' consists of a gang of three, with Walter firmly at the driving seat, all working very hard to flesh out a language, create an innovative library and quality compiler. All the tools and libraries you mention are being created. In addition there's also LDC which is shaping up nicely. Not to say everything is already here, but that is a question of time and manpower, not direction. What's up with all the negativity lately? Impatience?
Jun 20 2009
Steve Teale a écrit :Can this group come up with a proper, sober (OK, I'm not), case for D. This would clearly have to steer clear of the standard libraries, I can't see how any outside observer is going to be impressed by the fact that we have two. And D is a computer programming language. So we should deal with it as that first. Andrei's article had a lot of good points primarily revolving around the need to concentrate on concurrency, but I suspect that we should probably stress the basics. When Bjarne Stroustrup was originally promoting C++, he made a strong point that you could at least consider it to be a 'better C'. This point, it seemed to me, was lost on many. Now we are looking for radical arguments as to why D is a cool language. Maybe we should remember the basics, and concentrate less on the vapor. Bearophile made a counter-argument. But this also did not stress our basic weaknesses. Most of us are using DMD, which on Windows uses a 20 year old linker, and utilizes an antique object file format. Under Linux, it can't produce the position-independent code that's required to create reliable shared libraries. Unless you use alpha-level code, you can't load arbitrary D modules at run-time. There isn't a decent debugger for either Windows or Linux. There may never be one if the potential authors see the constant focus on meta-programming - that must make life hell for them. I'm not advocating a return to D1, but I do want to see closure on D2, and an ascent from the constant alpha state. Then after that, I'd like to see a more formal system of RFCs for library proposals, and a recognized pattern for voting on them so that anyone who kept up-to-date with the process would not be surprised by what suddenly appeared in Phobos, or perhaps it should be the D Standard Library (DSL). When all that had happened I could forget computer programming and get on with my woodwork relatively secure in the knowledge that I had chosen to support a winner, and the Walter's efforts were not in vain.I totally agree! Everybody i know that tried D have the same problems, so they all stick with C++. The D language is amazing but the tools are awful. There is tools but nothing works together out of the box! The user experience of D is very bad! formats, IDE, debugger...) and all that with one click installers for all platforms. We don't need to reinvent the wheel, just create a synergy between projects! Walter, if you don't want to be the production manager that will put all theses pieces together, you should stick to the language development and hire somebody to handle the development environment!
Jun 20 2009
Steve Teale wrote:Most of us are using DMD, which on Windows uses a 20 year old linker, and utilizes an antique object file format.Knowing the guts of object file formats, the MachO format (used on the Mac) is by far the worst of the three (OMF, MachO, ELF).Under Linux, it can't produce the position-independent code that's required to create reliable shared libraries.Use the -fPIC switch, which has been there for years.
Jun 20 2009
Walter Bright Wrote:Steve Teale wrote:OK Walter, I'd have to go back again and cover that, but at the time I had problems. SteveMost of us are using DMD, which on Windows uses a 20 year old linker, and utilizes an antique object file format.Knowing the guts of object file formats, the MachO format (used on the Mac) is by far the worst of the three (OMF, MachO, ELF).Under Linux, it can't produce the position-independent code that's required to create reliable shared libraries.Use the -fPIC switch, which has been there for years.
Jun 21 2009