Re: Metaprogramming in D tonight at the NWCPP

2009-05-04 Thread Georg Wrede
bearophile wrote: Arild Boes: Here's the link: http://www.vimeo.com/4333802 Globally is a very nice presentation. I like how Walter is never putting himself over the people that are listening. He is humble and at the same level. It has to be a gift! Richard Stallman is the opposite, both

Re: Metaprogramming in D tonight at the NWCPP

2009-05-04 Thread Walter Bright
Georg Wrede wrote: That hit me too. I've been using PP or OO just because, never really thinking. But there are some advantages to using a straight, long document. It's a /lot/ faster to create the presentation. You don't have to split stuff into screenfulls (or fight with the presentation

Re: Metaprogramming in D tonight at the NWCPP

2009-05-04 Thread Walter Bright
Daniel Keep wrote: There's always S5: it lets you make slideshows in HTML. http://meyerweb.com/eric/tools/s5/ After playing with OO Impress for a while, I've found it to be quicker and easier to produce a slideshow with it than with html. For another thing, the fonts render obviously better

Re: Metaprogramming in D tonight at the NWCPP

2009-05-04 Thread Daniel Keep
Walter Bright wrote: Georg Wrede wrote: That hit me too. I've been using PP or OO just because, never really thinking. But there are some advantages to using a straight, long document. It's a /lot/ faster to create the presentation. You don't have to split stuff into screenfulls (or fight

Slide design

2009-05-04 Thread Andrei Alexandrescu
flGeorg Wrede wrote: Walter Bright wrote: Everyone I talked to who was there didn't like it. I think there's the *subconscious* notion of not respecting the audience by bothering to do a Proper Presentation. And they let it seep through, instead of pausing to think about the upsides. (The

Re: Slide design

2009-05-04 Thread Walter Bright
I generally agree with Andrei (and he knows what he's doing, his talks are both entertaining and informative, several cuts above the usual ones I have to sit through). I find after giving a presentation using a non-traditional format, that the non-traditional format becomes the topic of

Re: Slide design

2009-05-04 Thread bearophile
Andrei Alexandrescu: Slides are limited in size and text content simply because there is so much information a person can absorb simultaneously by hearing and seeing. Of course mammal brains have limits, but such limits are always higher than the amount of information shown in normal

Re: Slide design

2009-05-04 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article The slide is not meant to convey complex information with completeness. There is, for example, no hope in putting complex proofs or formulae on the slide. Wow. I really wish the rest of the Ph.D students in this world

Re: Metaprogramming in D tonight at the NWCPP

2009-05-04 Thread Sean Kelly
== Quote from Georg Wrede (georg.wr...@iki.fi)'s article The presentation software format is more restrictive than we usually think. Everything has to be crunched to ridiculous screenfuls, mostly containing a couple of bullet items. And if you want the audience to follow the presentation

Re: dmd 1.041 and 2.026 releases

2009-05-04 Thread Sean Kelly
== Quote from Walter Bright (newshou...@digitalmars.com)'s article dsimcha wrote: == Quote from Ellery Newcomer (ellery-newco...@utulsa.edu)'s article Walter Bright wrote: davesun wrote: when can I use dmd on 64bit linux ? You can now - 32 bit executables work fine on 64 bit linux!

Re: Slide design

2009-05-04 Thread Daniel Keep
Walter Bright wrote: ... o pdf renders a lot better than html. Why that should be, I don't know, but it is obviously better. I could be the old Mac feature. From what I recall, Apple is fanatical about the on-screen display of something matching, as closely as possible, the on-page

Re: Slide design

2009-05-04 Thread superdan
Sean Kelly Wrote: == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article I don't agree. I think there is much more at work here. Slides are limited in size and text content simply because there is so much information a person can absorb simultaneously by hearing and

Re: Metaprogramming in D tonight at the NWCPP

2009-05-04 Thread Georg Wrede
Sean Kelly wrote: == Quote from Georg Wrede (georg.wr...@iki.fi)'s article The presentation software format is more restrictive than we usually think. Everything has to be crunched to ridiculous screenfuls, mostly containing a couple of bullet items. And if you want the audience to follow the

Re: Metaprogramming in D tonight at the NWCPP

2009-05-04 Thread Sean Kelly
Georg Wrede wrote: That's certainly true with non-techie audiences. I wish we had had speaking classes when I went to school. The first time I gave a lecture at the university, my hands trembled visibly on the OH. I'm fine if I can just sit down and talk, but if I have to stand in front of

Re: Metaprogramming in D tonight at the NWCPP

2009-05-04 Thread Brad Roberts
Sean Kelly wrote: Georg Wrede wrote: That's certainly true with non-techie audiences. I wish we had had speaking classes when I went to school. The first time I gave a lecture at the university, my hands trembled visibly on the OH. I'm fine if I can just sit down and talk, but if I have to

Re: D compiler embedding

2009-05-04 Thread Simen Kjaeraas
Peloto wrote: Can I embed the D compiler into my application? For example: Dcompiler c; Dcompiler::result *r = c.compile(mySource.d); fstream f(result.bin); f.write(r-GetBuffer(),r-GetNBytes()); Short answer: No. Long answer: Several people have been asking for this, and there has been at

Re: Many questions

2009-05-04 Thread Robert Fraser
Ellery Newcomer wrote: Nick Sabalausky wrote: - //File: foo/fooA.d module foo.fooA; class fooA {} //File: foo/fooB.d module foo.fooB; class fooB {} //File: foo/fooC.d module foo.fooC; class fooC {} //File: foo/all.d module foo.all; public import foo.fooA;

Re: D compiler embedding

2009-05-04 Thread Robert Fraser
Peloto wrote: And other doubt... where's the Solaris port for the D compiler? I see only Windows, linux, freeBSD and MacOSX. http://www.dsource.org/projects/ldc

Re: Throwable, Exception, and Error

2009-05-04 Thread Steve Teale
Jarrett Billingsley Wrote: On Sun, May 3, 2009 at 4:14 PM, Denis Koroskin 2kor...@gmail.com wrote: PHP allows function definition like this: void foo(Args args, string fileName = __FILE__, int line = __LINE__) {  // do stuff } Hidden feature: D2 allows it too, at least with

Re: Fixing the imaginary/complex mess

2009-05-04 Thread Don
Walter Bright wrote: Don wrote: I don't think anyone expects to be able to divide an integer by an imaginary, and then assign it to an integer. I was astonished that the compiler accepted it. There actually is a reason - completeness. Mathematically, there is a definite answer to it, so why

Re: Many questions

2009-05-04 Thread Liang Du
Nick Sabalausky Wrote: Fractal d294...@bsnow.net wrote in message news:gtlihm$tt...@digitalmars.com... The namespaces: i used them with C++, and the idea of separation between the uses of types, makes a very good layout. Because some namespaces requires more types, always i write

Re: Fixing the imaginary/complex mess

2009-05-04 Thread Don
Frits van Bommel wrote: Don wrote: In the case complex = int/complex, there's no problem. It's the case int = int/complex that doesn't make sense. And that's fundamentally because cast(real)(2 + 3i) doesn't have a definite answer. Devil's advocate: one could argue it's the same as cast(int)

Re: Fixing the imaginary/complex mess

2009-05-04 Thread Frits van Bommel
Don wrote: In the case complex = int/complex, there's no problem. It's the case int = int/complex that doesn't make sense. And that's fundamentally because cast(real)(2 + 3i) doesn't have a definite answer. Devil's advocate: one could argue it's the same as cast(int) of a float -- it returns

Re: Fixing the imaginary/complex mess

2009-05-04 Thread Georg Wrede
Don wrote: Walter Bright wrote: Don wrote: I don't think anyone expects to be able to divide an integer by an imaginary, and then assign it to an integer. I was astonished that the compiler accepted it. There actually is a reason - completeness. Mathematically, there is a definite answer

Re: Fixing the imaginary/complex mess

2009-05-04 Thread bearophile
Don Wrote: Since D supports the very nice .re syntax, there's really no reason to define cast(real) at all. z.re is better in 100% of use cases. There are *NO* use cases for cast(real); any use of cast(real) is a bug. We should kill it. I am with you. Making the language tidy is the way to

Re: Fixing the imaginary/complex mess

2009-05-04 Thread Derek Parnell
On Mon, 04 May 2009 10:56:41 +0200, Frits van Bommel wrote: Don wrote: In the case complex = int/complex, there's no problem. It's the case int = int/complex that doesn't make sense. And that's fundamentally because cast(real)(2 + 3i) doesn't have a definite answer. Devil's advocate:

Re: Fixing the imaginary/complex mess

2009-05-04 Thread Jason House
Frits van Bommel Wrote: Don wrote: In the case complex = int/complex, there's no problem. It's the case int = int/complex that doesn't make sense. And that's fundamentally because cast(real)(2 + 3i) doesn't have a definite answer. Devil's advocate: one could argue it's the same as

Re: Absolutely horrible default string hashing

2009-05-04 Thread Steven Schveighoffer
On Sun, 03 May 2009 08:10:43 -0400, Frits van Bommel fvbom...@remwovexcapss.nl wrote: Jarrett Billingsley wrote: Here's something bizarre: porting this example to Tango yields 7 unique hashes, which is right in line with your estimate. But I think it's bizarre since, well, shouldn't

Re: D compiler embedding

2009-05-04 Thread Jason House
Robert Fraser Wrote: Peloto wrote: And other doubt... where's the Solaris port for the D compiler? I see only Windows, linux, freeBSD and MacOSX. http://www.dsource.org/projects/ldc The Phobos changelog implies the next D1 release will have Dolaris support. D2 support is on hold due

Re: Error: xxx is not an lvalue

2009-05-04 Thread Steven Schveighoffer
On Sun, 03 May 2009 05:25:09 -0400, Unknown W. Brackets unkn...@simplemachines.org wrote: This code works fine (D 2.x only): class Test { private int[int] _testMap; public ref int[int] testMap() {return _testMap;} } void main() { Test test = new Test(); test.testMap[0] = 1; }

Re: Fixing the imaginary/complex mess

2009-05-04 Thread Steven Schveighoffer
On Mon, 04 May 2009 09:44:18 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Georg Wrede wrote: Walter, could the error message then include Please use z.re or z.im to get the parts, instead of a cast. or something. Otherwise we have to explain to all users separately

New regex: Find?

2009-05-04 Thread dsimcha
Is there an *efficient* way to simply test whether a given string contains a given regex in the new std.regex? Using match() and testing for empty works, but this apparently triggers a bunch of unnecessary heap allocation. If not, is this a universal enough feature to warrant an enhancement

Re: New regex: Find?

2009-05-04 Thread Andrei Alexandrescu
dsimcha wrote: Is there an *efficient* way to simply test whether a given string contains a given regex in the new std.regex? Using match() and testing for empty works, but this apparently triggers a bunch of unnecessary heap allocation. If not, is this a universal enough feature to warrant an

Re: For Leandro

2009-05-04 Thread Leandro Lucarella
bearophile, el 3 de mayo a las 15:03 me escribiste: Another small one for Leandro Lucarella: struct S { int a; S* p; } void main() { foreach (ref s; new S*[4_000_000]) s = new S; } Thanks! =) -- Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/

Re: Many questions

2009-05-04 Thread BCS
Hello Saaa, mixins are just code in string form, right? No that's mixin(string), there is also mixin Template!(); that plops the template content into its scope.

Re: Many questions

2009-05-04 Thread BCS
Hello Fractal, Templates: i dont use templates or mixins. they really confuses me and i think so that they only should be used for array classes or something similar. I'm biased (as I love playing with them) but templates can be used for a LOT more than that. Most of the time the end user

Re: RFC: naming for FrontTransversal and Transversal ranges

2009-05-04 Thread Leandro Lucarella
Andrei Alexandrescu, el 3 de mayo a las 11:55 me escribiste: If the array is a reference type, the array dies when the garbage collector decides to run sometime after all live references to the array have died, so RAII is not possible. RAII can be implemented even with reference semantics.

could someone check this on another system?

2009-05-04 Thread BCS
The attached (er. Can't seem to attach the file, I'll e-mail it to anyone who's willing to take a look) has a bug on WinXP DMD 1.040. I can't seem to reduce it at all as anything but trivial changes (like removing dead code) seems to make the bug vanish. The short description is I have some

Re: Many questions

2009-05-04 Thread Saaa
Ah, ok thanks. I should really start reading about those template things :) Hello Saaa, mixins are just code in string form, right? No that's mixin(string), there is also mixin Template!(); that plops the template content into its scope.

Re: could someone check this on another system?

2009-05-04 Thread Georg Wrede
BCS wrote: The attached (er. Can't seem to attach the file, I'll e-mail it to anyone who's willing to take a look) has a bug on WinXP DMD 1.040. I can't seem to reduce it at all as anything but trivial changes (like removing dead code) seems to make the bug vanish. The short description is I

Re: Error: xxx is not an lvalue

2009-05-04 Thread Unknown W. Brackets
I've always though of arrays and associative arrays as structs (which really is what they are.) Thinking that way, this behavior makes exact sense - down to .length being unchangeable and associative arrays being unchangeable. I mean, you wouldn't want to make it work the way you suggest by

Re: Error: xxx is not an lvalue

2009-05-04 Thread Steven Schveighoffer
On Mon, 04 May 2009 14:53:41 -0400, Unknown W. Brackets unkn...@simplemachines.org wrote: I've always though of arrays and associative arrays as structs (which really is what they are.) Thinking that way, this behavior makes exact sense - down to .length being unchangeable and associative

Re: could someone check this on another system?

2009-05-04 Thread BCS
Reply to Georg, BCS wrote: The attached (er. Can't seem to attach the file, I'll e-mail it to anyone who's willing to take a look) has a bug on WinXP DMD 1.040. I can't seem to reduce it at all as anything but trivial changes (like removing dead code) seems to make the bug vanish. The short

Re: could someone check this on another system?

2009-05-04 Thread BCS
Reply to Benjamin, The attached (er. Can't seem to attach the file, I'll e-mail it to anyone who's willing to take a look) has a bug on WinXP DMD 1.040. I can't seem to reduce it at all as anything but trivial changes (like removing dead code) seems to make the bug vanish. The short

Re: could someone check this on another system?

2009-05-04 Thread Nick Sabalausky
BCS n...@anon.com wrote in message news:a6268ff56558cb9ab074256...@news.digitalmars.com... The attached (er. Can't seem to attach the file, I'll e-mail it to anyone who's willing to take a look) has a bug on WinXP DMD 1.040. I can't seem to reduce it at all as anything but trivial changes

Re: could someone check this on another system?

2009-05-04 Thread BCS
Reply to Nick, BCS n...@anon.com wrote in message news:a6268ff56558cb9ab074256...@news.digitalmars.com... The attached (er. Can't seem to attach the file, I'll e-mail it to anyone who's willing to take a look) I got the following on WinXP 32-bit DMD 1.041: true true try the version that

Self function

2009-05-04 Thread bearophile
Sometimes I rename recursive functions, or I duplicate and modify them, and they stop working because inside them there's one or more copy of their old name, so for example they recurse to their old name. So inside a function I'd like to have a standard name to call the function itself, useful

Re: could someone check this on another system?

2009-05-04 Thread Nick Sabalausky
BCS a...@pathlink.com wrote in message news:78ccfa2d3f7098cb9acac6a47...@news.digitalmars.com... Reply to Nick, BCS n...@anon.com wrote in message news:a6268ff56558cb9ab074256...@news.digitalmars.com... The attached (er. Can't seem to attach the file, I'll e-mail it to anyone who's willing

Re: Self function

2009-05-04 Thread Frank Benoit
bearophile schrieb: Sometimes I rename recursive functions, or I duplicate and modify them, and they stop working because inside them there's one or more copy of their old name, so for example they recurse to their old name. So inside a function I'd like to have a standard name to call the

Re: could someone check this on another system?

2009-05-04 Thread BCS
Reply to Nick, Ok, WinXP 32-bit, and on both 1.040 and 1.041 (byte-for-byte identical output on both), my output from go.bat was: ... true ---true Hmm. IIRC my home box gave: true --- false but I just ran it on my work boxes and got: false --- false I'll have to recheck the home

Phobos2: iota, ranges, foreach and more

2009-05-04 Thread bearophile
I am learning a bit more about ranges. They aren't hard to use for simple things. Now I think I understand about 10% of this topic. -- Can you tell me what is the name of the Phobos2 functioid that given a lazy argument, iterates on it and returns the eager array of all its

Re: New regex: Find?

2009-05-04 Thread Derek Parnell
On Mon, 04 May 2009 10:09:56 -0500, Andrei Alexandrescu wrote: dsimcha wrote: Is there an *efficient* way to simply test whether a given string contains a given regex in the new std.regex? Using match() and testing for empty works, but this apparently triggers a bunch of unnecessary heap

Re: Self function

2009-05-04 Thread Denis Koroskin
On Mon, 04 May 2009 23:52:56 +0400, bearophile bearophileh...@lycos.com wrote: Sometimes I rename recursive functions, or I duplicate and modify them, and they stop working because inside them there's one or more copy of their old name, so for example they recurse to their old name. So

Re: Self function

2009-05-04 Thread bearophile
Denis Koroskin: It was proposed awhile ago: http://www.digitalmars.com/d/archives/digitalmars/D/FUNCTION_84985.html I am not asking for a static __function__ name, because you can't use it inside lambdas or function pointers/delegates. The __func I am talking about is a pointer/delegate, and

Re: Many questions

2009-05-04 Thread Yigal Chripun
Daniel Keep wrote: Liang Du wrote: Nick Sabalausky Wrote: Fractal d294...@bsnow.net wrote in message news:gtlihm$tt...@digitalmars.com... The namespaces: i used them with C++, and the idea of separation between the uses of types, makes a very good layout. Because some namespaces requires

Re: Self function

2009-05-04 Thread Denis Koroskin
On Tue, 05 May 2009 02:30:49 +0400, bearophile bearophileh...@lycos.com wrote: Denis Koroskin: It was proposed awhile ago: http://www.digitalmars.com/d/archives/digitalmars/D/FUNCTION_84985.html I am not asking for a static __function__ name, because you can't use it inside lambdas or

Re: Many questions

2009-05-04 Thread bearophile
Yigal Chripun: the downside to the current system is when you have one class in a file, the full name of it will be SomeClass.SomeClass instead of just SomeClass. (because of the redundancy of the module decl. in this case) Generally if classes or functions are small, you put more than one

Re: Many questions

2009-05-04 Thread Fractal
That's debatable. The hateful thing about namespaces is that they give you absolutely ZERO clue as to where any particular thing is coming from. If I see tango.io.device.File, I know exactly where the source for that module is. -- Daniel Yes it is true. But the thing is not where is

Re: Many questions

2009-05-04 Thread bearophile
Fractal: Really module, packages, and namespaces are the same thing. Not really :-) There are semantic differences. Bye, bearophile

Re: New regex: Find?

2009-05-04 Thread Derek Parnell
On Mon, 04 May 2009 16:45:35 -0500, Andrei Alexandrescu wrote: Your answer sounds as if it came from a politian. I emphatically think not, as my answer was precise and did not try to hide anything. Oh, whatever. I apologize without reservation. I'm the type of person that thinks that if

Re: Many questions

2009-05-04 Thread Daniel Keep
Fractal wrote: That's debatable. The hateful thing about namespaces is that they give you absolutely ZERO clue as to where any particular thing is coming from. If I see tango.io.device.File, I know exactly where the source for that module is. -- Daniel Yes it is true. But the thing

Re: Self function

2009-05-04 Thread Georg Wrede
bearophile wrote: Sometimes I rename recursive functions, or I duplicate and modify them, and they stop working because inside them there's one or more copy of their old name, so for example they recurse to their old name. So inside a function I'd like to have a standard name to call the

Re: Self function

2009-05-04 Thread BCS
Reply to Georg, bearophile wrote: Sometimes I rename recursive functions, or I duplicate and modify them, and they stop working because inside them there's one or more copy of their old name, so for example they recurse to their old name. So inside a function I'd like to have a standard

Re: Phobos2: iota, ranges, foreach and more

2009-05-04 Thread Georg Wrede
bearophile wrote: While reading the source code of Phobos2 function calls like .front confuse me, I find .front() more readable. I think I am not the only one to think like this. The docs should be consistent and clear, also in trivial matters. If something is a function, then the parens

Re: New regex: Find?

2009-05-04 Thread Joel C. Salomon
dsimcha wrote: Is there an *efficient* way to simply test whether a given string contains a given regex in the new std.regex? Using match() and testing for empty works, but this apparently triggers a bunch of unnecessary heap allocation. If not, is this a universal enough feature to warrant

Re: Phobos2: iota, ranges, foreach and more

2009-05-04 Thread Andrei Alexandrescu
Georg Wrede wrote: bearophile wrote: While reading the source code of Phobos2 function calls like .front confuse me, I find .front() more readable. I think I am not the only one to think like this. The docs should be consistent and clear, also in trivial matters. If something is a

Re: New regex: Find?

2009-05-04 Thread dsimcha
== Quote from Joel C. Salomon (joelcsalo...@gmail.com)'s article dsimcha wrote: Is there an *efficient* way to simply test whether a given string contains a given regex in the new std.regex? Using match() and testing for empty works, but this apparently triggers a bunch of unnecessary

Re: Many questions

2009-05-04 Thread Robert Fraser
Daniel Keep wrote: Also Namespaces can use upper case characters... documentation indicates that package and module names should be written all in lower case. Oh what rubbish. You can use whatever case you please. On Windows (actually NTFS, I think), you can't two packages/modules that

Re: Phobos2: iota, ranges, foreach and more

2009-05-04 Thread Nick Sabalausky
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote in message news:gto3np$2bl...@digitalmars.com... Georg Wrede wrote: bearophile wrote: While reading the source code of Phobos2 function calls like .front confuse me, I find .front() more readable. I think I am not the only one to think

Re: Self function

2009-05-04 Thread Georg Wrede
BCS wrote: Reply to Georg, bearophile wrote: Sometimes I rename recursive functions, or I duplicate and modify them, and they stop working because inside them there's one or more copy of their old name, so for example they recurse to their old name. So inside a function I'd like to have

Re: New regex: Find?

2009-05-04 Thread Andrei Alexandrescu
dsimcha wrote: == Quote from Joel C. Salomon (joelcsalo...@gmail.com)'s article dsimcha wrote: Is there an *efficient* way to simply test whether a given string contains a given regex in the new std.regex? Using match() and testing for empty works, but this apparently triggers a bunch of

Re: Many questions

2009-05-04 Thread Christopher Wright
Fractal wrote: That's debatable. The hateful thing about namespaces is that they give you absolutely ZERO clue as to where any particular thing is coming from. If I see tango.io.device.File, I know exactly where the source for that module is. -- Daniel Yes it is true. But the thing is not

Re: Absolutely horrible default string hashing

2009-05-04 Thread Sean Kelly
Andrei Alexandrescu wrote: I have exchanged email with Paul Hsieh about using his hash function in Phobos (azillionmonkeys.com) and he said his license is very permissive. I seem to recall I have introduced his hash function, with credit, in Phobos' old runtime but I am not sure whether Sean

Re: Destructors and Deterministic Memory Management

2009-05-04 Thread Sean Kelly
dsimcha wrote: Two closely related topics here: 1. It is often nice to be able to create a single object that works with both GC and deterministic memory management. The idea is that, if delete is called manually, all sub-objects would be freed deterministically, but the object could still

A Modest Proposal: Final class instances

2009-05-04 Thread dsimcha
Several people have griped in the past that D class methods are virtual by default. I've pointed out to them that you can get around this by making the methods final. However, this is a bit of a blunt instrument, because some use cases for a single class may call for polymorphism and other use

DLLs and headaches

2009-05-04 Thread Unknown W. Brackets
This is kinda complicated, hopefully someone will still read it and try it. DLLs typically don't have access to the host process. Sometimes, when creating plugins, such access may be desirable. The typical solution is to have the host and plugins both load a secondary DLL. I've tried to

Re: DLLs and headaches

2009-05-04 Thread Don
Unknown W. Brackets wrote: This is kinda complicated, hopefully someone will still read it and try it. DLLs typically don't have access to the host process. Sometimes, when creating plugins, such access may be desirable. The typical solution is to have the host and plugins both load a

Re: DLLs and headaches

2009-05-04 Thread Unknown W. Brackets
D2; but actually, it kinda works. It crashes on freeing the library, but it loads fine. If I use std.stdio, link says that primary.__ModuleInfo is missing, but that just means it crashes during compile/link. That said, I'm very dissapointed that Runtime doesn't support Posix yet. Means

Re: Need direction guide

2009-05-04 Thread Sam Hu
Hi Denis, Thanks so much for your prompt response. 1.Whether D1 is useful to do something,or it is quite worth to wait for the stable or finalized verison of D2?If yes,what can one do using D1,I mean not just a toy,a test product,rather an serious tool? It is very funny that you

Re: Need direction guide

2009-05-04 Thread Sam Hu
Correctness: But to be honest,almost all D members in the forum are a bit lost for the going of D1 vs D2--- Here the the forum I mean the Chinese D forums.

Re: Need direction guide

2009-05-04 Thread Denis Koroskin
On Mon, 04 May 2009 12:29:54 +0400, Sam Hu samhudotsa...@gmail.com wrote: I have learnt C++ for years and can write simple and short toys.I have been following and learning D for quite a while but I can do nothing except finding ppl like you giant seems just write libs at this moment.I

Re: .dup is null

2009-05-04 Thread Qian Xu
Steven Schveighoffer wrote: I think you might have a bug? .dup is the same as s.dup, not sure why you would expect it to be not-null. -Steve If I have not explained clearly. Here is the full code: char[] s; assert(s is null); assert(s.dup is null); assert( !is null);

Re: .dup is null

2009-05-04 Thread Steven Schveighoffer
On Mon, 04 May 2009 10:22:49 -0400, Qian Xu quian...@stud.tu-ilmenau.de wrote: Steven Schveighoffer wrote: I think you might have a bug? .dup is the same as s.dup, not sure why you would expect it to be not-null. -Steve If I have not explained clearly. Here is the full code: char[]

.dup is null

2009-05-04 Thread Qian Xu
Hi All, The following code will throw an exception: char[] s; assert( s.dup is null); // OK assert(.dup !is null); // FAILED .dup is expectly also an empty string. Is this a compiler bug? --Qian

Re: Need direction guide

2009-05-04 Thread Jarrett Billingsley
On Mon, May 4, 2009 at 5:55 AM, Sam Hu samhudotsa...@gmail.com wrote: Correctness: But to be honest,almost all D members in the forum are a bit  lost for the going of D1 vs D2--- Here the the forum I mean the Chinese D forums. Then more of you should speak up in the newsgroups. Walter

Re: Need direction guide

2009-05-04 Thread Jarrett Billingsley
On Mon, May 4, 2009 at 5:52 AM, Sam Hu samhudotsa...@gmail.com wrote: I do know many projects there written by D1,but how come D1 seems to ppl   just a  pass-by,please correct me if I am wrong. Where do you get that impression? Most code that has been written in D has been written in D1.

Re: .dup is null

2009-05-04 Thread Steven Schveighoffer
On Mon, 04 May 2009 12:09:09 -0400, Georg Wrede georg.wr...@iki.fi wrote: If I remember correctly, string literals are stored with a null appended, so as to make them easier to use with OS calls, etc. Could it be that stores a 1-byte string, consisting with just this null? Then this

Re: D styled data format, Json failed

2009-05-04 Thread nobody
Saaa em...@needmail.com wrote in message news:gtlrs3$1b9...@digitalmars.com... I looked at the JSON format and it seems very inefficient at loading arrays as it isn't limited to one type per array. This is nice when you want to save a small array with different typed elements but for my

[Issue 911] expression.c:4257: virtual Expression* DotIdExp::semantic(Scope*): Assertion `0' failed.

2009-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=911 --- Comment #7 from clugd...@yahoo.com.au 2009-05-04 05:29 --- This all works for me on both DMD1.042 and 2.029 Windows. Can someone who observed the original bug confirm that it is fixed? --

[Issue 2917] std.date fails for all years before 1970

2009-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2917 --- Comment #1 from ghaec...@idworld.net 2009-05-04 05:39 --- Created an attachment (id=348) -- (http://d.puremagic.com/issues/attachment.cgi?id=348action=view) patch for std.date.d v. 2.029 fixes issues with negative time values

[Issue 911] expression.c:4257: virtual Expression* DotIdExp::semantic(Scope*): Assertion `0' failed.

2009-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=911 clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

[Issue 1984] Assertion failure: 'e1-type' on line 1198 in file 'constfold.c'

2009-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1984 --- Comment #2 from clugd...@yahoo.com.au 2009-05-04 07:11 --- Reduced test case shows it's a problem with CTFE and AA literals. immutable bool [int] map = [ 4:true, 5:true ]; int foo () { foreach (x; map.keys) {} return 3;

[Issue 302] in/out contract inheritance yet to be implemented

2009-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=302 --- Comment #12 from ma...@pochta.ru 2009-05-04 08:11 --- Caller can't check descendant contracts, which can succeed. --

[Issue 2913] aliasing a ref type is not possible

2009-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2913 --- Comment #3 from ma...@pochta.ru 2009-05-04 08:44 --- dup of bug 2753? --

[Issue 2935] New: ICE(out.c) using struct with constructor as function default argument

2009-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2935 Summary: ICE(out.c) using struct with constructor as function default argument Product: D Version: 2.029 Platform: PC OS/Version: Windows Status: NEW

[Issue 1994] Assertion failure: 't-deco' on line 597 in file 'mtype.c'

2009-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=1994 clugd...@yahoo.com.au changed: What|Removed |Added CC||ac...@free.fr ---

[Issue 2589] assertion failure when a struct contains a forward referenced, aliased function member.

2009-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2589 clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

[Issue 2934] New: .dup does not return empty string

2009-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2934 Summary: .dup does not return empty string Product: D Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2

[Issue 2934] .dup does not return empty string

2009-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2934 schvei...@yahoo.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

Re: [Issue 2934] .dup does not return empty string

2009-05-04 Thread Derek Parnell
On Mon, 4 May 2009 17:44:56 + (UTC), d-bugm...@puremagic.com wrote: http://d.puremagic.com/issues/show_bug.cgi?id=2934 schvei...@yahoo.com changed: What|Removed |Added

  1   2   >