You crapper encounter...

2012-02-25 Thread Andrei Alexandrescu
Had a good chuckle: http://buztech.org/read-d-programming-ebooks-lesson-1-getting-started.html Andrei

Re: You crapper encounter...

2012-02-25 Thread Andrej Mitrovic
From another article: Inheritance is the noesis. You bet it is.

Re: You crapper encounter...

2012-02-25 Thread torhu
On 26.02.2012 01:34, Andrei Alexandrescu wrote: Had a good chuckle: http://buztech.org/read-d-programming-ebooks-lesson-1-getting-started.html Andrei Did they use Google translate to translate it to Chinese and then back again? That's the worst I've ever seen.

Re: [xmlp] the recent garbage collector performance improvements

2012-02-25 Thread Michael Rynn
On Thu, 02 Feb 2012 15:44:56 +, Richard Webb wrote: With the xml package (xmlp) , and the linked node DOM, the GC is likely to fail cleanup. I divided the generated test file, with its 2 layer elements, into 5, 50, 500, 5000 sized files. I put in a mixin on the Node class to do

Re: Conclusions of the exception discussion

2012-02-25 Thread Johannes Pfau
Am Fri, 24 Feb 2012 21:53:47 -0800 schrieb Jonathan M Davis jmdavisp...@gmx.com: There were other ideas that were discussed in the thread, but I think that these are the ones that we have at least some consensus on. However, given the mess that thread is, we really should make it clear in a

Re: Conclusions of the exception discussion

2012-02-25 Thread Jonathan M Davis
On Saturday, February 25, 2012 10:11:56 Johannes Pfau wrote: Am Fri, 24 Feb 2012 21:53:47 -0800 schrieb Jonathan M Davis jmdavisp...@gmx.com: There were other ideas that were discussed in the thread, but I think that these are the ones that we have at least some consensus on. However,

Re: Conclusions of the exception discussion

2012-02-25 Thread Daniel Murphy
Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.94.1330151556.24984.digitalmar...@puremagic.com... On Saturday, February 25, 2012 17:26:02 Daniel Murphy wrote: Jonathan M Davis jmdavisp...@gmx.com wrote in message

Re: Conclusions of the exception discussion

2012-02-25 Thread Jonathan M Davis
On Saturday, February 25, 2012 21:12:51 Daniel Murphy wrote: Lol I've been around for a while. I know. But particularly over the last few months, you seem to be doing a lot. - Jonathan M Davis

Re: Setting a deadline for setting up shared ?

2012-02-25 Thread Daniel Murphy
deadalnix deadal...@gmail.com wrote in message news:ji8i55$370$1...@digitalmars.com... It would be awesome. As I mentioned several time, I'm readu to help but still struggling with dmd source code. If a guru can boostrap me, I would be happy to help. What would you like to know about it?

Re: Conclusions of the exception discussion

2012-02-25 Thread deadalnix
Le 25/02/2012 10:11, Johannes Pfau a écrit : Am Fri, 24 Feb 2012 21:53:47 -0800 schrieb Jonathan M Davisjmdavisp...@gmx.com: There were other ideas that were discussed in the thread, but I think that these are the ones that we have at least some consensus on. However, given the mess that

Re: Conclusions of the exception discussion

2012-02-25 Thread deadalnix
Le 25/02/2012 07:26, Daniel Murphy a écrit : Jonathan M Davisjmdavisp...@gmx.com wrote in message news:mailman.93.1330149312.24984.digitalmar...@puremagic.com... However, regardless of which we choose, someone is going to have to take the time to implement it, since odds are that Walter isn't

Re: Inheritance of purity

2012-02-25 Thread Timon Gehr
On 02/24/2012 01:41 PM, deadalnix wrote: Le 18/02/2012 19:25, Walter Bright a écrit : On 2/18/2012 6:49 AM, kenji hara wrote: After some thoughts, I agree that inheritance of pure @safe, and nothrow is good feature. But I disagree to const inference, because const attribute interacts with

Re: Inheritance of purity

2012-02-25 Thread Lars T. Kyllingstad
On 24/02/12 11:43, Walter Bright wrote: On 2/23/2012 4:01 PM, F i L wrote: Well then I disagree with Walter on this as well. What's wrong with having a standard toolset in the same way you have standard libraries? It's unrealistic to think people (at large) will be writing any sort of serious

Re: Conclusions of the exception discussion

2012-02-25 Thread Kevin Cox
I think there should also be multiple catches so that you can deal with different exceptions different ways without trying to upcast them over and over again. On Feb 25, 2012 1:30 AM, Daniel Murphy yebbl...@nospamgmail.com wrote: Jonathan M Davis jmdavisp...@gmx.com wrote in message

Re: Conclusions of the exception discussion

2012-02-25 Thread Martin Nowak
It's currently 'catch(auto e : E1, E2, E3)' but changing the syntax is trivial if everyone decides they want it. We should be consistent and allow to specify a type instead of auto. The exception types (E1, E2, E3) should expand TypeTuples similar to how you declare base classes. alias

Re: Conclusions of the exception discussion

2012-02-25 Thread Daniel Murphy
Could you give a code example of what you mean? You can still use multiple catch blocks perfectly well with this patch. Kevin Cox kevincox...@gmail.com wrote in message news:mailman.97.1330172953.24984.digitalmar...@puremagic.com... I think there should also be multiple catches so that you

Re: Conclusions of the exception discussion

2012-02-25 Thread Daniel Murphy
deadalnix deadal...@gmail.com wrote in message news:jiagbg$liu$1...@digitalmars.com... Le 25/02/2012 07:26, Daniel Murphy a écrit : https://github.com/D-Programming-Language/dmd/pull/738 I do think this approach have a flaw. If we go in that direction, then it push devs to create new

Re: The Right Approach to Exceptions

2012-02-25 Thread Timon Gehr
On 02/24/2012 08:14 PM, Andrei Alexandrescu wrote: On 2/24/12 1:13 PM, H. S. Teoh wrote: In my mind, contract code belongs in the function signature, because they document how the function expects to be called, and what it guarantees in return. It doesn't seem to make sense to me that contracts

Re: Conclusions of the exception discussion

2012-02-25 Thread Daniel Murphy
Martin Nowak d...@dawgfoto.de wrote in message news:op.v98ik4hysqu...@dawg-freebsd.lan... It's currently 'catch(auto e : E1, E2, E3)' but changing the syntax is trivial if everyone decides they want it. We should be consistent and allow to specify a type instead of auto. That's a very good

Re: inout and function/delegate parameters

2012-02-25 Thread Timon Gehr
On 02/24/2012 05:26 PM, Steven Schveighoffer wrote: On Sun, 19 Feb 2012 09:27:42 -0500, Stewart Gordon smjg_1...@yahoo.com wrote: At the moment, if a function has an inout parameter, it must have an inout return type. But this prevents doing stuff like void test(ref inout(int)[] x,

Re: dmd -c behaviour doesn't take account of packages.

2012-02-25 Thread Martin Nowak
On Wed, 22 Feb 2012 22:33:35 +0100, Bernard Helyer b.hel...@gmail.com wrote: A discussion on the Mono-D IRC channel just made me realise something. dmd -c foo/a.d bar/a.d The second module overwrites the first. This makes using 'pass everything at once' with Mono-D (IDE plugin)

Re: dmd -c behaviour doesn't take account of packages.

2012-02-25 Thread Sean Kelly
Be aware that if you use an archiver to put these files in a library you'll overwrite one. The command to preserve path name that the archiver provides on some OSes doesn't exist everywhere. On Feb 25, 2012, at 7:09 AM, Martin Nowak d...@dawgfoto.de wrote: On Wed, 22 Feb 2012 22:33:35 +0100,

Re: Conclusions of the exception discussion

2012-02-25 Thread H. S. Teoh
On Sat, Feb 25, 2012 at 10:11:56AM +0100, Johannes Pfau wrote: [...] What about that lisp exception/recovery idea? That was the most interesting idea imho. Deadalnix myself did a few skeletal prototypes of it, and I think it should be possible to implement it on top of the existing exception

John Carmack applauds D's pure attribute

2012-02-25 Thread Trass3r
http://twitter.com/#!/ID_AA_Carmack/status/173111220092682240

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Nick Sabalausky
Trass3r u...@known.com wrote in message news:op.v98sager3ncmek@enigma... http://twitter.com/#!/ID_AA_Carmack/status/173111220092682240 It's not showing the actual quote, can someone paste it?

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Yao Gomez
On Saturday, 25 February 2012 at 16:08:40 UTC, Nick Sabalausky wrote: Trass3r u...@known.com wrote in message news:op.v98sager3ncmek@enigma... http://twitter.com/#!/ID_AA_Carmack/status/173111220092682240 It's not showing the actual quote, can someone paste it? It works for me. God bless

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Andrej Mitrovic
Looks like that GoingNative interview has had some impact. Pretty cool. :)

Re: [RFC]Proposal for better garbage collection

2012-02-25 Thread Timon Gehr
On 02/22/2012 08:40 PM, H. S. Teoh wrote: This would introduce quite a lot of overhead per scope. It will also lead to strange things like: if (x) y(); // faster if (x) { y(); } // slower Those are the same thing. '{ }' is not what introduces a scope.

Re: Inheritance of purity

2012-02-25 Thread deadalnix
Le 25/02/2012 12:40, Timon Gehr a écrit : On 02/24/2012 01:41 PM, deadalnix wrote: Le 18/02/2012 19:25, Walter Bright a écrit : On 2/18/2012 6:49 AM, kenji hara wrote: After some thoughts, I agree that inheritance of pure @safe, and nothrow is good feature. But I disagree to const inference,

Re: Conclusions of the exception discussion

2012-02-25 Thread deadalnix
Le 25/02/2012 14:11, Daniel Murphy a écrit : deadalnixdeadal...@gmail.com wrote in message news:jiagbg$liu$1...@digitalmars.com... Le 25/02/2012 07:26, Daniel Murphy a �crit : https://github.com/D-Programming-Language/dmd/pull/738 I do think this approach have a flaw. If we go in that

Re: Inheritance of purity

2012-02-25 Thread Timon Gehr
On 02/25/2012 06:53 PM, deadalnix wrote: Le 25/02/2012 12:40, Timon Gehr a écrit : On 02/24/2012 01:41 PM, deadalnix wrote: Le 18/02/2012 19:25, Walter Bright a écrit : On 2/18/2012 6:49 AM, kenji hara wrote: After some thoughts, I agree that inheritance of pure @safe, and nothrow is good

Return value of std.process.system

2012-02-25 Thread H. S. Teoh
What should the return value of std.process.system be? I'm looking at issue 6926, and upon investigation found that std.process.system always returns WEXITSTATUS(status) regardless of the value of WIFEXITED(status). This means that if the child process exits with a signal or dumps core, it may

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Nick Sabalausky
Yao Gomez yao.go...@gmail.com wrote in message news:pdyvfpeaigfvorkfn...@forum.dlang.org... On Saturday, 25 February 2012 at 16:08:40 UTC, Nick Sabalausky wrote: Trass3r u...@known.com wrote in message news:op.v98sager3ncmek@enigma...

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Nick Sabalausky
Yao Gomez yao.go...@gmail.com wrote in message news:pdyvfpeaigfvorkfn...@forum.dlang.org... On Saturday, 25 February 2012 at 16:08:40 UTC, Nick Sabalausky wrote: Trass3r u...@known.com wrote in message news:op.v98sager3ncmek@enigma...

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread H. S. Teoh
On Sat, Feb 25, 2012 at 01:45:34PM -0500, Nick Sabalausky wrote: Yao Gomez yao.go...@gmail.com wrote in message news:pdyvfpeaigfvorkfn...@forum.dlang.org... On Saturday, 25 February 2012 at 16:08:40 UTC, Nick Sabalausky wrote: Trass3r u...@known.com wrote in message

Re: Return value of std.process.system

2012-02-25 Thread Artur Skawina
On 02/25/12 19:39, H. S. Teoh wrote: What should the return value of std.process.system be? I'm looking at issue 6926, and upon investigation found that std.process.system always returns WEXITSTATUS(status) regardless of the value of WIFEXITED(status). This means that if the child process

Re: Return value of std.process.system

2012-02-25 Thread H. S. Teoh
On Sat, Feb 25, 2012 at 08:14:05PM +0100, Artur Skawina wrote: On 02/25/12 19:39, H. S. Teoh wrote: What should the return value of std.process.system be? I'm looking at issue 6926, and upon investigation found that std.process.system always returns WEXITSTATUS(status) regardless of the

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Paulo Pinto
Am 25.02.2012 20:05, schrieb H. S. Teoh: On Sat, Feb 25, 2012 at 01:45:34PM -0500, Nick Sabalausky wrote: Yao Gomezyao.go...@gmail.com wrote in message news:pdyvfpeaigfvorkfn...@forum.dlang.org... On Saturday, 25 February 2012 at 16:08:40 UTC, Nick Sabalausky wrote: Trass3ru...@known.com

State of Mango

2012-02-25 Thread Paulo Pinto
Hi, I was just wondering about the possibility to have a servlet like web server in D, and discover it already exists in the form of Mango. The project looks a bit dormant, does anyone know what is the real state? Thanks, Paulo

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Nick Sabalausky
H. S. Teoh hst...@quickfur.ath.cx wrote in message news:mailman.107.1330196619.24984.digitalmar...@puremagic.com... On Sat, Feb 25, 2012 at 01:45:34PM -0500, Nick Sabalausky wrote: Yao Gomez yao.go...@gmail.com wrote in message news:pdyvfpeaigfvorkfn...@forum.dlang.org... On Saturday, 25

Re: State of Mango

2012-02-25 Thread Nick Sabalausky
Paulo Pinto pj...@progtools.org wrote in message news:jibco6$28l7$2...@digitalmars.com... Hi, I was just wondering about the possibility to have a servlet like web server in D, and discover it already exists in the form of Mango. The project looks a bit dormant, does anyone know what is the

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Alex Rønne Petersen
On 25-02-2012 19:45, Nick Sabalausky wrote: Yao Gomezyao.go...@gmail.com wrote in message news:pdyvfpeaigfvorkfn...@forum.dlang.org... On Saturday, 25 February 2012 at 16:08:40 UTC, Nick Sabalausky wrote: Trass3ru...@known.com wrote in message news:op.v98sager3ncmek@enigma...

Re: State of Mango

2012-02-25 Thread Sean Kelly
Yup. Though there may be a few bits that weren't included in Tango. On Feb 25, 2012, at 11:35 AM, Nick Sabalausky a@a.a wrote: Paulo Pinto pj...@progtools.org wrote in message news:jibco6$28l7$2...@digitalmars.com... Hi, I was just wondering about the possibility to have a servlet like

Re: Inheritance of purity

2012-02-25 Thread foobar
On Friday, 24 February 2012 at 05:05:29 UTC, James Miller wrote: You seem to think that there is Notepad or Visual Studio/eclipse, when in reality there is a sliding scale, from using cat to output to a file to using, well Eclipse or VS. But there are points along the way, like Jonathon, I'm

Re: Inheritance of purity

2012-02-25 Thread so
On Saturday, 25 February 2012 at 17:57:54 UTC, Timon Gehr wrote: class A { void fun() const { ... } } class B : A { override void fun() { ... } } Now I change the class A to become : class A { void fun() const { ... } void fun() { ... } } And suddenly, the override doesn't

Re: Inheritance of purity

2012-02-25 Thread foobar
On Friday, 24 February 2012 at 05:48:51 UTC, H. S. Teoh wrote: On Fri, Feb 24, 2012 at 06:05:20PM +1300, James Miller wrote: [...] My ongoing quest for productivity has led me to believe that, unless you want to be tied to a technology, back to basics is the best way. That's an interesting

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread so
On Saturday, 25 February 2012 at 18:47:12 UTC, Nick Sabalausky wrote: Interesting. I wish he'd elaborate on why it's not an option for his daily work. Not the design but the implementation, memory management would be the first.

Re: The Right Approach to Exceptions

2012-02-25 Thread Andrei Alexandrescu
On 2/25/12 7:19 AM, Timon Gehr wrote: On 02/24/2012 08:14 PM, Andrei Alexandrescu wrote: On 2/24/12 1:13 PM, H. S. Teoh wrote: In my mind, contract code belongs in the function signature, because they document how the function expects to be called, and what it guarantees in return. It doesn't

Re: Inheritance of purity

2012-02-25 Thread Andrei Alexandrescu
On 2/25/12 11:53 AM, deadalnix wrote: class A { void fun() const { ... } } class B : A { override void fun() { ... } } Now I change the class A to become : class A { void fun() const { ... } void fun() { ... } } And suddenly, the override doesn't override the same thing anymore. Which is

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Peter Alexander
On Saturday, 25 February 2012 at 16:04:57 UTC, Trass3r wrote: http://twitter.com/#!/ID_AA_Carmack/status/173111220092682240 I think I could be to blame for that. https://twitter.com/#!/Poita_/status/173106149669875712 Obviously he can't use D for his day to day work because they already

Re: Inheritance of purity

2012-02-25 Thread Andrei Alexandrescu
On 2/25/12 11:57 AM, Timon Gehr wrote: On 02/25/2012 06:53 PM, deadalnix wrote: class A { void fun() const { ... } } class B : A { override void fun() { ... } } Now I change the class A to become : class A { void fun() const { ... } void fun() { ... } } And suddenly, the override doesn't

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Peter Alexander
On Saturday, 25 February 2012 at 20:13:42 UTC, so wrote: On Saturday, 25 February 2012 at 18:47:12 UTC, Nick Sabalausky wrote: Interesting. I wish he'd elaborate on why it's not an option for his daily work. Not the design but the implementation, memory management would be the first.

Re: State of Mango

2012-02-25 Thread maarten van damme
yet if you want a great web framework for D you should check out adam rupe's stuff. https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff works really good.

Re: The Right Approach to Exceptions

2012-02-25 Thread Timon Gehr
On 02/25/2012 09:18 PM, Andrei Alexandrescu wrote: On 2/25/12 7:19 AM, Timon Gehr wrote: On 02/24/2012 08:14 PM, Andrei Alexandrescu wrote: On 2/24/12 1:13 PM, H. S. Teoh wrote: In my mind, contract code belongs in the function signature, because they document how the function expects to be

Re: Inheritance of purity

2012-02-25 Thread Timon Gehr
On 02/25/2012 09:05 PM, so wrote: On Saturday, 25 February 2012 at 17:57:54 UTC, Timon Gehr wrote: class A { void fun() const { ... } } class B : A { override void fun() { ... } } Now I change the class A to become : class A { void fun() const { ... } void fun() { ... } }

Re: Inheritance of purity

2012-02-25 Thread Walter Bright
On 2/25/2012 9:53 AM, deadalnix wrote: And suddenly, the override doesn't override the same thing anymore. Which is unnacceptable. class A { void fun() const { } void fun() { } } class B : A { override void fun() { } } dmd -c foo foo.d(6): Error: class foo.B use of

Re: Conclusions of the exception discussion

2012-02-25 Thread kennytm
Daniel Murphy yebbl...@nospamgmail.com wrote: deadalnix deadal...@gmail.com wrote in message news:jiagbg$liu$1...@digitalmars.com... Le 25/02/2012 07:26, Daniel Murphy a Ècrit : https://github.com/D-Programming-Language/dmd/pull/738 I do think this approach have a flaw. If we go in that

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread so
On Saturday, 25 February 2012 at 20:26:11 UTC, Peter Alexander wrote: Memory management is not a problem. You can manage memory just as easily in D as you can in C or C++. Just don't use global new, which they'll already be doing. C++ standard library is not based around a GC. D promises

Re: Inheritance of purity

2012-02-25 Thread deadalnix
Le 25/02/2012 21:44, Walter Bright a écrit : On 2/25/2012 9:53 AM, deadalnix wrote: And suddenly, the override doesn't override the same thing anymore. Which is unnacceptable. class A { void fun() const { } void fun() { } } class B : A { override void fun() { } } dmd -c foo foo.d(6):

Re: Inheritance of purity

2012-02-25 Thread Timon Gehr
On 02/25/2012 10:28 PM, deadalnix wrote: Le 25/02/2012 21:44, Walter Bright a écrit : On 2/25/2012 9:53 AM, deadalnix wrote: And suddenly, the override doesn't override the same thing anymore. Which is unnacceptable. class A { void fun() const { } void fun() { } } class B : A { override

Re: Inheritance of purity

2012-02-25 Thread deadalnix
Le 25/02/2012 22:25, Timon Gehr a écrit : On 02/25/2012 10:28 PM, deadalnix wrote: Le 25/02/2012 21:44, Walter Bright a écrit : On 2/25/2012 9:53 AM, deadalnix wrote: And suddenly, the override doesn't override the same thing anymore. Which is unnacceptable. class A { void fun() const { }

Calling Kernel32 functions from D

2012-02-25 Thread Gyron
Hey Guys, i'm thinking about moving from c++ to D, but I cant live without the Kernel32 Functions, so whats the easiest way to use them in D? I mean for example ReadProcessMemory etc.

Re: Inheritance of purity

2012-02-25 Thread Walter Bright
On 2/25/2012 1:53 PM, deadalnix wrote: Le 25/02/2012 22:25, Timon Gehr a écrit : By explicitly stating that he is aware of all the overloads: class B : A { alias A.fun fun; override void fun() { } } Alternatively: class B : A{ override void fun()const{super.fun();} override void fun() { } }

Re: Calling Kernel32 functions from D

2012-02-25 Thread Kagamin
On Saturday, 25 February 2012 at 21:50:06 UTC, Gyron wrote: Hey Guys, i'm thinking about moving from c++ to D, but I cant live without the Kernel32 Functions, so whats the easiest way to use them in D? I mean for example ReadProcessMemory etc. Declare it and call. There're ready bindings

Re: Calling Kernel32 functions from D

2012-02-25 Thread torhu
On 25.02.2012 22:50, Gyron wrote: Hey Guys, i'm thinking about moving from c++ to D, but I cant live without the Kernel32 Functions, so whats the easiest way to use them in D? I mean for example ReadProcessMemory etc. Look at the src\druntime\src\core\sys\windows folder in your DMD

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Paulo Pinto
Am 25.02.2012 21:26, schrieb Peter Alexander: On Saturday, 25 February 2012 at 20:13:42 UTC, so wrote: On Saturday, 25 February 2012 at 18:47:12 UTC, Nick Sabalausky wrote: Interesting. I wish he'd elaborate on why it's not an option for his daily work. Not the design but the

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Peter Alexander
On Saturday, 25 February 2012 at 20:50:53 UTC, so wrote: On Saturday, 25 February 2012 at 20:26:11 UTC, Peter Alexander wrote: Memory management is not a problem. You can manage memory just as easily in D as you can in C or C++. Just don't use global new, which they'll already be doing.

Re: Inheritance of purity

2012-02-25 Thread deadalnix
Le 25/02/2012 22:59, Walter Bright a écrit : On 2/25/2012 1:53 PM, deadalnix wrote: Le 25/02/2012 22:25, Timon Gehr a écrit : By explicitly stating that he is aware of all the overloads: class B : A { alias A.fun fun; override void fun() { } } Alternatively: class B : A{ override void

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Peter Alexander
On Saturday, 25 February 2012 at 22:08:31 UTC, Paulo Pinto wrote: Am 25.02.2012 21:26, schrieb Peter Alexander: On Saturday, 25 February 2012 at 20:13:42 UTC, so wrote: On Saturday, 25 February 2012 at 18:47:12 UTC, Nick Sabalausky wrote: Interesting. I wish he'd elaborate on why it's not an

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread so
On Saturday, 25 February 2012 at 22:08:31 UTC, Paulo Pinto wrote: Most standard compiler malloc()/free() implementations are actually slower than most advanced GC algorithms. Explicit allocation/deallocation performance is not that significant, main problem is they are unreliable at runtime.

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Paulo Pinto
Am 25.02.2012 23:17, schrieb Peter Alexander: On Saturday, 25 February 2012 at 22:08:31 UTC, Paulo Pinto wrote: Am 25.02.2012 21:26, schrieb Peter Alexander: On Saturday, 25 February 2012 at 20:13:42 UTC, so wrote: On Saturday, 25 February 2012 at 18:47:12 UTC, Nick Sabalausky wrote:

Re: Calling Kernel32 functions from D

2012-02-25 Thread simendsjo
On Sat, 25 Feb 2012 22:50:05 +0100, Gyron th...@web.de wrote: Hey Guys, i'm thinking about moving from c++ to D, but I cant live without the Kernel32 Functions, so whats the easiest way to use them in D? I mean for example ReadProcessMemory etc. You can also take a look at this

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Paulo Pinto
Am 25.02.2012 23:17, schrieb so: On Saturday, 25 February 2012 at 22:08:31 UTC, Paulo Pinto wrote: Most standard compiler malloc()/free() implementations are actually slower than most advanced GC algorithms. Explicit allocation/deallocation performance is not that significant, main problem

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Sean Cavanaugh
On 2/25/2012 4:08 PM, Paulo Pinto wrote: Am 25.02.2012 21:26, schrieb Peter Alexander: On Saturday, 25 February 2012 at 20:13:42 UTC, so wrote: On Saturday, 25 February 2012 at 18:47:12 UTC, Nick Sabalausky wrote: Interesting. I wish he'd elaborate on why it's not an option for his daily

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Andrew Wiley
On Sat, Feb 25, 2012 at 4:29 PM, Paulo Pinto pj...@progtools.org wrote: Am 25.02.2012 23:17, schrieb Peter Alexander: On Saturday, 25 February 2012 at 22:08:31 UTC, Paulo Pinto wrote: Am 25.02.2012 21:26, schrieb Peter Alexander: On Saturday, 25 February 2012 at 20:13:42 UTC, so wrote: On

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Walter Bright
On 2/25/2012 2:08 PM, Paulo Pinto wrote: Most standard compiler malloc()/free() implementations are actually slower than most advanced GC algorithms. Most straight up GC vs malloc/free benchmarks miss something crucial. A GC allows one to do substantially *fewer* allocations. It's a lot

Re: Inheritance of purity

2012-02-25 Thread Walter Bright
On 2/24/2012 3:22 AM, deadalnix wrote: Le 17/02/2012 17:19, Andrei Alexandrescu a écrit : On 2/17/12 8:13 AM, kenji hara wrote: I think the lack of 'override' keyword (filed as bug 3836) should become an error, without the phase of deprecating it. Otherwise following case will be allowed.

Re: Inheritance of purity

2012-02-25 Thread Walter Bright
On 2/25/2012 2:16 PM, deadalnix wrote: Le 25/02/2012 22:59, Walter Bright a écrit : On 2/25/2012 1:53 PM, deadalnix wrote: Le 25/02/2012 22:25, Timon Gehr a écrit : By explicitly stating that he is aware of all the overloads: class B : A { alias A.fun fun; override void fun() { } }

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Paulo Pinto
Am 25.02.2012 23:40, schrieb Andrew Wiley: On Sat, Feb 25, 2012 at 4:29 PM, Paulo Pintopj...@progtools.org wrote: Am 25.02.2012 23:17, schrieb Peter Alexander: On Saturday, 25 February 2012 at 22:08:31 UTC, Paulo Pinto wrote: Am 25.02.2012 21:26, schrieb Peter Alexander: On Saturday, 25

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Andrew Wiley
On Sat, Feb 25, 2012 at 4:08 PM, Paulo Pinto pj...@progtools.org wrote: Am 25.02.2012 21:26, schrieb Peter Alexander: On Saturday, 25 February 2012 at 20:13:42 UTC, so wrote: On Saturday, 25 February 2012 at 18:47:12 UTC, Nick Sabalausky wrote: Interesting. I wish he'd elaborate on why it's

Re: State of Mango

2012-02-25 Thread Paulo Pinto
Am 25.02.2012 21:34, schrieb maarten van damme: yet if you want a great web framework for D you should check out adam rupe's stuff. https://github.com/adamdruppe/misc-stuff-including-D-programming-language-web-stuff works really good. Thanks. They don't seem to compile with the latest D

Re: State of Mango

2012-02-25 Thread Adam D. Ruppe
On Saturday, 25 February 2012 at 23:07:18 UTC, Paulo Pinto wrote: Thanks. They don't seem to compile with the latest D version. What error did you get? (and which file?)

Re: Inheritance of purity

2012-02-25 Thread so
On Friday, 24 February 2012 at 00:01:52 UTC, F i L wrote: Well then I disagree with Walter on this as well. What's wrong with having a standard toolset in the same way you have standard libraries? It's unrealistic to think people (at large) will be writing any sort of serious application

Re: Conclusions of the exception discussion

2012-02-25 Thread Jonathan M Davis
On Saturday, February 25, 2012 07:29:01 Kevin Cox wrote: I think there should also be multiple catches so that you can deal with different exceptions different ways without trying to upcast them over and over again. You can do that now. Just catch each specific exception type that you want to

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Andrew Wiley
On Sat, Feb 25, 2012 at 5:01 PM, Paulo Pinto pj...@progtools.org wrote: Am 25.02.2012 23:40, schrieb Andrew Wiley: On Sat, Feb 25, 2012 at 4:29 PM, Paulo Pintopj...@progtools.org  wrote: Am 25.02.2012 23:17, schrieb Peter Alexander: On Saturday, 25 February 2012 at 22:08:31 UTC, Paulo

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Simon
On 25/02/2012 22:55, Walter Bright wrote: On 2/25/2012 2:08 PM, Paulo Pinto wrote: Most standard compiler malloc()/free() implementations are actually slower than most advanced GC algorithms. Most straight up GC vs malloc/free benchmarks miss something crucial. A GC allows one to do

Re: Inheritance of purity

2012-02-25 Thread Andrei Alexandrescu
On 2/25/12 2:44 PM, Walter Bright wrote: On 2/25/2012 9:53 AM, deadalnix wrote: And suddenly, the override doesn't override the same thing anymore. Which is unnacceptable. class A { void fun() const { } void fun() { } } class B : A { override void fun() { } } dmd -c foo foo.d(6):

Re: Inheritance of purity

2012-02-25 Thread Jonathan M Davis
On Saturday, February 25, 2012 18:11:27 Andrei Alexandrescu wrote: On 2/25/12 2:44 PM, Walter Bright wrote: On 2/25/2012 9:53 AM, deadalnix wrote: And suddenly, the override doesn't override the same thing anymore. Which is unnacceptable. class A { void fun() const { } void fun()

Re: Inheritance of purity

2012-02-25 Thread James Miller
On Feb 26, 2012 8:53 AM, foobar f...@bar.com wrote: That's analogous to saying that you don't want to depend on a lighter since you can make your own fire by rubbing a stone with a wood stick. A lighter does tie you to a certain technology but loosing the lighter doesn't make for more

Re: Conclusions of the exception discussion

2012-02-25 Thread Daniel Murphy
kennytm kenn...@gmail.com wrote in message news:1711314076351895446.251635kennytm-gmail@news.digitalmars.com... catch(auto e : E1, E2) { body; } - catch(E1 e) { goto catchE2; } catch(E2 e) { catchE2: body; } Won't work unless the compiler enforce that 'body' does not use

Re: Conclusions of the exception discussion

2012-02-25 Thread Daniel Murphy
deadalnix deadal...@gmail.com wrote in message news:jib71o$1v05 Wow, it didn't got that. This is nice, but then, the Exception type is completely lost. It does means that we are not interested in the Exception type, but of its presence, and so, maybe we just have created useless Exception

Compile Time D Expression Parser?

2012-02-25 Thread d coder
Greetings I need to parse simple D expressions at compile time. I was wondering if somebody on the list has some example code that could be of help to me. I am working on an opensource constraint solver and expressions that I need to parse can be reasonably complex such as x + y*n 32 x 4. I

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Walter Bright
On 2/25/2012 4:01 PM, Simon wrote: On 25/02/2012 22:55, Walter Bright wrote: Enter C++'s shared_ptr. But that works by, for each object, allocating a *second* chunk of memory to hold the reference count. Right off the bat, you've got twice as many allocations frees with shared_ptr than a GC

Re: State of Mango

2012-02-25 Thread Paulo Pinto
Am 26.02.2012 00:19, schrieb Adam D. Ruppe: On Saturday, 25 February 2012 at 23:07:18 UTC, Paulo Pinto wrote: Thanks. They don't seem to compile with the latest D version. What error did you get? (and which file?) Hi Adam, I am compiling on Windows with the latest versions (DMD 2.058 and

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Paulo Pinto
Am 26.02.2012 00:45, schrieb Andrew Wiley: On Sat, Feb 25, 2012 at 5:01 PM, Paulo Pintopj...@progtools.org wrote: Am 25.02.2012 23:40, schrieb Andrew Wiley: On Sat, Feb 25, 2012 at 4:29 PM, Paulo Pintopj...@progtools.orgwrote: Am 25.02.2012 23:17, schrieb Peter Alexander: On

Re: Compile Time D Expression Parser?

2012-02-25 Thread Paulo Pinto
Am 26.02.2012 03:25, schrieb d coder: Greetings I need to parse simple D expressions at compile time. I was wondering if somebody on the list has some example code that could be of help to me. I am working on an opensource constraint solver and expressions that I need to parse can be

Re: struct init() method

2012-02-25 Thread Alex Rønne Petersen
On 25-02-2012 05:05, bearophile wrote: This program comes from a reduction of a bug I've found: struct Foo { void init() {} } void main() { Foo*[] foos; //(*foos[0]).init(); // OK foos[0].init(); // Error: function expected before (), not null of type Foo* } What do you

Re: delegate as memeber

2012-02-25 Thread Stewart Gordon
On 21/02/2012 17:46, Jacob Carlborg wrote: On 2012-02-21 16:55, deadalnix wrote: snip You can implement a static opCall and use that instead of the constructor. But you don't have to call a static opCall. You can just declare a struct instance without any initialisation. Presumably half

Re: delegate as memeber

2012-02-25 Thread Timon Gehr
On 02/25/2012 03:32 PM, Stewart Gordon wrote: On 21/02/2012 17:46, Jacob Carlborg wrote: On 2012-02-21 16:55, deadalnix wrote: snip You can implement a static opCall and use that instead of the constructor. But you don't have to call a static opCall. You can just declare a struct instance

Re: Template Inheritance

2012-02-25 Thread Timon Gehr
On 02/22/2012 01:13 AM, BLM wrote: That last one looks a lot better than my solution. It's certainly a lot clearer. One problem I discovered with using templates was that I ended up needing virtual functions, which means that I had to convert the template functions to mixins and just

  1   2   >