Re: crossplatform linking?

2009-03-22 Thread davidl
在 Mon, 23 Mar 2009 13:30:48 +0800,Daniel Keep 写道: davidl wrote: I don't know why there should be different format object files. Couldn't they be much the same. And the linker finally decide how to link them to platform specific binary? MSVC perhaps has already get some idea of this kind,

Re: crossplatform linking?

2009-03-22 Thread Daniel Keep
davidl wrote: > > I don't know why there should be different format object files. Couldn't > they be much the same. And the linker finally decide how to link them to > platform specific binary? > > MSVC perhaps has already get some idea of this kind, the link time code > generation. > > I'm ju

Re: crossplatform linking?

2009-03-22 Thread davidl
在 Mon, 23 Mar 2009 13:11:39 +0800,davidl 写道: I don't know why there should be different format object files. Couldn't they be much the same. And the linker finally decide how to link them to platform specific binary? MSVC perhaps has already get some idea of this kind, the link time code

crossplatform linking?

2009-03-22 Thread davidl
I don't know why there should be different format object files. Couldn't they be much the same. And the linker finally decide how to link them to platform specific binary? MSVC perhaps has already get some idea of this kind, the link time code generation. I'm just curious why on the X86

Re: instance of sub class created in a dll has wired behaviour when cast

2009-03-22 Thread davidl
在 Mon, 23 Mar 2009 11:37:56 +0800,Jarrett Billingsley 写道: 2009/3/22 liyu : I am not sure it's a bug of tango or dmd, so i post it here. The example code as below ... The result is: Library successfully loaded Symbol dllprint found. Address = 0x1000308c mydll.DummyC mydll.DummyC tango.core.

Re: Slashdot article about multicore

2009-03-22 Thread Walter Bright
Jarrett Billingsley wrote: On Sun, Mar 22, 2009 at 9:55 PM, Brian wrote: This sounds like what "pure" functions are going to be for, right? That's more or less exactly what they're for. Only partially. Pure functions are also a valuable tool to aid in modularizing code and self-documenting

Re: instance of sub class created in a dll has wired behaviour when cast

2009-03-22 Thread liyu
"Jarrett Billingsley" wrote in message news:mailman.986.1237779483.22690.digitalmar...@puremagic.com... 2009/3/22 liyu : I am not sure it's a bug of tango or dmd, so i post it here. The example code as below ... The result is: Library successfully loaded Symbol dllprint found. Address = 0x1

Re: Is DSSS still being developed?

2009-03-22 Thread BCS
Hello Derek, On Sun, 22 Mar 2009 21:27:09 + (UTC), BCS wrote: Why does every good D project get more or less abandoned? :( Because D is a young man thing. "Young" as in about to dive into school/job/having wife & kids/whatever. We start a project and then real life kicks in. I'm 54 yea

Re: instance of sub class created in a dll has wired behaviour when cast

2009-03-22 Thread Jarrett Billingsley
2009/3/22 liyu : > I am not sure it's a bug of tango or dmd, so i post it here. The example > code as below > > ... > > The result is: > Library successfully loaded > Symbol dllprint found. Address = 0x1000308c > mydll.DummyC > mydll.DummyC > tango.core.exception.assertexcept...@test(35): Assertion

instance of sub class created in a dll has wired behaviour when cast

2009-03-22 Thread liyu
I am not sure it's a bug of tango or dmd, so i post it here. The example code as below //file common module common; abstract class DummyA { } abstract class DummyB : DummyA { } abstract class Factory { DummyB createDummy(); } //file dll module mydll; import common; import tango.s

Re: What can you "new"

2009-03-22 Thread Andrei Alexandrescu
Derek Parnell wrote: On Sun, 22 Mar 2009 14:31:07 -0400, Steve Teale wrote: void str() { auto s = new char[]; } void main() { str(); } produces: str.d(3): Error: new can only create structs, dynamic arrays or class objects, not char[]'s. What am I missing here, isn't char[] a dynamic

Re: Slashdot article about multicore

2009-03-22 Thread Robert Jacques
On Sun, 22 Mar 2009 22:09:53 -0400, Robert Jacques wrote: On Sun, 22 Mar 2009 21:55:04 -0400, Brian wrote: "Windows and Linux Not Well Prepared For Multicore Chips" http://developers.slashdot.org/article.pl?sid=09/03/22/193205&from=rss I wouldn't completely agree that operating systems

Re: What can you "new"

2009-03-22 Thread Derek Parnell
On Mon, 23 Mar 2009 03:30:22 +0300, Denis Koroskin wrote: > I wouldn't recommend using that to anyone. That's a *dirty* hack! That goes without saying ;-) TO BE AVOIDED AT ALL COSTS. -- Derek Parnell Melbourne, Australia skype: derek.j.parnell

Re: Is DSSS still being developed?

2009-03-22 Thread Derek Parnell
On Sun, 22 Mar 2009 16:51:41 -0400, bearophile wrote: > Trass3r: >> Why does every good D project get more or less abandoned? :( > > My hypothesis: > - D1 is felt as a dead end, there's not much purpose in writing > very big programs in it if you will have a D2 beta in some months. Got it in one

Re: Is DSSS still being developed?

2009-03-22 Thread Derek Parnell
On Sun, 22 Mar 2009 21:27:09 + (UTC), BCS wrote: >> Why does every good D project get more or less abandoned? :( > Because D is a young man thing. "Young" as in about to dive into > school/job/having > wife & kids/whatever. We start a project and then real life kicks in. I'm 54 years ol

Re: Slashdot article about multicore

2009-03-22 Thread Robert Jacques
On Sun, 22 Mar 2009 21:55:04 -0400, Brian wrote: "Windows and Linux Not Well Prepared For Multicore Chips" http://developers.slashdot.org/article.pl?sid=09/03/22/193205&from=rss I wouldn't completely agree that operating systems aren't ready for such things. One of the comments reads: "This

Re: Slashdot article about multicore

2009-03-22 Thread Jarrett Billingsley
On Sun, Mar 22, 2009 at 9:55 PM, Brian wrote: > "Windows and Linux Not Well Prepared For Multicore Chips" > http://developers.slashdot.org/article.pl?sid=09/03/22/193205&from=rss > > I wouldn't completely agree that operating systems aren't ready for such > things. > > One of the comments reads: "

Slashdot article about multicore

2009-03-22 Thread Brian
"Windows and Linux Not Well Prepared For Multicore Chips" http://developers.slashdot.org/article.pl?sid=09/03/22/193205&from=rss I wouldn't completely agree that operating systems aren't ready for such things. One of the comments reads: "This is the kind of the the compiler could do just fine .

Re: Please integrate build framework into the compiler

2009-03-22 Thread Christopher Wright
Kristian Kilpi wrote: On Sun, 22 Mar 2009 14:14:39 +0200, Christopher Wright wrote: Kristian Kilpi wrote: #includes/imports are redundant information: the source code of course describes what's used in it. So, the compiler could be aware of the whole project (and the libraries used) instead

Re: What can you "new"

2009-03-22 Thread Denis Koroskin
On Mon, 23 Mar 2009 03:28:09 +0300, Derek Parnell wrote: On Sun, 22 Mar 2009 14:31:07 -0400, Steve Teale wrote: void str() { auto s = new char[]; } void main() { str(); } produces: str.d(3): Error: new can only create structs, dynamic arrays or class objects, not char[]'s. What a

Re: What can you "new"

2009-03-22 Thread Derek Parnell
On Sun, 22 Mar 2009 14:31:07 -0400, Steve Teale wrote: > void str() > { >auto s = new char[]; > } > > void main() > { >str(); > } > > produces: > > str.d(3): Error: new can only create structs, dynamic arrays or class > objects, not char[]'s. > > What am I missing here, isn't char[] a

Re: new D2.0 + C++ language

2009-03-22 Thread Sergey Gromov
Sat, 21 Mar 2009 20:16:07 -0600, Rainer Deyke wrote: > Sergey Gromov wrote: >> I think this is an overstatement. It's only abstract write buffers >> where GC really doesn't work, like std.stream.BufferedFile. In any >> other resource management case I can think of GC works fine. > > OpenGL obje

Re: Please integrate build framework into the compiler

2009-03-22 Thread Unknown W. Brackets
Actually, dmd is so fast I never bother with these "build" utilities. I just send it all the files and have it rebuild everytime, deleting all the o files afterward. This is very fast, even for larger projects. It appears (to me) the static cost of calling dmd is much greater than the dynami

Re: What can you "new"

2009-03-22 Thread Unknown W. Brackets
The new construct allocates memory. You can "new" anything that requires a set amount of memory. This is equivalent to what you want: auto s = new char[0]; Which creates a new dynamic array with no length (yet.) You can resize it later. Remember, that is not the same as saying: char[0] s

Re: Is DSSS still being developed?

2009-03-22 Thread Clay Smith
BCS wrote: Hello Trass3r, Bill Baxter schrieb: Gregor said he got busy with grad school, so basically nothing is happening with it. Maybe when summer break time rolls around? But I'm not holding my breath. Why does every good D project get more or less abandoned? :( Because D is a youn

Re: Is DSSS still being developed?

2009-03-22 Thread Trass3r
bearophile schrieb: - D1 is felt as a dead end, there's not much purpose in writing very big programs in it if you will have a D2 beta in some months. Yeah, already heard that from various developers. But porting to D2 isn't THAT hard in the end. - Most D projects are created for nonprofessi

Re: Is DSSS still being developed?

2009-03-22 Thread BCS
Hello Trass3r, Bill Baxter schrieb: Gregor said he got busy with grad school, so basically nothing is happening with it. Maybe when summer break time rolls around? But I'm not holding my breath. Why does every good D project get more or less abandoned? :( Because D is a young man thing.

Re: Response files

2009-03-22 Thread BCS
Hello Walter, I keep seeing that as "AARP", the outfit that has started sending me letters to get me to sign up :-( That says nothing. I know of people who get those who can't even vote or drink yet.

Re: Is DSSS still being developed?

2009-03-22 Thread Trass3r
Alexander Pánek schrieb: Do you face any specific problems? Yes, I posted it in the learn section. Maybe my dsss setup is wrong, but I can't find any information about that anywhere.

Re: Is DSSS still being developed?

2009-03-22 Thread bearophile
Trass3r: > Why does every good D project get more or less abandoned? :( My hypothesis: - D1 is felt as a dead end, there's not much purpose in writing very big programs in it if you will have a D2 beta in some months. - There are more D projects than D developers. D is mostly a niche language st

Re: Is DSSS still being developed?

2009-03-22 Thread Trass3r
Bill Baxter schrieb: Gregor said he got busy with grad school, so basically nothing is happening with it. Maybe when summer break time rolls around? But I'm not holding my breath. Why does every good D project get more or less abandoned? :(

Re: Is DSSS still being developed?

2009-03-22 Thread Alexander Pánek
Trass3r wrote: Seems quite inactive? :( Not quite, since Gregor is very busy with studying. Do you face any specific problems?

Re: Is DSSS still being developed?

2009-03-22 Thread Bill Baxter
On Mon, Mar 23, 2009 at 5:20 AM, Trass3r wrote: > Seems quite inactive? :( Gregor said he got busy with grad school, so basically nothing is happening with it. Maybe when summer break time rolls around? But I'm not holding my breath. --bb

Is DSSS still being developed?

2009-03-22 Thread Trass3r
Seems quite inactive? :(

Re: eliminate writeln et comp?

2009-03-22 Thread Bill Baxter
On Mon, Mar 23, 2009 at 5:02 AM, dsimcha wrote: > == Quote from Walter Bright (newshou...@digitalmars.com)'s article >> Having been involved with occasional contract disputes, I concur that >> the simpler and more obvious the language is, the better (and the lower >> your lawyer bill is :-) ). > >

Re: Response files

2009-03-22 Thread Walter Bright
Nick Sabalausky wrote: Heh, very true. Of course, both sides could learn a bit from the other. Sometimes the newest/fanciest/most-popular has loads of drawbacks that the kids just don't have the experience to notice, and sometimes those more experienced end up blinded to things that may very we

Re: eliminate writeln et comp?

2009-03-22 Thread dsimcha
== Quote from Walter Bright (newshou...@digitalmars.com)'s article > Having been involved with occasional contract disputes, I concur that > the simpler and more obvious the language is, the better (and the lower > your lawyer bill is :-) ). A perfect argument for the WTFPL!

Re: Response files

2009-03-22 Thread Walter Bright
Georg Wrede wrote: Young people tend to always choose the absolutely best, while older people value stability and longevity of tools. So, yesterday the best was SCons, today it's AAP, what's it gonna be tomorrow? Old people prefer something like make, that's been around for some time, and w

Re: Licences issues with d runtime

2009-03-22 Thread Sean Kelly
Robert Jacques wrote: Deep in the 'eliminate writeln et comp?' thread there's been a recent discussion about the confusion over Tango licences. In particular, regarding the desire that the standard library shouldn't require binary 'copies' (a.k.a. every single executable compiled using it) from

Re: eliminate writeln et comp?

2009-03-22 Thread Walter Bright
Georg Wrede wrote: Even if this includes "awkward things" (like having to have a constant string in the binary, mentioning Tango in the "About" menu item, or whatever else), it should be stated in layman-understandable terms. Currently, words like "encumbrance", phrases like "provides broad r

Re: What can you "new"

2009-03-22 Thread BCS
Hello Denis, Hmm.. Not a common case, but looks like a bug. Or a clever design decision :P Certainly, you can create an int using new: int* i = new int; Why can't you create 'char[]'? T create(T) { return new T; } int* i = create!(int); // fine char[]* c = create!(char[]); // error that sh

Re: What can you "new"

2009-03-22 Thread Denis Koroskin
On Sun, 22 Mar 2009 21:31:07 +0300, Steve Teale wrote: void str() { auto s = new char[]; } void main() { str(); } produces: str.d(3): Error: new can only create structs, dynamic arrays or class objects, not char[]'s. What am I missing here, isn't char[] a dynamic array? Hmm.. N

Re: What can you "new"

2009-03-22 Thread bearophile
Steve Teale: > What am I missing here, isn't char[] a dynamic array? I suggest you to post such questions to the "learn" newsgroup. D dynamic arrays aren't objects, they are C-like structs that contain a just length and a pointer (no capacity). The "new" for them is needed only to allocate the

What can you "new"

2009-03-22 Thread Steve Teale
void str() { auto s = new char[]; } void main() { str(); } produces: str.d(3): Error: new can only create structs, dynamic arrays or class objects, not char[]'s. What am I missing here, isn't char[] a dynamic array?

Re: Response files

2009-03-22 Thread Nick Sabalausky
"Georg Wrede" wrote in message news:gq5mp9$2ht...@digitalmars.com... > Nick Sabalausky wrote: >> ""Jérôme M. Berger"" wrote: >>> Or use a build system that abstracts all the differences for you. I >>> use SCons all the time to write software that works on both Linux >>> and Windows and I have no

Re: Response files

2009-03-22 Thread Georg Wrede
Jérôme M. Berger wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nick Sabalausky wrote: Yea, I was going to mention that, too. As far as I'm concerned "*make" is the same sort of undead unholy relic as C++. Ie, They've served their use, but these days they're terrible anachronisms that ju

Re: Response files

2009-03-22 Thread Georg Wrede
Nick Sabalausky wrote: ""Jérôme M. Berger"" wrote: Or use a build system that abstracts all the differences for you. I use SCons all the time to write software that works on both Linux and Windows and I have none of the problems you describe: - SCons is released for both Linux and Windows (and

Re: Response files

2009-03-22 Thread Georg Wrede
Andrei Alexandrescu wrote: Walter Bright wrote: Andrei Alexandrescu wrote: .o on Linux, .obj on Windows. OBJSUFFIX_win32 = .obj OBJSUFFIX_linux = .o ... OS = linux ... ... file$(OBJSUFFIX_$(OS)) ... This is so totally neat! I hadn't thought of using macros to generate macros. It's a good

Re: Please integrate build framework into the compiler

2009-03-22 Thread dennis luehring
Such things should of course be told to the compiler somehow. By using the project configuration, or by other means. (It's only a matter of definition.) maybe like delphi did it there is a file called .dpr (delphi project) which holds the absolute/relative pathes for in project used imports it

Re: opImplicitCast

2009-03-22 Thread downs
dsimcha wrote: > Is opImplicitCast (and fixing opCast) anywhere in the pipeline? It seems like > every time I want to create an interesting library type, lack of > opImplicitCast prevents me from making its API nice enough to be worth doing. > In some cases, alias this, which has been proposed,

Re: Licences issues with d runtime

2009-03-22 Thread Robert Jacques
On Sun, 22 Mar 2009 02:16:39 -0400, Walter Bright wrote: Robert Jacques wrote: This is a serious legal obligation which isn't in the primary DMD licence or readme. Would it be possible for the licence in druntime to be unified? (If not, a more prominent notice would be appreciated) Sean

Re: Licences issues with d runtime

2009-03-22 Thread Robert Jacques
On Sun, 22 Mar 2009 02:16:39 -0400, Walter Bright wrote: Robert Jacques wrote: This is a serious legal obligation which isn't in the primary DMD licence or readme. Would it be possible for the licence in druntime to be unified? (If not, a more prominent notice would be appreciated) Sean

Re: Please integrate build framework into the compiler

2009-03-22 Thread Kristian Kilpi
On Sun, 22 Mar 2009 14:14:39 +0200, Christopher Wright wrote: Kristian Kilpi wrote: #includes/imports are redundant information: the source code of course describes what's used in it. So, the compiler could be aware of the whole project (and the libraries used) instead of one file at the

Re: .NET on a string

2009-03-22 Thread Michel Fortin
On 2009-03-22 05:08:55 -0400, Kagamin said: Cristian Vlasceanu Wrote: I passed a proposal of my own to Walter and Andrei, and that is to have D coders explicitly state the intent of using a slice with the "ref" keyword; "ref" is already a legal token in D (at least in 2.0) albeit it is only v

Re: .NET on a string

2009-03-22 Thread Michel Fortin
On 2009-03-22 01:31:28 -0400, "Cristian Vlasceanu" said: Another point that I have a hard time getting accross (even to the language heavy-weights) is that just because it is easy to represent arrays and slices seemlessly IN THE PARTICULAR CASE OF THE DIGITAL MARS BACKEND it does not mean it i

Re: Please integrate build framework into the compiler

2009-03-22 Thread Christopher Wright
Kristian Kilpi wrote: #includes/imports are redundant information: the source code of course describes what's used in it. So, the compiler could be aware of the whole project (and the libraries used) instead of one file at the time. That's not sufficient. I'm using SDL right now; if I type 'Su

Re: Library for Linear Algebra?

2009-03-22 Thread Fawzi Mohamed
On 2009-03-22 09:45:32 +0100, Don said: Trass3r wrote: Don schrieb: I abandoned it largely because array operations got into the language; since then I've been working on getting the low-level math language stuff working. Don't worry, I haven't gone away! I see. http://www.dsource.org

Re: .NET on a string

2009-03-22 Thread Christopher Wright
Kagamin wrote: Cristian Vlasceanu Wrote: I passed a proposal of my own to Walter and Andrei, and that is to have D coders explicitly state the intent of using a slice with the "ref" keyword; "ref" is already a legal token in D (at least in 2.0) albeit it is only valid in the context of a para

Re: .NET on a string

2009-03-22 Thread bearophile
Cristian Vlasceanu: > arrays and > slices seemlessly IN THE PARTICULAR CASE OF THE DIGITAL MARS BACKEND it does > not mean it is going to work as smooth and seamless in other systems. It seems that LLVM (and GCC) too are able to support them well enough. I think D was never designed to be a VM-

Re: Response files

2009-03-22 Thread Jérôme M. Berger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nick Sabalausky wrote: > Yea, I was going to mention that, too. As far as I'm concerned "*make" is > the same sort of undead unholy relic as C++. Ie, They've served their use, > but these days they're terrible anachronisms that just need to be allowe

Re: eliminate writeln et comp?

2009-03-22 Thread Don
Fawzi Mohamed wrote: On 2009-03-21 14:23:51 +0100, Daniel Keep said: Christopher Wright wrote: Daniel Keep wrote: Christopher Wright wrote: Daniel Keep wrote: When was the last time you had to put this in your GCC-compiled programs? "Portions of this program Copyright (C) Free Softwar

Re: .NET on a string

2009-03-22 Thread Kagamin
Cristian Vlasceanu Wrote: > I passed a proposal of my own to Walter and Andrei, and that is to have D > coders explicitly state the intent of using a slice with the "ref" keyword; > "ref" is already a legal token in D (at least in 2.0) albeit it is only > valid in the context of a parameter lis

Re: Please integrate build framework into the compiler

2009-03-22 Thread Kristian Kilpi
On Sat, 21 Mar 2009 22:19:31 +0200, grauzone wrote: I don't really understand what you mean. But if you want the compiler to scan for dependencies, I fully agree. I claim that we don't even need incremental compilation. It would be better if the compiler would scan for dependencies, and if

Re: Response files

2009-03-22 Thread Nick Sabalausky
""Jérôme M. Berger"" wrote in message news:gq4pop$154...@digitalmars.com... > Walter Bright wrote: >> Georg Wrede wrote: >>> 'Round here we say "maassa maan tavalla", which is probably something >>> like "When in Rome, do like the Romans do". >>> >>> Makefiles aren't just a C(++) thing. Unix has

Re: Library for Linear Algebra?

2009-03-22 Thread Don
Trass3r wrote: Don schrieb: I abandoned it largely because array operations got into the language; since then I've been working on getting the low-level math language stuff working. Don't worry, I haven't gone away! I see. http://www.dsource.org/projects/lyla Though array operations st

Re: Response files

2009-03-22 Thread Jérôme M. Berger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Walter Bright wrote: > Georg Wrede wrote: >> 'Round here we say "maassa maan tavalla", which is probably something >> like "When in Rome, do like the Romans do". >> >> Makefiles aren't just a C(++) thing. Unix has a culture of its own, >> Windows (I wo

Re: Please integrate build framework into the compiler

2009-03-22 Thread Ary Borenszweig
davidl escribió: 在 Sun, 22 Mar 2009 12:18:03 +0800,Andrei Alexandrescu 写道: grauzone wrote: My rdmd doesn't know --chatty. Probably the zip file for dmd 1.041 contains an outdated, buggy version. Where can I find the up-to-date source code? Hold off on that for now. Another question, rdmd