Re: Native GTK bindings v2

2012-06-01 Thread timotheecour
Have you tested it on osx? I get lots of errors such as Error: module Atk from file gtk2/atk.d conflicts with another module Atk from file gtk2/atk.d etc... I'm wondering whether it's due to case insensitivity on OSX/windows. I thought the convention was to use all lowercase for module names.

Re: Native GTK bindings v2

2012-06-01 Thread Artur Skawina
On 06/01/12 12:01, timotheecour wrote: Have you tested it on osx? No. You are probably the first person to try it on osx. I get lots of errors such as Error: module Atk from file gtk2/atk.d conflicts with another module Atk from file gtk2/atk.d etc... I'm wondering whether it's due to case

Re: Thrift now officially supports D!

2012-06-01 Thread Dan Sanduleac
On Tuesday, 27 March 2012 at 23:16:29 UTC, David Nadlinger wrote: Apache Thrift is a cross-language serialization/RPC framework. During last year's Google Summer of Code, I worked on adding D as a target language – and a few days ago, the D implementation has been accepted into the upstream

Re: Website

2012-06-01 Thread Matthias Walter
On 06/01/2012 07:42 AM, d coder wrote: Why am I being taken to Digital Daemon when I goto http://dlang.org ? Seems like the DNS entry points still to the original IP address. That's all I could find out. Where can I find official D language site now? http://erdani.com/d/web/index.html exists

Re: [Proposal] Additional operator overloadings for multidimentional indexing and slicing

2012-06-01 Thread Gor Gyolchanyan
This is awesome! I would think, that making ranges like x..y a first-class object would solve all problems. In that case opSlice would return the slice, rather, then use it internally. On Fri, Jun 1, 2012 at 5:57 AM, kenji hara k.hara...@gmail.com wrote: I'd like to propose a new language

Re: Defining a custom *constructor* (not initializer!)

2012-06-01 Thread Mehrdad
I just added this: http://d.puremagic.com/issues/show_bug.cgi?id=8177 I don't understand the DMD code well enough to implement this myself (the identifiers are all Greek to me...), but I honestly think implementing it should be relatively simple, since the default implementations are trivial

Re: runtime hook for Crash on Error

2012-06-01 Thread Jens Mueller
Walter Bright wrote: On 5/31/2012 3:22 AM, Dmitry Olshansky wrote: On 31.05.2012 13:06, deadalnix wrote: This is called failing gracefully. And this highly recommended, and you KNOW that the system will fail at some point. Exactly. + The point I tried to argue but it was apparently lost:

Re: [Proposal] Additional operator overloadings for multidimentional indexing and slicing

2012-06-01 Thread filgood
This would be very cool indeed! +1 from me. On 01/06/2012 02:57, kenji hara wrote: I'd like to propose a new language feature to D community. I've opened a enhancement issue half a year ago. Issue 6798 - Integrate overloadings for multidimentional indexing and slicing

Re: Exception/Error division in D

2012-06-01 Thread Jens Mueller
Walter Bright wrote: On 5/31/2012 1:05 PM, Jens Mueller wrote: Okay, let's assume I have separate processes maybe even processes on different machines. In one process I get an error. Let's say I want to trigger the other process that it restarts the process or just logs the event whatever

Re: XOMB operating system

2012-06-01 Thread Jacob Carlborg
On 2012-06-01 01:41, tim krimm wrote: On Thursday, 31 May 2012 at 11:18:48 UTC, Jacob Carlborg wrote: DMD links using gcc anyway. Would this technique work for DMD on windows as well? Would this technique work for DMD on the MAC OS? It should work on Mac OS X. On Windows DMD doesn't use

Re: XOMB operating system

2012-06-01 Thread Jacob Carlborg
On 2012-06-01 04:04, tim krimm wrote: http://dsource.org/project/druntime Not Found 404 Not Found (No handler matched request to %s) It should be projects. http://dsource.org/projects/druntime -- /Jacob Carlborg

Re: runtime hook for Crash on Error

2012-06-01 Thread Dmitry Olshansky
On 01.06.2012 5:16, Walter Bright wrote: On 5/31/2012 3:22 AM, Dmitry Olshansky wrote: On 31.05.2012 13:06, deadalnix wrote: This is called failing gracefully. And this highly recommended, and you KNOW that the system will fail at some point. Exactly. + The point I tried to argue but it was

Re: Website

2012-06-01 Thread d coder
dlang.org is back. By the way, is there a PDF version of D Programming Language Specification which is available from Amazon as a kindle edition. It should be useful to have access to such a manual if the website goes down again. Regards - Puneet

Re: Website

2012-06-01 Thread Nick Sabalausky
d coder dlang.co...@gmail.com wrote in message news:mailman.1203.1338529529.24740.digitalmar...@puremagic.com... Why am I being taken to Digital Daemon when I goto http://dlang.org ? Where can I find official D language site now? Yeouch, that's not good. Looks like it just the homepage

Re: Website

2012-06-01 Thread Dmitry Olshansky
On 01.06.2012 14:23, Nick Sabalausky wrote: d coderdlang.co...@gmail.com wrote in message news:mailman.1203.1338529529.24740.digitalmar...@puremagic.com... Why am I being taken to Digital Daemon when I goto http://dlang.org ? Where can I find official D language site now? Yeouch, that's

Re: runtime hook for Crash on Error

2012-06-01 Thread Walter Bright
On 6/1/2012 1:48 AM, Dmitry Olshansky wrote: On 01.06.2012 5:16, Walter Bright wrote: On 5/31/2012 3:22 AM, Dmitry Olshansky wrote: On 31.05.2012 13:06, deadalnix wrote: This is called failing gracefully. And this highly recommended, and you KNOW that the system will fail at some point.

Re: Exception/Error division in D

2012-06-01 Thread Walter Bright
On 6/1/2012 1:15 AM, Jens Mueller wrote: Since the current implementation does not follow the specification regarding scope and finally block being executed in case of Error will try ... catch (...Error) keep working? No. The reason for this is the implementation was not updated after the

Re: runtime hook for Crash on Error

2012-06-01 Thread Walter Bright
On 6/1/2012 12:45 AM, Jens Mueller wrote: This is perfectly valid when developing such critical systems. But limiting D to effectively only allow developing such particular systems cannot be the appropriate response. There are plenty of other systems that do not operate in such a constrained

Re: runtime hook for Crash on Error

2012-06-01 Thread deadalnix
Le 01/06/2012 12:26, Walter Bright a écrit : Except that you do not know why the arithmetic turned out wrong - it could be the result of memory corruption. Yes. wrong calculation often comes from memory corruption. Almost never from programmer having screwed up in the said calculation. It

Re: Exception/Error division in D

2012-06-01 Thread deadalnix
Le 31/05/2012 21:47, Walter Bright a écrit : On 5/31/2012 12:40 AM, Jens Mueller wrote: How do I do a graceful shutdown if finally and scope is not guaranteed to be executed? Assuming onAssertError, etc. is of no use because I need to perform different shutdowns due to having different cases or

Re: Exception/Error division in D

2012-06-01 Thread deadalnix
Le 01/06/2012 12:29, Walter Bright a écrit : On 6/1/2012 1:15 AM, Jens Mueller wrote: Since the current implementation does not follow the specification regarding scope and finally block being executed in case of Error will try ... catch (...Error) keep working? No. The reason for this is the

Re: Exception/Error division in D

2012-06-01 Thread Tobias Pankrath
On Friday, 1 June 2012 at 12:03:15 UTC, deadalnix wrote: Le 01/06/2012 12:29, Walter Bright a écrit : On 6/1/2012 1:15 AM, Jens Mueller wrote: Since the current implementation does not follow the specification regarding scope and finally block being executed in case of Error will try ...

Re: synchronized (this[.classinfo]) in druntime and phobos

2012-06-01 Thread Regan Heath
On Thu, 31 May 2012 19:35:50 +0100, Steven Schveighoffer schvei...@yahoo.com wrote: On Thu, 31 May 2012 14:29:27 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 5/31/12 7:01 AM, Regan Heath wrote: Sorry, I have no spare time to spare. You're getting free

Re: synchronized (this[.classinfo]) in druntime and phobos

2012-06-01 Thread deadalnix
Le 31/05/2012 20:17, Andrei Alexandrescu a écrit : On 5/31/12 5:19 AM, deadalnix wrote: The solution consisting in passing a delegate as parameter or as template is superior, because it is now clear who is in charge of the synchronization, reducing greatly chances of deadlock. It can also be

AST Macros?

2012-06-01 Thread d coder
Greetings I know there is a plan for D to have AST macros eventually. I wanted to know if it is a feature being worked upon at this point of time. Approximately how long it would be before AST Macros see the light of the day in D? I know D is an opensource project and I am not trying to put any

Re: Calling an alias for a Class method in another scope

2012-06-01 Thread d coder
Hello All Particularly I would like to know if it is possible at all in D to invoke a class method transferred to a scope outside the class as an alias argument. Regards - Puneet

Re: runtime hook for Crash on Error

2012-06-01 Thread Steven Schveighoffer
On Fri, 01 Jun 2012 04:48:27 -0400, Dmitry Olshansky dmitry.o...@gmail.com wrote: I don't agree that OutOfMemory is critical: -- make it an exception ? No. What we need is a non-throwing version of malloc that returns NULL. (throwing version can wrap this). If you want to throw

Re: Is the address-of operator () really needed?

2012-06-01 Thread deadalnix
Le 31/05/2012 11:58, Dejan Lekic a écrit : On Thu, 31 May 2012 11:36:47 +0200, Sandeep Datta wrote: Hi, I was going through some sample code online and came across the following code fragment... listenHttp(settings,handleRequest); //Where handleRequest is a function My question to

Re: synchronized (this[.classinfo]) in druntime and phobos

2012-06-01 Thread Dmitry Olshansky
On 01.06.2012 16:26, deadalnix wrote: Here is what I ended up to think is the best solution : synchronized classes exists. By default, they can't be use as parameter for synchronized(something) . synchronized(something) will be valid is something provide opSynchronized(scope delegate void())

Re: Calling an alias for a Class method in another scope

2012-06-01 Thread Jacob Carlborg
On Friday, 1 June 2012 at 12:32:55 UTC, d coder wrote: Hello All Particularly I would like to know if it is possible at all in D to invoke a class method transferred to a scope outside the class as an alias argument. Regards - Puneet I think it should work, if I understand correctly what

Re: Calling an alias for a Class method in another scope

2012-06-01 Thread Steven Schveighoffer
On Fri, 01 Jun 2012 08:32:02 -0400, d coder dlang.co...@gmail.com wrote: Hello All Particularly I would like to know if it is possible at all in D to invoke a class method transferred to a scope outside the class as an alias argument. Is it possible? Yes. But not easy. I won't go into

Re: synchronized (this[.classinfo]) in druntime and phobos

2012-06-01 Thread Steven Schveighoffer
On Fri, 01 Jun 2012 08:38:45 -0400, Dmitry Olshansky dmitry.o...@gmail.com wrote: On 01.06.2012 16:26, deadalnix wrote: Here is what I ended up to think is the best solution : synchronized classes exists. By default, they can't be use as parameter for synchronized(something) .

Re: synchronized (this[.classinfo]) in druntime and phobos

2012-06-01 Thread Alex Rønne Petersen
On 01-06-2012 14:26, deadalnix wrote: Le 31/05/2012 20:17, Andrei Alexandrescu a écrit : On 5/31/12 5:19 AM, deadalnix wrote: The solution consisting in passing a delegate as parameter or as template is superior, because it is now clear who is in charge of the synchronization, reducing greatly

Re: synchronized (this[.classinfo]) in druntime and phobos

2012-06-01 Thread Regan Heath
On Thu, 31 May 2012 19:29:27 +0100, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 5/31/12 7:01 AM, Regan Heath wrote: Sorry, I have no spare time to spare. You're getting free ideas/thoughts from me, feel free to ignore them. Thanks. Let me know if I understand correctly that

Re: Calling an alias for a Class method in another scope

2012-06-01 Thread d coder
Hello Steve, thanks for looking at this. I see the code works when I create the delegate first and then send it to template. That is the way you do it here. void main() { Foo f = new Foo(); auto dg = f.foo; // need to make a symbol so it can be aliased callfoo!(dg)(); } But it does

Re: runtime hook for Crash on Error

2012-06-01 Thread Jacob Carlborg
On Friday, 1 June 2012 at 01:16:28 UTC, Walter Bright wrote: [When I worked on flight critical airplane systems, the only acceptable response for a self-detected fault was to IMMEDIATELY stop the system, physically DISENGAGE it from the flight controls, and inform the pilot.]

Re: Calling an alias for a Class method in another scope

2012-06-01 Thread Jacob Carlborg
On 2012-06-01 15:25, d coder wrote: Hello Steve, thanks for looking at this. I see the code works when I create the delegate first and then send it to template. That is the way you do it here. void main() { Foo f = new Foo(); auto dg = f.foo; // need to make a symbol so it can

Re: Calling an alias for a Class method in another scope

2012-06-01 Thread Steven Schveighoffer
On Fri, 01 Jun 2012 09:25:57 -0400, d coder dlang.co...@gmail.com wrote: Hello Steve, thanks for looking at this. I see the code works when I create the delegate first and then send it to template. That is the way you do it here. void main() { Foo f = new Foo(); auto dg = f.foo; // need

Re: Calling an alias for a Class method in another scope

2012-06-01 Thread d coder
Hello Steve There is a way, as I hinted :) I'll show you how, but be prepared to deal with ugliness! All this smart code would be hidden from the end-users so I really do not care. typeof(F.init.foo) dg; // alternately: void delegate() dg; dg.funcptr = F.foo;// use the type, not the

Re: synchronized (this[.classinfo]) in druntime and phobos

2012-06-01 Thread deadalnix
Le 01/06/2012 14:55, Regan Heath a écrit : On Thu, 31 May 2012 19:29:27 +0100, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 5/31/12 7:01 AM, Regan Heath wrote: Sorry, I have no spare time to spare. You're getting free ideas/thoughts from me, feel free to ignore them. Thanks.

Re: Calling an alias for a Class method in another scope

2012-06-01 Thread Mehrdad
Another way to phrase it would be that D is forcing you to to use templates where they really aren't meant to be used. :\

Re: Calling an alias for a Class method in another scope

2012-06-01 Thread d coder
On Fri, Jun 1, 2012 at 7:40 PM, Mehrdad wfunct...@hotmail.com wrote: Another way to phrase it would be that D is forcing you to to use templates where they really aren't meant to be used. :\ No. I am working on a Domain Specific Language and want to cut on the code the end user has to write.

Re: synchronized (this[.classinfo]) in druntime and phobos

2012-06-01 Thread deadalnix
Le 01/06/2012 14:52, Alex Rønne Petersen a écrit : On 01-06-2012 14:26, deadalnix wrote: Le 31/05/2012 20:17, Andrei Alexandrescu a écrit : On 5/31/12 5:19 AM, deadalnix wrote: The solution consisting in passing a delegate as parameter or as template is superior, because it is now clear who

Re: Calling an alias for a Class method in another scope

2012-06-01 Thread Jacob Carlborg
On 2012-06-01 15:51, Steven Schveighoffer wrote: On Fri, 01 Jun 2012 09:25:57 -0400, d coder dlang.co...@gmail.com wrote: Class Bar(alias F) { // Call F in some function here } Class Foo { void foo(); Bar!(() {foo();}) bar; } Again this does not work. Maybe I am expecting too much from D. :-)

Re: Calling an alias for a Class method in another scope

2012-06-01 Thread Steven Schveighoffer
On Fri, 01 Jun 2012 10:09:49 -0400, d coder dlang.co...@gmail.com wrote: Hello Steve There is a way, as I hinted :) I'll show you how, but be prepared to deal with ugliness! All this smart code would be hidden from the end-users so I really do not care. typeof(F.init.foo) dg; //

Re: Calling an alias for a Class method in another scope

2012-06-01 Thread Steven Schveighoffer
On Fri, 01 Jun 2012 10:14:26 -0400, Jacob Carlborg d...@me.com wrote: On 2012-06-01 15:51, Steven Schveighoffer wrote: On Fri, 01 Jun 2012 09:25:57 -0400, d coder dlang.co...@gmail.com wrote: Class Bar(alias F) { // Call F in some function here } Class Foo { void foo(); Bar!(() {foo();})

Re: Calling an alias for a Class method in another scope

2012-06-01 Thread d coder
Steve One small thing. As you said I might declare a delegate in an alternate fashion that is by saying void delegate() dg;. But would it be possible to rewrite the following declaration in a way that avoids naming foo explicitly. I would just have an alias for foo. I am asking this to cover the

Re: Calling an alias for a Class method in another scope

2012-06-01 Thread Steven Schveighoffer
On Fri, 01 Jun 2012 10:33:07 -0400, d coder dlang.co...@gmail.com wrote: Steve One small thing. As you said I might declare a delegate in an alternate fashion that is by saying void delegate() dg;. But would it be possible to rewrite the following declaration in a way that avoids naming

Re: synchronized (this[.classinfo]) in druntime and phobos

2012-06-01 Thread Steven Schveighoffer
On Fri, 01 Jun 2012 10:09:01 -0400, deadalnix deadal...@gmail.com wrote: I think it is unrealistic to prevent all deadlock, unless you can come up with a radically new approach. It is still possible to provide interface that prevent common traps. Right, the idea is not to exterminate all

Re: XOMB operating system

2012-06-01 Thread Sean Kelly
On May 31, 2012, at 7:04 PM, tim krimm twkr...@gmail.com wrote: On Friday, 1 June 2012 at 00:15:54 UTC, Sean Kelly wrote: On May 31, 2012, at 4:41 PM, tim krimm twkr...@gmail.com wrote: On Thursday, 31 May 2012 at 11:18:48 UTC, Jacob Carlborg wrote: DMD links using gcc anyway. Would this

Re: synchronized (this[.classinfo]) in druntime and phobos

2012-06-01 Thread Regan Heath
On Fri, 01 Jun 2012 15:34:20 +0100, Steven Schveighoffer schvei...@yahoo.com wrote: On Fri, 01 Jun 2012 10:09:01 -0400, deadalnix deadal...@gmail.com wrote: I think it is unrealistic to prevent all deadlock, unless you can come up with a radically new approach. It is still possible to

Re: Calling an alias for a Class method in another scope

2012-06-01 Thread Jacob Carlborg
On 2012-06-01 16:30, Steven Schveighoffer wrote: I'm surprised at some things that work with alias. It sometimes seems like black magic. Consider that this does work: void incx(alias x)() { x++; } void main() { int x = 0; incx!x(); assert(x == 1); } now, consider that when incx!x is

Re: Calling an alias for a Class method in another scope

2012-06-01 Thread Steven Schveighoffer
On Fri, 01 Jun 2012 10:57:34 -0400, Jacob Carlborg d...@me.com wrote: I don't see this example as strange. I mean, the same would work with a pointer or ref. An alias is not a pointer or ref, and it's not passed in at runtime, it's passed in at compile time. -Steve

Re: Is the address-of operator () really needed?

2012-06-01 Thread Dejan Lekic
On Thu, 31 May 2012 08:40:51 -0700, Jonathan M Davis wrote: On Thursday, May 31, 2012 11:36:47 Sandeep Datta wrote: Hi, I was going through some sample code online and came across the following code fragment... listenHttp(settings, handleRequest); //Where handleRequest is a

Re: AST Macros?

2012-06-01 Thread Jonathan M Davis
On Friday, June 01, 2012 17:57:51 d coder wrote: Greetings I know there is a plan for D to have AST macros eventually. I wanted to know if it is a feature being worked upon at this point of time. Approximately how long it would be before AST Macros see the light of the day in D? I know D

Re: Lexer and parser generators using CTFE

2012-06-01 Thread Ken
On Tuesday, 28 February 2012 at 07:59:16 UTC, Andrei Alexandrescu wrote: I'm starting a new thread on this because I think the matter is of strategic importance. We all felt for a long time that there's a lot of potential in CTFE, and potential applications have been discussed more than a

Re: AST Macros?

2012-06-01 Thread Gor Gyolchanyan
On Fri, Jun 1, 2012 at 7:38 PM, Jonathan M Davis jmdavisp...@gmx.comwrote: On Friday, June 01, 2012 17:57:51 d coder wrote: Greetings I know there is a plan for D to have AST macros eventually. I wanted to know if it is a feature being worked upon at this point of time. Approximately

Re: synchronized (this[.classinfo]) in druntime and phobos

2012-06-01 Thread Artur Skawina
On 06/01/12 14:26, deadalnix wrote: Le 31/05/2012 20:17, Andrei Alexandrescu a écrit : On 5/31/12 5:19 AM, deadalnix wrote: The solution consisting in passing a delegate as parameter or as template is superior, because it is now clear who is in charge of the synchronization, reducing greatly

Re: Is the address-of operator () really needed?

2012-06-01 Thread Andrej Mitrovic
On 5/31/12, Jonathan M Davis jmdavisp...@gmx.com wrote: 2. Just because ref is often better than a pointer doesn't mean that it's never valuable to be able to pass a pointer to a variable. 5. And '' documents code better at the call site. I personally refuse to use out/ref arguments because the

Re: Exception/Error division in D

2012-06-01 Thread Andrej Mitrovic
On 6/1/12, Tobias Pankrath tob...@pankrath.net wrote: I agree. It should be possible to have an plugin system where not every null pointer dereference in a plugin screws up the hole program. Without using different processes for the plugin. It should also be possible to correctly release

Re: Lexer and parser generators using CTFE

2012-06-01 Thread Andrei Alexandrescu
On 6/1/12 8:39 AM, Ken wrote: Great! So what's the next step? Do we wait for the maintainers of one of the CTFE parser gen packages to drop it in the Phobos Review Queue? Do a reimplementation for Phobos? We could attack this in pieces. Start with a lexer/FSA generator (like Ragel but using

Re: AST Macros?

2012-06-01 Thread Jonathan M Davis
On Friday, June 01, 2012 19:47:47 Gor Gyolchanyan wrote: Where can I read more about Bartosz's race-free type system and if there are some specific ideas already, AST macros for D as well? I'm sure that there's some discussion on them in the newsgroup archives, but it may be 5 years back; I

Re: Exception/Error division in D

2012-06-01 Thread Jouko Koski
deadalnix deadal...@gmail.com wrote: Le 31/05/2012 04:10, Walter Bright a écrit : The correct response to a server app crashing is to restart it, not attempt to keep a program in an invalid state running. Should I mention to restart it AFTER A GRACEFUL SHUTDOWN ? No. Abort with crash dump

Re: AST Macros?

2012-06-01 Thread Philippe Sigaud
On Fri, Jun 1, 2012 at 6:49 PM, Jonathan M Davis jmdavisp...@gmx.com wrote: On Friday, June 01, 2012 19:47:47 Gor Gyolchanyan wrote: Where can I read more about Bartosz's race-free type system and if there are some specific ideas already, AST macros for D as well? I'm sure that there's some

Re: AST Macros?

2012-06-01 Thread Gor Gyolchanyan
On Fri, Jun 1, 2012 at 8:56 PM, Philippe Sigaud philippe.sig...@gmail.comwrote: On Fri, Jun 1, 2012 at 6:49 PM, Jonathan M Davis jmdavisp...@gmx.com wrote: On Friday, June 01, 2012 19:47:47 Gor Gyolchanyan wrote: Where can I read more about Bartosz's race-free type system and if there are

Re: Is the address-of operator () really needed?

2012-06-01 Thread Sandeep Datta
I would add that fptr = function; makes it _clear_ what is going on there, otherwise I would have to go and find what function is... There are two contradictory issues at work here which need to be balanced with each other... 1. While writing code we expect the compiler to understand what

Re: Is the address-of operator () really needed?

2012-06-01 Thread Sandeep Datta
1. It's needed so that you can call it when calling C code. Why can't we just use information from the C function signature to determine when an address needs to be passed? Why is manual intervention required here? 2. Just because ref is often better than a pointer doesn't mean that it's

Re: Is the address-of operator () really needed?

2012-06-01 Thread Artur Skawina
On 06/01/12 19:19, Sandeep Datta wrote: 1. It's needed so that you can call it when calling C code. Why can't we just use information from the C function signature to determine when an address needs to be passed? Why is manual intervention required here? 2. Just because ref is often

Re: Is the address-of operator () really needed?

2012-06-01 Thread Sandeep Datta
import std.stdio; @property f() { writeln(oops); return 0; } void main() { auto p = f; } artur I understand what you are trying to say but I hear parens will become mandatory soon. This may not be a problem then.

Re: synchronized (this[.classinfo]) in druntime and phobos

2012-06-01 Thread deadalnix
Le 01/06/2012 14:52, Steven Schveighoffer a écrit : On Fri, 01 Jun 2012 08:38:45 -0400, Dmitry Olshansky dmitry.o...@gmail.com wrote: On 01.06.2012 16:26, deadalnix wrote: Here is what I ended up to think is the best solution : synchronized classes exists. By default, they can't be use as

Re: [Proposal] Additional operator overloadings for multidimentional indexing and slicing

2012-06-01 Thread bearophile
kenji hara: I'd like to propose a new language feature to D community. I think this was discussed and generally appreciated. It seems an improvement. Thank you Kenji. Bye, bearophile

Re: runtime hook for Crash on Error

2012-06-01 Thread Walter Bright
On 6/1/2012 1:48 AM, Dmitry Olshansky wrote: Or better - save game and then crash gracefully. That can result in saving a corrupted game state, which then will not load, or worse, load and then cause another crash. I would suggest instead implementing an auto-save feature which

Re: Is the address-of operator () really needed?

2012-06-01 Thread Sandeep Datta
On Friday, 1 June 2012 at 15:58:04 UTC, Andrej Mitrovic wrote: On 5/31/12, Jonathan M Davis jmdavisp...@gmx.com wrote: 2. Just because ref is often better than a pointer doesn't mean that it's never valuable to be able to pass a pointer to a variable. 5. And '' documents code better at the

Re: runtime hook for Crash on Error

2012-06-01 Thread Walter Bright
On 6/1/2012 5:29 AM, Steven Schveighoffer wrote: No. What we need is a non-throwing version of malloc that returns NULL. We have it. It's called malloc! :-)

Re: runtime hook for Crash on Error

2012-06-01 Thread Walter Bright
On 6/1/2012 6:25 AM, Jacob Carlborg wrote: On Friday, 1 June 2012 at 01:16:28 UTC, Walter Bright wrote: [When I worked on flight critical airplane systems, the only acceptable response for a self-detected fault was to IMMEDIATELY stop the system, physically DISENGAGE it from the flight

Re: runtime hook for Crash on Error

2012-06-01 Thread Steven Schveighoffer
On Fri, 01 Jun 2012 13:50:16 -0400, Walter Bright newshou...@digitalmars.com wrote: On 6/1/2012 5:29 AM, Steven Schveighoffer wrote: No. What we need is a non-throwing version of malloc that returns NULL. We have it. It's called malloc! Oh sorry, I meant *GC.malloc* :) -Steve

Re: Website

2012-06-01 Thread Walter Bright
On 5/31/2012 10:42 PM, d coder wrote: Why am I being taken to Digital Daemon when I goto http://dlang.org ? Where can I find official D language site now? It's back up. Jan Knepper reports that the server suffered from some sort of swapping problem. He got the system back up, and today is

Re: Is the address-of operator () really needed?

2012-06-01 Thread Artur Skawina
On 06/01/12 19:41, Sandeep Datta wrote: import std.stdio; @property f() { writeln(oops); return 0; } void main() { auto p = f; } artur I understand what you are trying to say but I hear parens will become mandatory soon. This may not be a problem then. No, it's the other way

Re: Is the address-of operator () really needed?

2012-06-01 Thread Mehrdad
On Friday, 1 June 2012 at 17:07:57 UTC, Sandeep Datta wrote: 1. While writing code we expect the compiler to understand what we want to do without writing a lot of code. is not a lot of code.

Re: Exception/Error division in D

2012-06-01 Thread deadalnix
Le 01/06/2012 02:57, Walter Bright a écrit : On 5/31/2012 2:23 AM, Lars T. Kyllingstad wrote: On Thursday, 31 May 2012 at 02:18:22 UTC, Walter Bright wrote: A recoverable exception is NOT a logic bug in your program, which is why it is recoverable. If there is recovery possible from a

Re: Exception/Error division in D

2012-06-01 Thread deadalnix
Le 01/06/2012 14:16, Tobias Pankrath a écrit : On Friday, 1 June 2012 at 12:03:15 UTC, deadalnix wrote: Le 01/06/2012 12:29, Walter Bright a écrit : On 6/1/2012 1:15 AM, Jens Mueller wrote: Since the current implementation does not follow the specification regarding scope and finally block

Re: runtime hook for Crash on Error

2012-06-01 Thread Artur Skawina
On 06/01/12 19:59, Steven Schveighoffer wrote: On Fri, 01 Jun 2012 13:50:16 -0400, Walter Bright newshou...@digitalmars.com wrote: On 6/1/2012 5:29 AM, Steven Schveighoffer wrote: No. What we need is a non-throwing version of malloc that returns NULL. We have it. It's called malloc! Oh

Re: Is the address-of operator () really needed?

2012-06-01 Thread Sandeep Datta
On Friday, 1 June 2012 at 18:07:12 UTC, Artur Skawina wrote: On 06/01/12 19:41, Sandeep Datta wrote: import std.stdio; @property f() { writeln(oops); return 0; } void main() { auto p = f; } artur I understand what you are trying to say but I hear parens will become mandatory soon.

Re: Is the address-of operator () really needed?

2012-06-01 Thread Sandeep Datta
On Friday, 1 June 2012 at 18:07:12 UTC, Artur Skawina wrote: On 06/01/12 19:41, Sandeep Datta wrote: import std.stdio; @property f() { writeln(oops); return 0; } void main() { auto p = f; } artur I understand what you are trying to say but I hear parens will become mandatory soon.

Re: runtime hook for Crash on Error

2012-06-01 Thread deadalnix
Le 01/06/2012 12:15, Walter Bright a écrit : On 6/1/2012 12:45 AM, Jens Mueller wrote: This is perfectly valid when developing such critical systems. But limiting D to effectively only allow developing such particular systems cannot be the appropriate response. There are plenty of other systems

Re: Website

2012-06-01 Thread Kagamin
Huh, wasn't Digital Daemon the previous site at dlang.org address?

Re: Is the address-of operator () really needed?

2012-06-01 Thread Jonathan M Davis
On Friday, June 01, 2012 19:19:17 Sandeep Datta wrote: 1. It's needed so that you can call it when calling C code. Why can't we just use information from the C function signature to determine when an address needs to be passed? Why is manual intervention required here? How about something

Re: AST Macros?

2012-06-01 Thread Jacob Carlborg
On 2012-06-01 17:47, Gor Gyolchanyan wrote: Where can I read more about Bartosz's race-free type system and if there are some specific ideas already, AST macros for D as well? AST macros have been mentioned in the newsgroups several times. There was a talk at the first D conference

Re: runtime hook for Crash on Error

2012-06-01 Thread Jonathan M Davis
On Friday, June 01, 2012 14:00:01 deadalnix wrote: Le 01/06/2012 12:26, Walter Bright a écrit : Except that you do not know why the arithmetic turned out wrong - it could be the result of memory corruption. Yes. wrong calculation often comes from memory corruption. Almost never from

Re: Is the address-of operator () really needed?

2012-06-01 Thread Artur Skawina
On 06/01/12 21:18, Jonathan M Davis wrote: 3. ref doesn't work with variadic templates very well. Take a look a std.getopt.getopt. It takes pointers, not refs, and there isn't a way to make it take refs. Is it because getopt() is a C function? If it is see my reply to your point #1. I'll

Re: Exception/Error division in D

2012-06-01 Thread Jonathan M Davis
On Friday, June 01, 2012 03:29:17 Walter Bright wrote: On 6/1/2012 1:15 AM, Jens Mueller wrote: Since the current implementation does not follow the specification regarding scope and finally block being executed in case of Error will try ... catch (...Error) keep working? No. The reason

Re: Exception/Error division in D

2012-06-01 Thread Jonathan M Davis
On Friday, June 01, 2012 14:16:48 Tobias Pankrath wrote: 90% of null pointer dereferences are simple bugs not memory corruption. True, but it means that you have a logic bug, which means that your program is in an invalid state anyway, and continuing could do who-knows-what. If you want to

Re: Exception/Error division in D

2012-06-01 Thread Jonathan M Davis
On Friday, June 01, 2012 20:14:45 deadalnix wrote: We are talking about runing scope statement and finally when unwiding the stack, not trying to continue the execution of the program. Except that that _is_ continuing execution. It's only running cleanup code, but if the program state is

Re: Is the address-of operator () really needed?

2012-06-01 Thread Andrej Mitrovic
On 6/1/12, Sandeep Datta datta.sand...@gmail.com wrote: Please see http://forum.dlang.org/post/ycwrmmvnpdwkonjwo...@forum.dlang.org Also this is required when interfacing with C struct methods, since they might have side-effects.

Re: Is the address-of operator () really needed?

2012-06-01 Thread Jonathan M Davis
On Friday, June 01, 2012 21:48:01 Artur Skawina wrote: On 06/01/12 21:18, Jonathan M Davis wrote: 3. ref doesn't work with variadic templates very well. Take a look a std.getopt.getopt. It takes pointers, not refs, and there isn't a way to make it take refs. Is it because getopt()

Re: runtime hook for Crash on Error

2012-06-01 Thread Dmitry Olshansky
On 01.06.2012 23:38, Jonathan M Davis wrote: On Friday, June 01, 2012 14:00:01 deadalnix wrote: Le 01/06/2012 12:26, Walter Bright a écrit : Except that you do not know why the arithmetic turned out wrong - it could be the result of memory corruption. Yes. wrong calculation often comes from

Re: runtime hook for Crash on Error

2012-06-01 Thread Dmitry Olshansky
On 02.06.2012 0:06, Dmitry Olshansky wrote: On 01.06.2012 23:38, Jonathan M Davis wrote: On Friday, June 01, 2012 14:00:01 deadalnix wrote: Le 01/06/2012 12:26, Walter Bright a écrit : Except that you do not know why the arithmetic turned out wrong - it could be the result of memory

Re: Is the address-of operator () really needed?

2012-06-01 Thread Artur Skawina
On 06/01/12 22:03, Jonathan M Davis wrote: On Friday, June 01, 2012 21:48:01 Artur Skawina wrote: On 06/01/12 21:18, Jonathan M Davis wrote: 3. ref doesn't work with variadic templates very well. Take a look a std.getopt.getopt. It takes pointers, not refs, and there isn't a way to make it

Re: Is the address-of operator () really needed?

2012-06-01 Thread Paulo Pinto
On Friday, 1 June 2012 at 15:58:04 UTC, Andrej Mitrovic wrote: On 5/31/12, Jonathan M Davis jmdavisp...@gmx.com wrote: 2. Just because ref is often better than a pointer doesn't mean that it's never valuable to be able to pass a pointer to a variable. 5. And '' documents code better at the

Re: Exception/Error division in D

2012-06-01 Thread Walter Bright
On 6/1/2012 11:14 AM, deadalnix wrote: We are talking about runing scope statement and finally when unwiding the stack, not trying to continue the execution of the program. Which will be running arbitrary code not anticipated by the assert failure, and code that is highly unlikely to be

  1   2   >