Re: Raw binary(to work without OS) in D

2012-07-02 Thread Don Clugston
On 28/06/12 18:36, Jens Mueller wrote: Don Clugston wrote: On 28/06/12 17:00, Jens Mueller wrote: Andrei Alexandrescu wrote: On 6/28/12 10:07 AM, Roman D. Boiko wrote: On Thursday, 28 June 2012 at 14:04:37 UTC, Mehrdad wrote: I think just exposing them via .sig and .exp might be the way to

Re: Raw binary(to work without OS) in D

2012-07-02 Thread Don Clugston
On 28/06/12 18:37, David Nadlinger wrote: On Thursday, 28 June 2012 at 15:28:10 UTC, Don Clugston wrote: There's an oddity, though: the type of X.significand would be dependent on the type of X […] I don't think this is a problem at all – for example, the type of T.init depends on

Re: LLVM IR influence on compiler debugging

2012-06-29 Thread Don Clugston
On 29/06/12 08:04, bearophile wrote: This is a very easy to read article about the design of LLVM: http://www.drdobbs.com/architecture-and-design/the-design-of-llvm/240001128 That IR has a great effect on making it simpler to debug the compiler, I think this is important (and I think it partiall

Re: New hash API: namespace

2012-06-29 Thread Don Clugston
On 25/06/12 20:04, Jesse Phillips wrote: On Monday, 25 June 2012 at 16:09:43 UTC, Felix Hufnagel wrote: +1 for hashes into std.hash and cryptographic primitives into std.crypto and we should have a std.net (std.uri, std.socket, std.socketstream , std.net.curl, ...), std.io. for (Outbuffer, file

Re: Raw binary(to work without OS) in D

2012-06-28 Thread Don Clugston
On 28/06/12 17:00, Jens Mueller wrote: Andrei Alexandrescu wrote: On 6/28/12 10:07 AM, Roman D. Boiko wrote: On Thursday, 28 June 2012 at 14:04:37 UTC, Mehrdad wrote: I think just exposing them via .sig and .exp might be the way to go? sig is easy to confuse with sign .mantissa and .exp

Re: Raw binary(to work without OS) in D

2012-06-28 Thread Don Clugston
On 28/06/12 15:31, Jens Mueller wrote: Andrei Alexandrescu wrote: On 6/22/12 7:41 AM, Don Clugston wrote: I think the main thing that's still done in C is the floating point formatting. Would be great if a contributor could translate FP parsing and formatting code into D. Then we can u

Re: Raw binary(to work without OS) in D

2012-06-22 Thread Don Clugston
On 22/06/12 10:08, Mehrdad wrote: On Friday, 22 June 2012 at 08:00:08 UTC, Dmitry Olshansky wrote: Then implement the ones you happen to actually need. Er, the question isn't WHAT to do, it's HOW. If you have any idea how to implement things like TLS, SEH, and the like, then PLEASE, share th

Re: GDC review process.

2012-06-21 Thread Don Clugston
On 20/06/12 16:37, Manu wrote: On 20 June 2012 17:15, Don Clugston mailto:d...@nospam.com>> wrote: On 20/06/12 13:22, Manu wrote: I find optimisers are very good at code simplification, assuming that you massage the code/expressions to neatly mat

Re: GDC review process.

2012-06-20 Thread Don Clugston
On 20/06/12 14:51, Manu wrote: On 20 June 2012 14:44, Don Clugston mailto:d...@nospam.com>> wrote: On 20/06/12 13:04, Manu wrote: On 20 June 2012 13:51, Don Clugston mailto:d...@nospam.com> <mailto:d...@nospam.com <mailto:d...@nospam.com>>> wrote:

Re: GDC review process.

2012-06-20 Thread Don Clugston
On 20/06/12 13:22, Manu wrote: On 20 June 2012 13:59, Don Clugston mailto:d...@nospam.com>> wrote: You and I seem to be from different planets. I have almost never written as asm function which was suitable for inlining. Take a look at std.internal.math.biguintX86.d I

Re: GDC review process.

2012-06-20 Thread Don Clugston
On 20/06/12 13:04, Manu wrote: On 20 June 2012 13:51, Don Clugston mailto:d...@nospam.com>> wrote: On 19/06/12 20:19, Iain Buclaw wrote: Hi, Had round one of the code review process, so I'm going to post the main issues here that most affect D

Re: GDC review process.

2012-06-20 Thread Don Clugston
On 20/06/12 00:55, Manu wrote: On 20 June 2012 01:07, Walter Bright mailto:newshou...@digitalmars.com>> wrote: On 6/19/2012 1:58 PM, Manu wrote: I find a thorough suite of architecture intrinsics are usually the fastest and cleanest way to the best possible code, alt

Re: GDC review process.

2012-06-20 Thread Don Clugston
On 20/06/12 03:01, Alex Rønne Petersen wrote: On 20-06-2012 02:58, Timon Gehr wrote: On 06/20/2012 02:04 AM, Alex Rønne Petersen wrote: On 20-06-2012 01:55, Timon Gehr wrote: On 06/20/2012 12:47 AM, Alex Rønne Petersen wrote: On 19-06-2012 23:52, Walter Bright wrote: On 6/19/2012 1:36 PM, be

Re: GDC review process.

2012-06-20 Thread Don Clugston
On 19/06/12 20:19, Iain Buclaw wrote: Hi, Had round one of the code review process, so I'm going to post the main issues here that most affect D users / the platforms they want to run on / the compiler version they want to use. 1) D Inline Asm and naked function support is raising far too man

Re: How to break const

2012-06-20 Thread Don Clugston
On 19/06/12 11:02, Iain Buclaw wrote: On 19 June 2012 09:18, Don Clugston wrote: So would I. Can you think of one? It was the best name I could come up with, given that the 'pure' was the keyword. We want a word that means 'no hidden state'. I thought that was what pure

Re: How to break const

2012-06-19 Thread Don Clugston
On 18/06/12 17:00, Artur Skawina wrote: On 06/18/12 16:41, deadalnix wrote: Le 18/06/2012 16:28, Artur Skawina a écrit : It's fine, if you view a delegate as opaque. No it isn't. You cannot ensure transitivity anywhere. This have obvious, and severe drawback for concurrent programing (impli

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-18 Thread Don Clugston
On 17/06/12 00:37, Walter Bright wrote: On 6/14/2012 1:03 AM, Don Clugston wrote: It is for debug builds. Iain's data indicates that it's only a few % of the time taken on semantic1(). Do you have data that shows otherwise? Nothing recent, it's mostly from my C++ compiler tes

Re: static array literal syntax request: auto x=[1,2,3]S;

2012-06-15 Thread Don Clugston
On 10/06/12 23:43, Jonathan M Davis wrote: On Sunday, June 10, 2012 23:23:57 Mehrdad wrote: I honestly don't see the POINT of having a "dynamic array literal". What's the point of making the literals dynamic? They should all be static, and only converted to dynamic if necessary from the contex

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-15 Thread Don Clugston
On 14/06/12 10:10, Jonathan M Davis wrote: On Thursday, June 14, 2012 10:03:05 Don Clugston wrote: On 13/06/12 16:29, Walter Bright wrote: On 6/13/2012 1:07 AM, Don Clugston wrote: On 12/06/12 18:46, Walter Bright wrote: On 6/12/2012 2:07 AM, timotheecour wrote: There's a current

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-14 Thread Don Clugston
On 13/06/12 16:29, Walter Bright wrote: On 6/13/2012 1:07 AM, Don Clugston wrote: On 12/06/12 18:46, Walter Bright wrote: On 6/12/2012 2:07 AM, timotheecour wrote: There's a current pull request to improve di file generation (https://github.com/D-Programming-Language/dmd/pull/945); I&#

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-13 Thread Don Clugston
On 12/06/12 18:46, Walter Bright wrote: On 6/12/2012 2:07 AM, timotheecour wrote: There's a current pull request to improve di file generation (https://github.com/D-Programming-Language/dmd/pull/945); I'd like to suggest further ideas. As far as I understand, di interface files try to achieve th

Re: AST files instead of DI interface files for faster compilation and easier distribution

2012-06-12 Thread Don Clugston
On 12/06/12 11:07, timotheecour wrote: There's a current pull request to improve di file generation (https://github.com/D-Programming-Language/dmd/pull/945); I'd like to suggest further ideas. As far as I understand, di interface files try to achieve these conflicting goals: 1) speed up compilat

Re: runtime hook for Crash on Error

2012-06-06 Thread Don Clugston
On 05/06/12 17:44, Jonathan M Davis wrote: On Tuesday, June 05, 2012 13:57:14 Don Clugston wrote: On 05/06/12 09:07, Jonathan M Davis wrote: On Tuesday, June 05, 2012 08:53:16 Don Clugston wrote: On 04/06/12 21:29, Steven Schveighoffer wrote: On Mon, 04 Jun 2012 06:20:56 -0400, Don Clugston

Re: runtime hook for Crash on Error

2012-06-05 Thread Don Clugston
On 05/06/12 09:07, Jonathan M Davis wrote: On Tuesday, June 05, 2012 08:53:16 Don Clugston wrote: On 04/06/12 21:29, Steven Schveighoffer wrote: On Mon, 04 Jun 2012 06:20:56 -0400, Don Clugston wrote: 1. There exist cases where you cannot know why the assert failed. 2. Therefore you never

Re: AST Macros?

2012-06-05 Thread Don Clugston
On 04/06/12 20:46, Jacob Carlborg wrote: On 2012-06-04 10:03, Don Clugston wrote: AST macros were discussed informally on the day after the conference, and it quickly became clear that the proposed ones were nowhere near powerful enough. Since that time nobody has come up with another proposal

Re: runtime hook for Crash on Error

2012-06-04 Thread Don Clugston
On 04/06/12 21:29, Steven Schveighoffer wrote: On Mon, 04 Jun 2012 06:20:56 -0400, Don Clugston wrote: 1. There exist cases where you cannot know why the assert failed. 2. Therefore you never know why an assert failed. 3. Therefore it is not safe to unwind the stack from a nothrow function

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

2012-06-04 Thread Don Clugston
On 04/06/12 15:38, bearophile wrote: David Nadlinger: Actually, I'd say its the other way round – opDollar rather corresponds to opDoubleEqualSign, as it simply describes the character used. I agree. It's the opposite of the semantic names of the original operator overloading set. You mean

Re: Exception/Error division in D

2012-06-04 Thread Don Clugston
On 01/06/12 22:35, Walter Bright wrote: 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 c

Re: runtime hook for Crash on Error

2012-06-04 Thread Don Clugston
On 01/06/12 12:26, Walter Bright wrote: 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 t

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

2012-06-04 Thread Don Clugston
On 03/06/12 19:31, tn wrote: On Friday, 1 June 2012 at 01:57:36 UTC, kenji hara wrote: I'd like to propose a new language feature to D community. ... This patch is an additional enhancement of opDollar (issue 3474 and #442). Sounds awesome. However, the name opDollar should be changed to some

Re: AST Macros?

2012-06-04 Thread Don Clugston
On 01/06/12 21:37, Jacob Carlborg wrote: 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

Re: [OT] Windows users: Are you happy with git?

2012-05-31 Thread Don Clugston
On 30/05/12 21:49, Alex Rønne Petersen wrote: On 30-05-2012 21:46, Kagamin wrote: On Friday, 18 May 2012 at 07:58:26 UTC, Lars T. Kyllingstad wrote: were some concerns about using Git on Windows. People claimed that Git was a very Linux-centric tool, and that Windows support was buggy at best.

Re: Pointer semantics in CTFE

2012-05-31 Thread Don Clugston
On 30/05/12 17:33, Michel Fortin wrote: On 2012-05-30 14:44:37 +, "Steven Schveighoffer" said: On Tue, 29 May 2012 13:35:12 -0400, Michel Fortin wrote: Personally, I think it'd be much cleaner to go with some kind of magic function than trying to match the condition against a predefined

Re: Exception/Error division in D

2012-05-30 Thread Don Clugston
On 30/05/12 12:59, Jonathan M Davis wrote: On Wednesday, May 30, 2012 11:32:00 Don Clugston wrote: On 30/05/12 10:40, Jonathan M Davis wrote: On Wednesday, May 30, 2012 10:26:36 deadalnix wrote: The fact that error don't trigger scope and everything is nonsensial. If an Error is

Re: Pointer semantics in CTFE

2012-05-30 Thread Don Clugston
On 30/05/12 01:47, Mehrdad wrote: Just a general note: going the "make a special case for two comparisons" route won't work if, for example, someone decides to use a lambda for comparing pointers. You mean effectively like: bool cmp(void *x, void *y) { return x < y: } assert ( cmp(x, y) &&

Re: Exception/Error division in D

2012-05-30 Thread Don Clugston
On 30/05/12 10:40, Jonathan M Davis wrote: On Wednesday, May 30, 2012 10:26:36 deadalnix wrote: The fact that error don't trigger scope and everything is nonsensial. If an Error is truly unrecoverable (as they're generally supposed to be), then what does it matter? Something fatal occured in y

Re: CTFE slower than expected

2012-05-30 Thread Don Clugston
On 29/05/12 23:23, Philippe Sigaud wrote: On Tue, May 29, 2012 at 2:52 PM, Don Clugston wrote: Is there any way to improve it? Oh yeah. Orders of magnitude, easily. ! The slowness is not in any way inherent to CTFE. The experience will be completely different, once I have some time to

Re: Pointer semantics in CTFE

2012-05-30 Thread Don Clugston
On 29/05/12 16:20, Michel Fortin wrote: On 2012-05-29 13:29:35 +, Don Clugston said: On 27/05/12 02:45, Walter Bright wrote: You could implement it as simply comparing the addresses - you'd be no worse off than C is, and you would get the correct answer for pointers both in and o

Re: Pointer semantics in CTFE

2012-05-29 Thread Don Clugston
On 27/05/12 02:45, Walter Bright wrote: On 5/26/2012 3:59 AM, Don wrote: Yes, that's what happens now. But that doesn't help the programmer. If it is inside, no problem, the expression is true. But if it is not inside, the expression is not false -- it's a compile-time error. Ok, I understand

Re: CTFE slower than expected

2012-05-29 Thread Don Clugston
On 29/05/12 12:25, Manu wrote: I've been trying to work out why my compile times have gone to hell recently. I have a lib, it takes 3.5 seconds to compile. I add one CTFE heavy module, it's not huge, certainly much smaller than the rest of the app, and it blows out to 18 seconds. I've done some

Re: Add CTFE execute function

2012-05-29 Thread Don Clugston
On 28/05/12 03:40, Chang Long wrote: On Saturday, 26 May 2012 at 15:56:38 UTC, Chang Long wrote: CTFE execute will be very useful on web develop, for example It is very hard to create a CTFE version template engine with rich feature. But we can use execute call to transe template file to d code

Pointer semantics in CTFE

2012-05-24 Thread Don Clugston
The current implementation of CTFE strictly enforces C pointer semantics. One of the restrictions is that you cannot perform ordering comparisons between unrelated pointers. This is important for repeatability: if it was permitted, the results would be arbitrary and might vary unpredictably with

Re: forcing weak purity

2012-05-24 Thread Don Clugston
On 24/05/12 02:26, Alex Rønne Petersen wrote: On 23-05-2012 19:16, deadalnix wrote: Le 23/05/2012 17:29, Don Clugston a écrit : There's a huge difference between "a global collection *may* be performed from a pure function" vs "it *must* be possible to force a global co

Re: forcing weak purity

2012-05-23 Thread Don Clugston
On 23/05/12 15:56, Alex Rønne Petersen wrote: On 23-05-2012 15:17, Don Clugston wrote: On 23/05/12 05:22, Steven Schveighoffer wrote: I have come across a dilemma. Alex Rønne Petersen has a pull request changing some things in the GC to pure. I think gc_collect() should be weak-pure, because

Re: forcing weak purity

2012-05-23 Thread Don Clugston
On 23/05/12 05:22, Steven Schveighoffer wrote: I have come across a dilemma. Alex Rønne Petersen has a pull request changing some things in the GC to pure. I think gc_collect() should be weak-pure, because it could technically run on any memory allocation (which is already allowed in pure functi

Re: forcing weak purity

2012-05-23 Thread Don Clugston
On 23/05/12 07:05, Mehrdad wrote: We should make 'pure' mean strongly pure. For weakly pure, we could introduce the 'doped' keyword :-D No, the keyword should be more like @noglobal I wish people would stop using this "weak purity" / "strong purity" terminology, it's very unhelpful. (And it'

Re: Bug report severity

2012-05-11 Thread Don Clugston
On 11/05/12 00:28, Mehrdad wrote: On Thursday, 10 May 2012 at 22:23:15 UTC, Stewart Gordon wrote: On 10/05/2012 23:12, Mehrdad wrote: How do you decide if something is 'critical', 'major', 'blocker', or just 'normal'? Is there a rule of thumb I could use? http://d.puremagic.com/issues/page.cg

Re: Lack of open source shown as negative part of D on Dr. Dobbs

2012-05-10 Thread Don Clugston
On 10/05/12 11:02, Joseph Rushton Wakeling wrote: Assuming that LLVM is not an acceptable backend despite its permissive licence, and that the community can't buy out the code, I'd suggest again the idea of stabilizing the frontend and then synchronizing DMD, GDC and LDC updates, with all 3 endor

Re: "is" operator for structures?

2012-05-09 Thread Don Clugston
On 09/05/12 16:13, bearophile wrote: Gor Gyolchanyan: Because the opBinary [...] Thank for your answer, but I don't carte of "why" the D compiler accepts that. I only care about the D compiler statically refusing that. Bye, bearophile I think you're asking for opBinary to be a keyword. If

Re: Does D have too many features?

2012-05-09 Thread Don Clugston
On 09/05/12 10:16, Alex Rønne Petersen wrote: On 08-05-2012 23:48, Sean Kelly wrote: On May 8, 2012, at 2:31 PM, Jonathan M Davis wrote: We've previously discussed having _all_ of the C system call functions from the various OSes that we support being in druntime, and I very much think that th

Re: Does D have too many features?

2012-05-09 Thread Don Clugston
On 08/05/12 14:50, Andrej Mitrovic wrote: On 5/8/12, Don Clugston wrote: That bug was fixed in git not long after release. I still get it with this version: http://d.puremagic.com/test-results/test_data.ghtml?dataid=180993 Same errors: http://pastebin.com/8uqgskHd OK, looks like it

Re: Does D have too many features?

2012-05-08 Thread Don Clugston
On 08/05/12 09:56, Andrej Mitrovic wrote: On 4/30/12, Andrej Mitrovic wrote: Personally my gripe with compilation times is that I get very used to having fast build times where I can go through an edit+compile+run cycle really fast, but after a while build times get slower Also since 2.059 er

Re: Why not all statement are expressions ?

2012-05-08 Thread Don Clugston
On 07/05/12 19:06, deadalnix wrote: Hi, Working on D I noticed that some statement, notably assert, are expression of type void. Why not all statement (that are not expression already) are expression ? assert isn't a statement. It's an expression ( same as is() ). What makes you think it's a

Re: Integer overflow and underflow semantics

2012-05-07 Thread Don Clugston
On 05/05/12 06:57, Alex Rønne Petersen wrote: Hi, I don't think the language really makes it clear whether overflows and underflows are well-defined. Do we guarantee that for any integral type T, T.max + 1 == T.min and T.min - 1 == T.max? This is relevant in particular for GDC and LDC since the

Re: Does D have too many features?

2012-05-03 Thread Don Clugston
On 03/05/12 16:13, Andrei Alexandrescu wrote: On 5/3/12 9:55 AM, Don Clugston wrote: On 28/04/12 20:47, Walter Bright wrote: Andrei and I had a fun discussion last night about this question. The idea was which features in D are redundant and/or do not add significant value? A couple already

Re: Does D have too many features?

2012-05-03 Thread Don Clugston
On 28/04/12 20:47, Walter Bright wrote: Andrei and I had a fun discussion last night about this question. The idea was which features in D are redundant and/or do not add significant value? A couple already agreed upon ones are typedef and the cfloat, cdouble and creal types. What's your list?

Re: Does D have too many features?

2012-05-03 Thread Don Clugston
On 01/05/12 00:33, Timon Gehr wrote: On 04/30/2012 11:28 PM, bearophile wrote: Walter: The first thing to emphasize is that NONE of this will happen for D2. The emphasis on D2 is fixing implementation and toolchain issues. Breaking existing code is off the table unless we are pretty much force

Re: How can D become adopted at my company?

2012-05-03 Thread Don Clugston
On 30/04/12 01:03, Manu wrote: On 30 April 2012 01:24, Tove mailto:t...@fransson.se>> wrote: On Sunday, 29 April 2012 at 22:13:22 UTC, Manu wrote: Is it technically possible to have a precise GC clean up all unreferenced memory in one big pass? yes, but unless

Re: Oddness with C binding

2012-05-02 Thread Don Clugston
On 03/05/12 06:28, James Miller wrote: I'm writing bindings to XCB right now, and its mostly going smoothly. However I have encountered a very strange problem. This bit of code segfaults with DMD: auto connection = xcb_connect(null, null); auto setup = xcb_get_setup(connection); auto iter = xc

Re: Does D have too many features?

2012-04-30 Thread Don Clugston
On 30/04/12 12:27, Manu wrote: On 30 April 2012 10:32, Don Clugston mailto:d...@nospam.com>> wrote: On 29/04/12 20:08, Manu wrote: On 29 April 2012 18:50, Don mailto:nos...@nospam.com> <mailto:nos...@nospam.com <mailto:nos...@nospam.com>>> wrote:

Re: Does D have too many features?

2012-04-30 Thread Don Clugston
On 30/04/12 05:45, H. S. Teoh wrote: On Sun, Apr 29, 2012 at 04:40:37PM +0200, Jacob Carlborg wrote: [...] * Do-while loops, how useful are those actually? I grepped through the DMD source once, looking for how often Walter uses do..while. The answer: exactly zero. OK, that got me all ril

Re: Does D have too many features?

2012-04-30 Thread Don Clugston
On 29/04/12 20:08, Manu wrote: On 29 April 2012 18:50, Don mailto:nos...@nospam.com>> wrote: On 28.04.2012 20:47, Walter Bright wrote: Andrei and I had a fun discussion last night about this question. The idea was which features in D are redundant and/or do not add

Re: How can D become adopted at my company?

2012-04-26 Thread Don Clugston
On 26/04/12 14:58, Joseph Rushton Wakeling wrote: On 26/04/12 11:07, Don Clugston wrote: "open source" is a horrible, duplicitous term. Really what you mean is "the license is not GPL compatible". No, I don't mean "GPL compatible". I'd be perfectly

Re: What to do about default function arguments

2012-04-26 Thread Don Clugston
On 26/04/12 12:11, Timon Gehr wrote: On 04/26/2012 11:46 AM, Don Clugston wrote: On 26/04/12 11:28, Timon Gehr wrote: On 04/26/2012 10:51 AM, Don Clugston wrote: On 26/04/12 05:44, Walter Bright wrote: A subtle but nasty problem - are default arguments part of the type, or part of the

Re: What to do about default function arguments

2012-04-26 Thread Don Clugston
On 26/04/12 11:21, Timon Gehr wrote: On 04/26/2012 09:54 AM, Walter Bright wrote: On 4/26/2012 12:47 AM, Timon Gehr wrote: On 04/26/2012 05:44 AM, Walter Bright wrote: A subtle but nasty problem - are default arguments part of the type, or part of the declaration? See http://d.puremagic.com/i

Re: What to do about default function arguments

2012-04-26 Thread Don Clugston
On 26/04/12 11:28, Timon Gehr wrote: On 04/26/2012 10:51 AM, Don Clugston wrote: On 26/04/12 05:44, Walter Bright wrote: A subtle but nasty problem - are default arguments part of the type, or part of the declaration? See http://d.puremagic.com/issues/show_bug.cgi?id=3866 Currently, they are

Re: How can D become adopted at my company?

2012-04-26 Thread Don Clugston
On 25/04/12 17:38, Joseph Rushton Wakeling wrote: On 25/04/12 16:58, Kagamin wrote: On Tuesday, 24 April 2012 at 14:05:14 UTC, bearophile wrote: Python was widely used before Google "support". And I think Haskell has enjoyed corporate support for a lot of time. And who's behind PHP? ... but

Re: What to do about default function arguments

2012-04-26 Thread Don Clugston
On 26/04/12 05:44, Walter Bright wrote: A subtle but nasty problem - are default arguments part of the type, or part of the declaration? See http://d.puremagic.com/issues/show_bug.cgi?id=3866 Currently, they are both, which leads to the nasty behavior in the bug report. The problem centers aro

Re: Can we kill the D calling convention already?

2012-04-25 Thread Don Clugston
On 25/04/12 17:05, Paulo Pinto wrote: On Wednesday, 25 April 2012 at 14:32:13 UTC, Alex Rønne Petersen wrote: On 25-04-2012 15:06, Kagamin wrote: On Tuesday, 24 April 2012 at 10:29:52 UTC, Alex Rønne Petersen wrote: The point is just that: Right now I can write assembly that will work on GDC,

Re: ^^ limitation

2012-04-25 Thread Don Clugston
On 24/04/12 23:00, Tyro[17] wrote: I believe the following two lines of code should produce the same output. Is there a specific reason why doesn't allow this? Of course the only way to store the result would be to put in into a BigInt variable or convert it to string but I don't that shouldn't p

Re: Closed development with Trello?

2012-04-20 Thread Don Clugston
On 20/04/12 11:11, simendsjo wrote: D has been following a very open development process. There are public newsgroups, mailinglists, wiki, bugzilla and github. But as I understand, much development discussions (and/or planning?) have been moved to Trello. It doesn't seem to be a way to join in as

Re: Why is complex being deprecated again?

2012-04-16 Thread Don Clugston
On 15/04/12 06:20, Andrei Alexandrescu wrote: On 4/14/12 10:10 PM, Mehrdad wrote: Why is complex being phased out? What happened to all this? http://dlang.org/cppcomplex.html I don't think that page makes a compelling argument, but I'm not an expert. If Walter and Don agree, I'd remove the pag

Re: What about x64 windows?

2012-04-12 Thread Don Clugston
On 11/04/12 14:45, Davita wrote: Hi guys. Is there a going development on x64 compiler for windows? Or D won't support x64 at all? Thanks It is a known blocker issue. Nothing has been announced, but it will definitely happen. It is surely far less work than adding 64-bit code generation to an

Re: An idea to improve eponymous templates

2012-04-12 Thread Don Clugston
On 12/04/12 04:21, Reid Levenick wrote: Firstly, I had no idea where suggestions should go, and I saw a few others here and thus here I am. I was writing some code that depended heavily on my own eponymous templates, and decided to change the names of some of them to make them more self-document

Re: Producing nicer template errors in D libraries

2012-04-11 Thread Don Clugston
On 10/04/12 21:45, H. S. Teoh wrote: A lot of template code (e.g. a big part of Phobos) use signature constraints, for example: void put(T,R)(R range, T data) if (isOutputRange!R) { ... } This is all nice and good, except that when the user accidentally calls .put on a non-range, you ge

Re: DMD compiler switch to set default extern() linkage?

2012-04-05 Thread Don Clugston
On 05/04/12 11:49, Alex Rønne Petersen wrote: Hi, It is no secret that DMD is the only compiler in existence that follows the "D" calling convention (and even then, only on some platforms, seemingly?). Both GDC and LDC use the C calling convention of the platform by default (and don't even have

Re: Poll of the week - How long have you been in the D world?

2012-04-04 Thread Don Clugston
On 04/04/12 21:06, simendsjo wrote: On Wed, 04 Apr 2012 20:27:45 +0200, Don Clugston wrote: On 31/03/12 00:29, H. S. Teoh wrote: On Fri, Mar 30, 2012 at 11:17:47PM +0100, Stewart Gordon wrote: On 26/03/2012 02:18, dnewbie wrote: Just out of curiosity, is D attracting new users? Are the old

Re: Poll of the week - How long have you been in the D world?

2012-04-04 Thread Don Clugston
On 31/03/12 00:29, H. S. Teoh wrote: On Fri, Mar 30, 2012 at 11:17:47PM +0100, Stewart Gordon wrote: On 26/03/2012 02:18, dnewbie wrote: Just out of curiosity, is D attracting new users? Are the old users running? Place your vote here http://www.easypolls.net/poll.html?p=4f6fb7e5e4b04f389e5eb66

Re: Nested functions should be exempt from sequential visibility rules

2012-04-04 Thread Don Clugston
On 03/04/12 07:38, Nick Sabalausky wrote: Regarding this: http://d.puremagic.com/issues/show_bug.cgi?id=790 I submit that nested functions should be exempt from the usual sequential visibility rules. (Therefore, mutually recursive nested functions would become possible.) Or at the very *least*

Re: Nested functions should be exempt from sequential visibility rules

2012-04-03 Thread Don Clugston
On 03/04/12 13:51, Nick Sabalausky wrote: "Don Clugston" wrote in message news:jlelnn$tm4$1...@digitalmars.com... I don't see a way to just declare it as "illegal". How would you detect that situation in the general case? It's not easy. Y b() { ... } Y y

Re: Nested functions should be exempt from sequential visibility rules

2012-04-03 Thread Don Clugston
On 03/04/12 13:58, Timon Gehr wrote: On 04/03/2012 01:55 PM, Don Clugston wrote: On 03/04/12 13:35, Timon Gehr wrote: On 04/03/2012 01:08 PM, Don Clugston wrote: Y b() { ... } Y y = b(); X x = ... Prove that y doesn't depend on x. Since only function declarations are immune to ord

Re: Nested functions should be exempt from sequential visibility rules

2012-04-03 Thread Don Clugston
On 03/04/12 13:35, Timon Gehr wrote: On 04/03/2012 01:08 PM, Don Clugston wrote: Y b() { ... } Y y = b(); X x = ... Prove that y doesn't depend on x. Since only function declarations are immune to ordering rules, b cannot forward reference x. But there could be another function a()

Re: Nested functions should be exempt from sequential visibility rules

2012-04-03 Thread Don Clugston
On 03/04/12 12:32, Timon Gehr wrote: On 04/03/2012 10:27 AM, Don Clugston wrote: On 03/04/12 07:38, Nick Sabalausky wrote: Regarding this: http://d.puremagic.com/issues/show_bug.cgi?id=790 I submit that nested functions should be exempt from the usual sequential visibility rules. (Therefore

Re: Nested functions should be exempt from sequential visibility rules

2012-04-03 Thread Don Clugston
On 03/04/12 11:24, Nick Sabalausky wrote: "Don Clugston" wrote in message news:jlecab$9gh$1...@digitalmars.com... If you have type inference of function returns, things can get nasty: void foo() { auto b() { return a(); } X x = whatever; auto a() { return x;

Re: Nested functions should be exempt from sequential visibility rules

2012-04-03 Thread Don Clugston
On 03/04/12 07:38, Nick Sabalausky wrote: Regarding this: http://d.puremagic.com/issues/show_bug.cgi?id=790 I submit that nested functions should be exempt from the usual sequential visibility rules. (Therefore, mutually recursive nested functions would become possible.) Or at the very *least*

Re: Wrong lowering for a[b][c]++

2012-03-22 Thread Don Clugston
On 22/03/12 18:43, Andrej Mitrovic wrote: On 3/22/12, H. S. Teoh wrote: Probably. I've been developing on 2.059 so I didn't realize there are incompatibilities with earlier versions. Your test files work ok. I'll test it on my own projects as soon as I get rid of a few compilation errors (all

Re: Proposal: user defined attributes

2012-03-22 Thread Don Clugston
On 20/03/12 22:29, Jacob Carlborg wrote: On 2012-03-20 17:13, Andrei Alexandrescu wrote: On 3/20/12 10:52 AM, Jacob Carlborg wrote: On 2012-03-20 16:17, Andrei Alexandrescu wrote: On 3/20/12 12:50 AM, Kapps wrote: Perhaps we should add a field of type Variant[string]. No, not Variant[stri

Re: Wrong lowering for a[b][c]++

2012-03-22 Thread Don Clugston
On 21/03/12 21:41, Alvaro wrote: El 21/03/2012 19:39, Jonathan M Davis escribió: On Wednesday, March 21, 2012 11:29:14 H. S. Teoh wrote: A question was asked on the d-learn forum about why this throws a RangeError: int[string][int] map; map["abc"][20]++; This is understandable, since the comp

Re: opEquals/opCmp returning other types

2012-03-22 Thread Don Clugston
On 21/03/12 21:53, Jacob Carlborg wrote: On 2012-03-21 17:44, H. S. Teoh wrote: The "D way" is to use strings for DSELs which get evaluated at compile-time, or a custom set of methods that you can build expressions out of. Operator overloading really should be limited to arithmetic types (for n

Re: Three Unlikely Successful Features of D

2012-03-21 Thread Don Clugston
On 21/03/12 03:47, Walter Bright wrote: On 3/20/2012 4:39 PM, H. S. Teoh wrote: On Tue, Mar 20, 2012 at 06:58:31PM -0400, Nick Sabalausky wrote: - Type inference Yeah I forgot about this one. Being able to write: auto veryLongNamedObject = new VeryLongNamedClass(veryLongArguments); is a big

Re: opEquals/opCmp returning other types

2012-03-21 Thread Don Clugston
On 19/03/12 01:54, Brian Palmer wrote: I'm working on a DSL for generating SQL queries, based loosely on Python's SQLAlchemy and Ruby's Sequel. One nice thing about the DSL is the compact syntax for specifying WHERE clauses. With some fiddling, I got it working for opEquals, a simplified example:

Re: CTFE bug causes null check to pass on null pointers (Issue 7602)

2012-03-21 Thread Don Clugston
On 21/03/12 11:22, Jens Mueller wrote: > David Nadlinger wrote: >> On Wednesday, 21 March 2012 at 09:51:43 UTC, Jens Mueller wrote: >>> Interesting. How do I make use of this? >>> >>> […] >>> >>> What's the trick to use memory allocated in a CTFE. Say e.g. I >>> want to >>> build a tree at compile

Re: CTFE bug causes null check to pass on null pointers (Issue 7602)

2012-03-19 Thread Don Clugston
On 19/03/12 06:43, H. S. Teoh wrote: While testing my AA implementation on existing AA-related bug, I came across this issue: http://d.puremagic.com/issues/show_bug.cgi?id=7602 Upon playing around a bit with the sample code given in the bug, I managed to find a code snippet that would c

Re: Interesting Memory Optimization

2012-03-17 Thread Don Clugston
On 16/03/12 13:24, Kevin Cox wrote: On Mar 16, 2012 7:45 AM, "Alex Rønne Petersen" mailto:xtzgzo...@gmail.com>> wrote > > I don't see any reason why c couldn't point to element number 3 of b, and have its length set to 3... > > -- > - Alex And the previous examples were language agnostic.

Re: Standalone AA implementation ready for review (Was: Re: Replacing AA's in druntime)

2012-03-15 Thread Don Clugston
On 15/03/12 00:16, H. S. Teoh wrote: On Tue, Mar 13, 2012 at 09:30:45PM -0500, Andrei Alexandrescu wrote: On 3/13/12 7:54 PM, H. S. Teoh wrote: Hi all, My AA implementation is slowly inching closer to being ready to replace aaA.d. Great! This will need compiler restructuring, and in fact off

Re: Turning a SIGSEGV into a regular function call under Linux, allowing throw

2012-03-14 Thread Don Clugston
On 14/03/12 21:59, Sean Kelly wrote: On Mar 14, 2012, at 1:54 PM, FeepingCreature wrote: I think that case is sufficiently rare that it'd have to count somewhere between "act of god" and "outright developer malice". The assumption that the stack frame is valid is, I'd say, safe to make in the

Re: Turning a SIGSEGV into a regular function call under Linux, allowing throw

2012-03-14 Thread Don Clugston
On 14/03/12 21:31, Steven Schveighoffer wrote: On Wed, 14 Mar 2012 16:08:29 -0400, Don Clugston wrote: Now, your user space handler will cause another segfault when it does the mov [ESP], 0. I think that gives you an infinite loop. SEGFAULT inside a SEGV signal handler aborts the program

Re: Turning a SIGSEGV into a regular function call under Linux, allowing throw

2012-03-14 Thread Don Clugston
On 13/03/12 11:09, FeepingCreature wrote: Note: I worked out this method for my own language, Neat, but the basic approach should be portable to D's exceptions as well. I've seen it argued a lot over the years (even argued it myself) that it's impossible to throw from Linux signal handlers. Th

Re: Replacing AA's in druntime

2012-03-14 Thread Don Clugston
On 14/03/12 03:39, Jakob Bornecrantz wrote: On Wednesday, 14 March 2012 at 00:52:32 UTC, H. S. Teoh wrote: Hi all, My AA implementation is slowly inching closer to being ready to replace aaA.d. So far I've been writing the implementation outside of object_.d for ease of testing & development; n

Re: toHash => pure, nothrow, const, @safe

2012-03-13 Thread Don Clugston
On 13/03/12 03:05, Walter Bright wrote: On 3/12/2012 6:15 PM, Stewart Gordon wrote: And what about toString? Good question. What do you suggest? Why can't we just kill that abomination?

<    1   2   3   >