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 stati

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 : > 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 separate thread (

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 : > > 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 mes

Re: Conclusions of the exception discussion

2012-02-25 Thread Daniel Murphy
"Jonathan M Davis" wrote in message news:[email protected]... > On Saturday, February 25, 2012 17:26:02 Daniel Murphy wrote: >> "Jonathan M Davis" wrote in message >> news:[email protected]... >> >> > However, regardless

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" wrote in message news:[email protected]... > > 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? Nearly everyt

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 Davis: 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 shou

Re: Conclusions of the exception discussion

2012-02-25 Thread deadalnix
Le 25/02/2012 07:26, Daniel Murphy a écrit : "Jonathan M Davis" wrote in message news:[email protected]... 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 going to do it. So

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 overl

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" wrote: > "Jonathan M Davis" wrote in message > news:mailman.93.1330149312.24984.digitalmar...@pu

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 TypeT

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" wrote in message news:[email protected]... I think there should also be multiple catches so that you can deal with diffe

Re: The Right Approach to Exceptions

2012-02-25 Thread Timon Gehr
On 02/21/2012 07:57 PM, deadalnix wrote: opDispatch is nice, but rather incomplete. It doesn't handle template methods for example. It surely does. struct S{ template opDispatch(string op){ auto opDispatch(T...)(T args){ writeln(op, args); } } } void main()

Re: Conclusions of the exception discussion

2012-02-25 Thread Daniel Murphy
"deadalnix" wrote in message news:[email protected]... > 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 Exception type jus

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" wrote in message news:[email protected]... >> 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 idea. >

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 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, inout(int)[] y) { x = y; }

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 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) difficult/impossible. A

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" wrote: > On Wed, 22 Feb 2012 22:33:35 +0100, Bernard Helye

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" 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" 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 Javascript. An

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, b

Re: Conclusions of the exception discussion

2012-02-25 Thread deadalnix
Le 25/02/2012 14:11, Daniel Murphy a écrit : "deadalnix" wrote in message news:[email protected]... 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

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 fea

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 sti

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Nick Sabalausky
"Yao Gomez" wrote in message news:[email protected]... > On Saturday, 25 February 2012 at 16:08:40 UTC, Nick Sabalausky wrote: >> "Trass3r" wrote in message >> news:op.v98sager3ncmek@enigma... >>> http://twitter.com/#!/ID_AA_Carmack/status/173111220092682240 >> >> It's not sh

Re: John Carmack applauds D's pure attribute

2012-02-25 Thread Nick Sabalausky
"Yao Gomez" wrote in message news:[email protected]... > On Saturday, 25 February 2012 at 16:08:40 UTC, Nick Sabalausky wrote: >> "Trass3r" wrote in message >> news:op.v98sager3ncmek@enigma... >>> http://twitter.com/#!/ID_AA_Carmack/status/173111220092682240 >> >> It's not sh

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" wrote in message > news:[email protected]... > > On Saturday, 25 February 2012 at 16:08:40 UTC, Nick Sabalausky wrote: > >> "Trass3r" wrote in message > >> news:op.v98sager3ncmek@enigma... > >>> ht

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 proces

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

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 Gomez" wrote in message news:[email protected]... On Saturday, 25 February 2012 at 16:08:40 UTC, Nick Sabalausky wrote: "Trass3r" wrote in message news:op.v98sage

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" wrote in message news:[email protected]... > On Sat, Feb 25, 2012 at 01:45:34PM -0500, Nick Sabalausky wrote: >> "Yao Gomez" wrote in message >> news:[email protected]... >> > On Saturday, 25 February 2012 at 16:08:40 UTC, Ni

Re: State of Mango

2012-02-25 Thread Nick Sabalausky
"Paulo Pinto" wrote in message news:[email protected]... > 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?

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 Gomez" wrote in message news:[email protected]... On Saturday, 25 February 2012 at 16:08:40 UTC, Nick Sabalausky wrote: "Trass3r" wrote in message news:op.v98sager3ncmek@enigma... http://twitter.com/#!/ID_AA_Carmack/status/1

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" wrote: > "Paulo Pinto" wrote in message > news:[email protected]... >> Hi, >> >> I was just wondering about the possibility to have a servlet like >> web server

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 ove

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 ob

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 s

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 unna

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 have

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 ove

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. Mem

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 ca

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() { ... } } And

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 foo.A.

Re: Conclusions of the exception discussion

2012-02-25 Thread kennytm
"Daniel Murphy" wrote: > "deadalnix" wrote in message > news:[email protected]... >> 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 dev

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 bot

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): E

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 void

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 { } vo

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 lik

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 installati

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 implementation,

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. C++

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 fun()c

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: Interes

Re: Calling Kernel32 functions from D

2012-02-25 Thread simendsjo
On Sat, 25 Feb 2012 22:50:05 +0100, 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. You can also take a look at this https://github.com/

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 is

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 work

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 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: >

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 faster

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. Yes

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() { } } Alternati

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 Pinto 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:

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 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 no

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 version

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 out

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 t

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 wrote: > Am 25.02.2012 23:40, schrieb Andrew Wiley: >> >> On Sat, Feb 25, 2012 at 4:29 PM, Paulo Pinto  wrote: >>> >>> Am 25.02.2012 23:17, schrieb Peter Alexander: >>> >>> On Saturday, 25 February 2012 at 22:08:31 UTC, Paulo Pinto wrote: > >>>

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 substantia

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): Error

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

Re: Inheritance of purity

2012-02-25 Thread James Miller
On Feb 26, 2012 8:53 AM, "foobar" 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 productivity. Misus

Re: Conclusions of the exception discussion

2012-02-25 Thread Daniel Murphy
"kennytm" wrote in message news:[email protected]... >> >> 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' do

Re: Conclusions of the exception discussion

2012-02-25 Thread Daniel Murphy
"deadalnix" 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 types and >

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

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 wo

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 HE

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 Pinto wrote: Am 25.02.2012 23:40, schrieb Andrew Wiley: On Sat, Feb 25, 2012 at 4:29 PM, Paulo Pintowrote: Am 25.02.2012 23:17, schrieb Peter Alexander: On Saturday, 25 February 2012 at 22:08:31 UTC, Pa

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 reasonabl