Re: Inheritance of purity

2012-02-24 Thread Sean Cavanaugh
On 2/24/2012 10:29 AM, H. S. Teoh wrote: On Fri, Feb 24, 2012 at 02:43:01AM -0800, Walter Bright wrote: [...] Like the switch from command line to GUI, perhaps there are some that are ready to switch from text files to some visually graphy thingy for source code. But D ain't such a language. I d

Re: Conclusions of the exception discussion

2012-02-24 Thread Jonathan M Davis
On Saturday, February 25, 2012 17:26:02 Daniel Murphy wrote: > "Jonathan M Davis" 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

Re: Conclusions of the exception discussion

2012-02-24 Thread Daniel Murphy
"Jonathan M Davis" 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 going to do it. So, > whether we end up with a feature alo

Conclusions of the exception discussion

2012-02-24 Thread Jonathan M Davis
Okay, the "The Right Approach to Exceptions" thread is a huge, confusing mess at this point without a clear, definitive conclusion, and we need one. So, I'm posting here, in a new thread, what appears to me to be the conclusion that that thread comes to and see if we can get some sort of consens

Re: Resolving issues on the bugtracker

2012-02-24 Thread Jonathan M Davis
On Friday, February 24, 2012 20:15:01 H. S. Teoh wrote: > On Fri, Feb 24, 2012 at 07:52:18PM -0800, Jonathan M Davis wrote: > > On Friday, February 24, 2012 19:51:21 H. S. Teoh wrote: > > > What's the convention on resolving issues on the bug tracker? > > > > > > I just investigated issue 6709, an

Re: Resolving issues on the bugtracker

2012-02-24 Thread H. S. Teoh
On Fri, Feb 24, 2012 at 07:52:18PM -0800, Jonathan M Davis wrote: > On Friday, February 24, 2012 19:51:21 H. S. Teoh wrote: > > What's the convention on resolving issues on the bug tracker? > > > > I just investigated issue 6709, and it appears that it's not a > > Phobos bug, but a bug in /bin/ip.

Re: Resolving issues on the bugtracker

2012-02-24 Thread Jonathan M Davis
On Friday, February 24, 2012 19:51:21 H. S. Teoh wrote: > What's the convention on resolving issues on the bug tracker? > > I just investigated issue 6709, and it appears that it's not a Phobos > bug, but a bug in /bin/ip. Should I go ahead and resolve it? Well, if it's not a bug in Phobos, and y

Resolving issues on the bugtracker

2012-02-24 Thread H. S. Teoh
What's the convention on resolving issues on the bug tracker? I just investigated issue 6709, and it appears that it's not a Phobos bug, but a bug in /bin/ip. Should I go ahead and resolve it? T -- People tell me that I'm skeptical, but I don't believe it.

Re: FP in D (today)

2012-02-24 Thread Walter Bright
On 2/24/2012 12:20 PM, Gour wrote: On Thu, 23 Feb 2012 10:45:38 -0800 Walter Bright wrote: The main issue with FP in D today is it needs to be pervasively used in Phobos. A large part of Phobos should be marked as pure, but is not, making it difficult to use Phobos from FP code. Heh, that's

Re: The Right Approach to Exceptions

2012-02-24 Thread H. S. Teoh
On Fri, Feb 24, 2012 at 07:37:03PM -0500, Jonathan M Davis wrote: > On Friday, February 24, 2012 16:18:59 H. S. Teoh wrote: > > On Fri, Feb 24, 2012 at 06:48:47PM -0500, Jonathan M Davis wrote: [...] > > > which, as you point out, would have to be done at runtime, or by > > > doing something simila

Re: The Right Approach to Exceptions

2012-02-24 Thread Jonathan M Davis
On Friday, February 24, 2012 16:18:59 H. S. Teoh wrote: > On Fri, Feb 24, 2012 at 06:48:47PM -0500, Jonathan M Davis wrote: > > 1. Being able to annotate catch blocks in some manner to enable them > > to catch multiple, specific exceptions - either by using some kind of > > condition > > > > catc

Re: The Right Approach to Exceptions

2012-02-24 Thread H. S. Teoh
On Fri, Feb 24, 2012 at 06:48:47PM -0500, Jonathan M Davis wrote: [...] > However, Java does have a great exception hierarchy, much of which is > standard. And that's a lot better than having only a handful of > unrelated exceptions, let alone having all exceptions be specific to a > module like we

Re: The Right Approach to Exceptions

2012-02-24 Thread Jonathan M Davis
On Friday, February 24, 2012 16:38:31 Steven Schveighoffer wrote: > On to my second point. One of the issues I have with Java is that > exceptions are *overused*. For example, EOF should not be an exception, > most files have ends, it's not a very exceptional situation. If there is > an intuitive

Re: The Right Approach to Exceptions

2012-02-24 Thread H. S. Teoh
On Fri, Feb 24, 2012 at 04:38:31PM -0500, Steven Schveighoffer wrote: [...] > On to my second point. One of the issues I have with Java is that > exceptions are *overused*. For example, EOF should not be an > exception, most files have ends, it's not a very exceptional > situation. If there is a

Re: The Right Approach to Exceptions

2012-02-24 Thread Steven Schveighoffer
On Sat, 18 Feb 2012 13:52:05 -0500, Andrei Alexandrescu wrote: There's a discussion that started in a pull request: https://github.com/alexrp/phobos/commit/4b87dcf39efeb4ddafe8fe99a0ef9a529c0dcaca Let's come up with a good doctrine for exception defining and handling in Phobos. From exper

Re: FP in D (today)

2012-02-24 Thread Gour
On Thu, 23 Feb 2012 10:45:38 -0800 Walter Bright wrote: > The main issue with FP in D today is it needs to be pervasively used > in Phobos. A large part of Phobos should be marked as pure, but is > not, making it difficult to use Phobos from FP code. Heh, that's interesting... > For example, Ob

Re: Floating point failures on x64

2012-02-24 Thread Martin Nowak
On Fri, 24 Feb 2012 12:20:42 +0100, Daniel Murphy wrote: Do you know what happened to the rest of the intel disassembly? It ends rather abruptly... It gets truncated while uploading? https://gist.github.com/1903445 I'd use the other listing but the callq instructions seem to be displayin

Re: The Right Approach to Exceptions

2012-02-24 Thread Andrei Alexandrescu
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 would be hidden from the user of the library. Sorta

Re: The Right Approach to Exceptions

2012-02-24 Thread H. S. Teoh
On Fri, Feb 24, 2012 at 01:46:56PM -0500, Jonathan M Davis wrote: > On Friday, February 24, 2012 07:57:13 H. S. Teoh wrote: > > Actually, I wonder if it makes sense for the compiler to insert > > in-contract code in the *caller* instead of the callee. Conceptually > > speaking, an in-contract means

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

2012-02-24 Thread Jonathan M Davis
On Thursday, February 23, 2012 13:42:44 Jacob Carlborg wrote: > On 2012-02-23 00:03, Jonathan M Davis wrote: > > On Wednesday, February 22, 2012 23:50:53 Bernard Helyer wrote: > >> Except DMD is faster by a factor of 10 when passing it all at > >> once. > > > > Then maybe there _should_ be a flag

Re: std.collection lets rename it into std,ridiculous.

2012-02-24 Thread Jonathan M Davis
On Friday, February 24, 2012 11:34:11 Steven Schveighoffer wrote: > I'm sorry, I promised to do this a long time ago. When I have time to pay > attention to D again (I've been super-busy at work and home for the last 2 > weeks), this is the first thing I will do. > > It's generated using TRAC Wiki

Re: The Right Approach to Exceptions

2012-02-24 Thread Jonathan M Davis
On Friday, February 24, 2012 08:27:44 H. S. Teoh wrote: > On Fri, Feb 24, 2012 at 07:57:13AM -0800, H. S. Teoh wrote: > > > On Thursday, February 23, 2012 15:18:27 H. S. Teoh wrote: > > > > In my book, a linked library shares equal status with the "main > > > > program", therefore the definition of

Re: The Right Approach to Exceptions

2012-02-24 Thread Jonathan M Davis
On Friday, February 24, 2012 07:57:13 H. S. Teoh wrote: > Actually, I wonder if it makes sense for the compiler to insert > in-contract code in the *caller* instead of the callee. Conceptually > speaking, an in-contract means "you have to fulfill these conditions > before calling this function". So

Re: Questions about windows support

2012-02-24 Thread H. S. Teoh
On Fri, Feb 24, 2012 at 07:19:33PM +0100, Adam D. Ruppe wrote: > On Friday, 24 February 2012 at 17:54:47 UTC, H. S. Teoh wrote: > >You could just pad the unused space with blank pixels. > > whoa, make a tile based system, like the NES. > > There's a private use area in unicode, 16 bits of space I

Re: Questions about windows support

2012-02-24 Thread Adam D. Ruppe
On Friday, 24 February 2012 at 17:54:47 UTC, H. S. Teoh wrote: You could just pad the unused space with blank pixels. whoa, make a tile based system, like the NES. There's a private use area in unicode, 16 bits of space I think. You could define a tile set to use that, or a simple bitmap for

Re: PyD

2012-02-24 Thread Ellery Newcomer
On 02/23/2012 11:40 PM, Ellery Newcomer wrote: it seems not to be compiling with the 2.058 front end 3 (4 but for a segfault during shutdown) out of the 5 examples compile with 2.058 and run!

Re: Questions about windows support

2012-02-24 Thread H. S. Teoh
On Fri, Feb 24, 2012 at 02:32:38PM +1300, James Miller wrote: [...] > I have tried to keep the scope of what the graphics capabilities of > the terminal are down to a minimum, so all the drawing would still be > in terms of the terminal. I was thinking that you put it into graphics > mode, say how

Re: Questions about windows support

2012-02-24 Thread H. S. Teoh
On Fri, Feb 24, 2012 at 05:19:44PM +0100, Adam D. Ruppe wrote: > On Thursday, 23 February 2012 at 19:10:03 UTC, H. S. Teoh wrote: [...] > >The echo command has a bug, it's not supposed to output 'echo' as > >part of its output. :) > > Yeah, I messed up argv. > > Here's an updated version: > http:

Re: Setting a deadline for setting up shared ?

2012-02-24 Thread deadalnix
Le 23/02/2012 20:45, Brad Roberts a écrit : On 2/23/2012 5:32 AM, deadalnix wrote: Shared in D2 has been a stub for ages now. I'm affraid it will never get implemented if we don't define any priority for it. D2 is supposed to provide a very elegant way to handle concurency, but, in the curre

Re: std.collection lets rename it into std,ridiculous.

2012-02-24 Thread Steven Schveighoffer
On Mon, 20 Feb 2012 11:22:32 -0500, a wrote: auto a = [1,2,3,4,5]; auto b = a[0..3]; assumeSafeAppend(b); b ~= 0; writeln(a); prints [1, 2, 3, 0, 5], so b is not reallocated in this case. Just to clarify: this is not guaranteed to print [1, 2, 3, 0, 5], it only does if there is still enoug

Re: std.collection lets rename it into std,ridiculous.

2012-02-24 Thread Steven Schveighoffer
On Mon, 20 Feb 2012 16:03:19 -0500, Jonathan M Davis wrote: On Monday, February 20, 2012 14:55:36 Andrei Alexandrescu wrote: On 2/20/12 1:45 PM, Jonathan M Davis wrote: > In fact, we really should get Steven's article up on dlang.org. It's one > of > those articles that _every_ D programm

Re: inout and function/delegate parameters

2012-02-24 Thread Steven Schveighoffer
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; } This is a legitimate request,

Re: Inheritance of purity

2012-02-24 Thread H. S. Teoh
On Thu, Feb 23, 2012 at 10:08:40PM -0800, Jonathan M Davis wrote: > On Thursday, February 23, 2012 21:50:27 H. S. Teoh wrote: > > Oh? I thought *real* real programmers use a soldering iron, a pair > > of tweezers, a magnifying glass, and really *really* steady hands... > > Tricky things to program,

Re: Inheritance of purity

2012-02-24 Thread H. S. Teoh
On Fri, Feb 24, 2012 at 02:43:01AM -0800, Walter Bright wrote: [...] > Like the switch from command line to GUI, perhaps there are some that > are ready to switch from text files to some visually graphy thingy for > source code. But D ain't such a language. I don't know what such a > language would

Re: The Right Approach to Exceptions

2012-02-24 Thread H. S. Teoh
On Fri, Feb 24, 2012 at 07:57:13AM -0800, H. S. Teoh wrote: > > On Thursday, February 23, 2012 15:18:27 H. S. Teoh wrote: > > > In my book, a linked library shares equal status with the "main > > > program", therefore the definition of "user input" still sits at > > > the internal-to-program and ex

Re: Questions about windows support

2012-02-24 Thread Adam D. Ruppe
On Thursday, 23 February 2012 at 19:10:03 UTC, H. S. Teoh wrote: Nice!!! So you can write the same code for both the "shell library" and the actual shell itself. Yeah. This is similar to the technique I used in my web.d thing, though web.d's is a lot more complex. (It also handles sub objects,

Re: The Right Approach to Exceptions

2012-02-24 Thread H. S. Teoh
On Thu, Feb 23, 2012 at 07:06:02PM -0500, Jonathan M Davis wrote: > On Thursday, February 23, 2012 15:18:27 H. S. Teoh wrote: > > On Thu, Feb 23, 2012 at 12:07:40PM -0800, Jonathan M Davis wrote: > > In my book, a linked library shares equal status with the "main > > program", therefore the definit

Re: Inheritance of purity

2012-02-24 Thread Robert Clipsham
On 24/02/2012 10:43, Walter Bright wrote: Do you really want a language that the source code isn't readable or browsable outside of an IDE? Like the switch from command line to GUI, perhaps there are some that are ready to switch from text files to some visually graphy thingy for source code. Bu

Re: Inheritance of purity

2012-02-24 Thread Alix Pexton
On 24/02/2012 11:03, David wrote: Am 24.02.2012 11:43, schrieb Walter Bright: 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 larg

Re: The Right Approach to Exceptions

2012-02-24 Thread Regan Heath
On Thu, 23 Feb 2012 15:13:17 -, James Miller wrote: On 23 February 2012 05:09, Regan Heath wrote: On Tue, 21 Feb 2012 14:19:17 -, Andrei Alexandrescu wrote: On 2/21/12 5:55 AM, Regan Heath wrote: On Sun, 19 Feb 2012 23:04:59 -, Andrei Alexandrescu wrote: On 2/19/12 4:00 PM,

Re: Inheritance of purity

2012-02-24 Thread deadalnix
Le 23/02/2012 21:22, so a écrit : On Thursday, 23 February 2012 at 18:32:12 UTC, Walter Bright wrote: Not a bad idea, but it would be problematic if there were any overloads. It is still applicable to return types. But i don't like the idea. If you omit arguments and return type, you force bo

Re: Inheritance of purity

2012-02-24 Thread deadalnix
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 overloadings. The const inheritance *only* ha

Re: Floating point failures on x64

2012-02-24 Thread Daniel Murphy
Do you know what happened to the rest of the intel disassembly? It ends rather abruptly... I'd use the other listing but the callq instructions seem to be displaying the return address instead of the target address. "Martin Nowak" wrote in message news:op.v96domsnsqu...@dawg-freebsd.lan... >

Re: Inheritance of purity

2012-02-24 Thread deadalnix
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. Walter? Andrei I'm surprised this i

Re: Inheritance of purity

2012-02-24 Thread deadalnix
Le 18/02/2012 22:18, Timon Gehr a écrit : On 02/18/2012 10:06 PM, deadalnix wrote: Le 18/02/2012 16:04, Timon Gehr a écrit : For them, it is certainly safe. It is questionable how large the effective benefit is for const, since the const qualifier would be inherited for the method only, but not

Re: Inheritance of purity

2012-02-24 Thread David
Am 24.02.2012 11:43, schrieb Walter Bright: 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 seri

Re: Inheritance of purity

2012-02-24 Thread Walter Bright
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 application outside of a modern IDE. I'm

Re: Inheritance of purity

2012-02-24 Thread Alix Pexton
On 24/02/2012 00:48, Andrei Alexandrescu wrote: On 2/23/12 6:46 PM, Andrei Alexandrescu wrote: On 2/23/12 6:01 PM, F i L wrote: It's unrealistic to think people (at large) will be writing any sort of serious application outside of a modern IDE. You'd hate working for Facebook :o). Andrie I

Re: Floating point failures on x64

2012-02-24 Thread Daniel Murphy
Intel, thanks. (*shudder*, AT&T) "Martin Nowak" wrote in message news:op.v96domsnsqu...@dawg-freebsd.lan... > On Fri, 24 Feb 2012 09:02:05 +0100, Daniel Murphy > wrote: > >> Thanks heaps! Only failing for cfloat+ now! >> I've updated the pull, do you mind doing it again? >> >> "Martin Nowak"

Re: [RFC]Proposal for better garbage collection

2012-02-24 Thread deadalnix
Le 23/02/2012 20:58, H. S. Teoh a écrit : On Thu, Feb 23, 2012 at 01:51:31PM +0200, Manu wrote: [...] I wonder if there are alternative ways to detect a foreign stack. And I'm not sure why it even matters, you can't depend on the extern ABI, how do you unwind the stack reliably in the first plac

Re: Floating point failures on x64

2012-02-24 Thread Martin Nowak
On Fri, 24 Feb 2012 09:02:05 +0100, Daniel Murphy wrote: Thanks heaps! Only failing for cfloat+ now! I've updated the pull, do you mind doing it again? "Martin Nowak" wrote in message news:op.v958yuyvsqu...@dawg-freebsd.lan... On Fri, 24 Feb 2012 06:57:22 +0100, Daniel Murphy wrote: I'

Re: Floating point failures on x64

2012-02-24 Thread Daniel Murphy
Thanks heaps! Only failing for cfloat+ now! I've updated the pull, do you mind doing it again? "Martin Nowak" wrote in message news:op.v958yuyvsqu...@dawg-freebsd.lan... > On Fri, 24 Feb 2012 06:57:22 +0100, Daniel Murphy > wrote: > >> I've been trying to fix issue 4155, but it's a little dif