Re: dmd front end now switched to Boost license

2014-06-14 Thread Nick Sabalausky via Digitalmars-d-announce
On 6/13/2014 8:15 PM, Mathias LANG wrote: On Friday, 13 June 2014 at 11:31:10 UTC, Dmitry Olshansky wrote: 13-Jun-2014 04:31, Walter Bright пишет: https://github.com/D-Programming-Language/dmd/pull/3655 Heh, I had been under the impression was already Boost. :P It's probably nice to have

Re: dmd front end now switched to Boost license

2014-06-14 Thread Joakim via Digitalmars-d-announce
On Saturday, 14 June 2014 at 06:07:08 UTC, Nick Sabalausky wrote: I doubt it. First, it's the backend that's not technically OSI, frontend was (apparently) GPL. Second, I can't imagine any Linux distro rejecting GPL - they'd have to boot the kernel and core utils, too. Actually, the frontend

Re: DMD 2.066 Alpha

2014-06-14 Thread David Nadlinger via Digitalmars-d-announce
On Thursday, 12 June 2014 at 18:25:36 UTC, Andrei Alexandrescu wrote: On 6/12/14, 6:34 AM, Dicebot wrote: It was decided and 100% certain - virtual is not going in. Need to remove it from DMD before this release is out. Yes please. -- Andrei Since we didn't seem to have a pull request for

Re: dmd front end now switched to Boost license

2014-06-14 Thread Dmitry Olshansky via Digitalmars-d-announce
14-Jun-2014 04:46, Walter Bright пишет: On 6/13/2014 4:31 AM, Dmitry Olshansky wrote: It's probably nice to have less restrictive license, but what we aim to achieve with that? I do not want to come across as rude but from pragmatic standpoint it's not interesting. I'm not opposing it

Re: DConf 2014 Day 1 Talk 4: Inside the Regular Expressions in D by Dmitry Olshansky

2014-06-14 Thread Dicebot via Digitalmars-d-announce
On Thursday, 12 June 2014 at 16:42:38 UTC, Dmitry Olshansky wrote: It's always nice to ask something on D NG, so many good answers I can hardly choose whom to reply ;) So this is kind of broadcast. Yes, the answer seems spot on - reflection! But allow me to retort. I'm not talking about

Re: DConf 2014 Day 1 Talk 4: Inside the Regular Expressions in D by Dmitry Olshansky

2014-06-14 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 6/14/14, 8:05 AM, Dicebot wrote: Adoption - yes. Production usage - less so (though still important). Difference between 1 second and 5 seconds is very important. Between 10 seconds and 1 minute - not so much. Wait, what? -- Andrei

Re: dmd front end now switched to Boost license

2014-06-14 Thread Leandro Lucarella via Digitalmars-d-announce
Nick Sabalausky, el 14 de June a las 02:06 me escribiste: It's probably nice to have less restrictive license, but what we aim to achieve with that? Make commercial companies contribute to DMD more freely? There is no problem even with GPL. Let them build and sell their own products out

Re: DConf 2014 Day 1 Talk 4: Inside the Regular Expressions in D by Dmitry Olshansky

2014-06-14 Thread Dicebot via Digitalmars-d-announce
On Saturday, 14 June 2014 at 15:25:11 UTC, Andrei Alexandrescu wrote: On 6/14/14, 8:05 AM, Dicebot wrote: Adoption - yes. Production usage - less so (though still important). Difference between 1 second and 5 seconds is very important. Between 10 seconds and 1 minute - not so much. Wait,

Re: DConf 2014 Day 1 Talk 4: Inside the Regular Expressions in D by Dmitry Olshansky

2014-06-14 Thread Dmitry Olshansky via Digitalmars-d-announce
14-Jun-2014 19:05, Dicebot пишет: On Thursday, 12 June 2014 at 16:42:38 UTC, Dmitry Olshansky wrote: [snip] Well, I'm biased by heavy-handed ones. Say I have a (no longer) secret plan of doing a next-gen parser generator in D. Needless to say swaths of non-trivial code generation. I'm all for

Re: dmd front end now switched to Boost license

2014-06-14 Thread Leandro Lucarella via Digitalmars-d-announce
Dmitry Olshansky, el 14 de June a las 18:18 me escribiste: 14-Jun-2014 04:46, Walter Bright пишет: On 6/13/2014 4:31 AM, Dmitry Olshansky wrote: It's probably nice to have less restrictive license, but what we aim to achieve with that? I do not want to come across as rude but from

Re: dmd front end now switched to Boost license

2014-06-14 Thread Dicebot via Digitalmars-d-announce
On Saturday, 14 June 2014 at 17:07:58 UTC, Leandro Lucarella wrote: OK, as a side effect of this, this might encourage companies not to use D but to develop tools based on DMDFE, but companies that are too lazy or to BAD not to contribute the changes back, which I'm not sure is such a good

Re: dmd front end now switched to Boost license

2014-06-14 Thread Nick Sabalausky via Digitalmars-d-announce
On 6/14/2014 3:58 AM, Joakim wrote: On Saturday, 14 June 2014 at 06:07:08 UTC, Nick Sabalausky wrote: I doubt it. First, it's the backend that's not technically OSI, frontend was (apparently) GPL. Second, I can't imagine any Linux distro rejecting GPL - they'd have to boot the kernel and core

Re: dmd front end now switched to Boost license

2014-06-14 Thread Nick Sabalausky via Digitalmars-d-announce
On 6/14/2014 10:18 AM, Dmitry Olshansky wrote: 14-Jun-2014 04:46, Walter Bright пишет: 3. Harmonization with usage of Boost in the runtime library In other words simplify licensing, but again compiler and runtime library do not have to have anything in common. There is no issue to begin

Re: dmd front end now switched to Boost license

2014-06-14 Thread Kapps via Digitalmars-d-announce
On Saturday, 14 June 2014 at 17:17:34 UTC, Dicebot wrote: On Saturday, 14 June 2014 at 17:07:58 UTC, Leandro Lucarella wrote: OK, as a side effect of this, this might encourage companies not to use D but to develop tools based on DMDFE, but companies that are too lazy or to BAD not to

Re: dmd front end now switched to Boost license

2014-06-14 Thread Walter Bright via Digitalmars-d-announce
On 6/14/2014 11:03 AM, Nick Sabalausky wrote: I'll take B, thanks. ;) Right on, Nick. And there's another advantage I neglected to mention - it allows DMDFE code to be moved into Phobos without issues.

Re: dmd front end now switched to Boost license

2014-06-14 Thread David Nadlinger via Digitalmars-d-announce
On Saturday, 14 June 2014 at 18:43:59 UTC, Walter Bright wrote: And there's another advantage I neglected to mention - it allows DMDFE code to be moved into Phobos without issues. I don't think Nick's argument is particularly compelling, but the DDMD - Phobos connection definitely makes the

Re: dmd front end now switched to Boost license

2014-06-14 Thread Iain Buclaw via Digitalmars-d-announce
On 14 June 2014 19:03, Nick Sabalausky via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: On 6/14/2014 10:18 AM, Dmitry Olshansky wrote: 14-Jun-2014 04:46, Walter Bright пишет: 3. Harmonization with usage of Boost in the runtime library In other words simplify

Re: dmd front end now switched to Boost license

2014-06-14 Thread Dmitry Olshansky via Digitalmars-d-announce
14-Jun-2014 22:03, Nick Sabalausky пишет: On 6/14/2014 10:18 AM, Dmitry Olshansky wrote: 14-Jun-2014 04:46, Walter Bright пишет: 3. Harmonization with usage of Boost in the runtime library In other words simplify licensing, but again compiler and runtime library do not have to have anything

Re: dmd front end now switched to Boost license

2014-06-14 Thread Walter Bright via Digitalmars-d-announce
On 6/14/2014 9:02 AM, Leandro Lucarella wrote: Not really, the standard library is included into user code (because of the templates), and that's the reason why it needs to be under a very permissive license. The compiler, on the other hand, doesn't, and one could agree is good to force people

Re: dmd front end now switched to Boost license

2014-06-14 Thread Nick Sabalausky via Digitalmars-d-announce
On 6/14/2014 2:47 PM, David Nadlinger wrote: On Saturday, 14 June 2014 at 18:43:59 UTC, Walter Bright wrote: And there's another advantage I neglected to mention - it allows DMDFE code to be moved into Phobos without issues. I don't think Nick's argument is particularly compelling, Granted,

Re: dmd front end now switched to Boost license

2014-06-14 Thread Joakim via Digitalmars-d-announce
On Saturday, 14 June 2014 at 17:07:58 UTC, Leandro Lucarella wrote: No free license restrict commercial use. What using boost enable is only proprietary use, i.e. changing the DMD FE and keeping the changes private, even if you distribute the binary with the compiled DMDFE. As I said before,

Re: DlangUI

2014-06-14 Thread Jim Hewes via Digitalmars-d-announce
Very nice, thanks. I'm looking forward to trying it out when I can find the time. I'm not a big fan of bindings/wrappers. Jim

Re: Dfix

2014-06-14 Thread Stefan Koch via Digitalmars-d-announce
As it happens I am writing a kind of DFIX on top of DScanner right at the moment. There are a few details to sort out. But I should have some small demo pretty soon. Regrards, Stefan

Re: dmd front end now switched to Boost license

2014-06-14 Thread Nick Sabalausky via Digitalmars-d-announce
On 6/14/2014 2:52 PM, Dmitry Olshansky wrote: 14-Jun-2014 22:03, Nick Sabalausky пишет: Scenario A: -- Them: What license does D use? Me: WAT? Language is not a product in itself. While that's technically true, people often think of them as complete products

Re: DMD 2.066 Alpha

2014-06-14 Thread Jonathan M Davis via Digitalmars-d-announce
On Fri, 13 Jun 2014 12:00:39 -0700 Andrei Alexandrescu via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: On 6/13/14, 10:15 AM, Nick Sabalausky wrote: On 6/13/2014 12:49 PM, Andrei Alexandrescu wrote: Being able to negate the final: label is nice to have but not a

Re: dmd front end now switched to Boost license

2014-06-14 Thread Leandro Lucarella via Digitalmars-d-announce
Kapps, el 14 de June a las 18:19 me escribiste: On Saturday, 14 June 2014 at 17:17:34 UTC, Dicebot wrote: On Saturday, 14 June 2014 at 17:07:58 UTC, Leandro Lucarella wrote: OK, as a side effect of this, this might encourage companies not to use D but to develop tools based on DMDFE, but

Re: dmd front end now switched to Boost license

2014-06-14 Thread Leandro Lucarella via Digitalmars-d-announce
David Nadlinger, el 14 de June a las 18:47 me escribiste: On Saturday, 14 June 2014 at 18:43:59 UTC, Walter Bright wrote: And there's another advantage I neglected to mention - it allows DMDFE code to be moved into Phobos without issues. I don't think Nick's argument is particularly

Re: dmd front end now switched to Boost license

2014-06-14 Thread Leandro Lucarella via Digitalmars-d-announce
Joakim, el 14 de June a las 19:31 me escribiste: On Saturday, 14 June 2014 at 17:07:58 UTC, Leandro Lucarella wrote: No free license restrict commercial use. What using boost enable is only proprietary use, i.e. changing the DMD FE and keeping the changes private, even if you distribute the

Re: DMD 2.066 Alpha

2014-06-14 Thread Nick Sabalausky via Digitalmars-d-announce
On 6/14/2014 5:49 PM, Jonathan M Davis via Digitalmars-d-announce wrote: and it becomes a question of whether the familiarity of using virtual instead of !final or final(false) (or whatever we come up with) is worth adding another keyword FWIW, I don't think virtual is all that valuable as a

Re: D Logos

2014-06-14 Thread K.K. via Digitalmars-d
These are cool. 1,5, and 6 I thought were the best. These are just drafts though, right? Maybe needs a little color or atleast a greyscale gradient going on. The main thing to change would be to make the hooks on each face of the cube have a stronger or more obvious 'D' shape though.

async/await in F#

2014-06-14 Thread bearophile via Digitalmars-d
In this post: http://forum.dlang.org/post/l62466$2n8p$1...@digitalmars.com Walter said, in November: I agree that async/await has to eventually be added to D. I'm not convinced it can or should be done with AST macros. But this blog post shows why the rigid features of C# are not always

Re: Null pointer dereferencing in D

2014-06-14 Thread Wanderer via Digitalmars-d
On Friday, 13 June 2014 at 21:13:20 UTC, bearophile wrote: This was surely discussed in past, but I don't remember the answer (so perhaps this is more fit in D.learn). Dereferencing the null pointer in C is undefined behaviour, so in most cases the program segfaults, but sometimes the

Re: UFCS overloaded property getters/setters

2014-06-14 Thread Jacob Carlborg via Digitalmars-d
On 2014-06-13 20:16, H. S. Teoh via Digitalmars-d wrote: I think this is starting to show itself as an anti-pattern, or at least, one of those obscure dark corners of D infested with complex interactions between unexpected features and possible compiler quirks. Probably the best thing to do is

Re: Null pointer dereferencing in D

2014-06-14 Thread via Digitalmars-d
On Saturday, 14 June 2014 at 00:40:06 UTC, Jonathan M Davis via Digitalmars-d wrote: On Sat, 14 Jun 2014 00:34:51 +0200 Timon Gehr via Digitalmars-d digitalmars-d@puremagic.com wrote: On 06/13/2014 11:45 PM, Jonathan M Davis via Digitalmars-d wrote: On Fri, 13 Jun 2014 21:23:00 +

Re: foreach

2014-06-14 Thread Jacob Carlborg via Digitalmars-d
On 2014-06-13 20:03, H. S. Teoh via Digitalmars-d wrote: On Fri, Jun 13, 2014 at 10:46:17AM -0700, Jonathan M Davis via Digitalmars-d wrote: [...] for(;;) is a special case with no real benefit IMHO. It's a loop whose condition is implicitly true rather than actually having a condition in it.

Re: foreach

2014-06-14 Thread via Digitalmars-d
On Friday, 13 June 2014 at 21:41:43 UTC, Jonathan M Davis via Digitalmars-d wrote: On Fri, 13 Jun 2014 11:03:14 -0700 H. S. Teoh via Digitalmars-d digitalmars-d@puremagic.com wrote: I disagree, it's not a special case. It's simply a logical consequence of each part of the for-loop being

Re: Strange issue on OSX

2014-06-14 Thread Jacob Carlborg via Digitalmars-d
On 2014-06-14 04:12, Jeremy DeHaan wrote: I agree. Also, this page (http://dlang.org/dmd-osx.html) says that the base requirement is a 32 bit OSX. Why is the DMD version that is released 64 bit? That seems very counter intuitive. Technically you can run 64bit applications on 32bit OS X if you

Re: Strange issue on OSX

2014-06-14 Thread via Digitalmars-d
On Saturday, 14 June 2014 at 10:38:08 UTC, Jacob Carlborg wrote: On 2014-06-14 04:12, Jeremy DeHaan wrote: I agree. Also, this page (http://dlang.org/dmd-osx.html) says that the base requirement is a 32 bit OSX. Why is the DMD version that is released 64 bit? That seems very counter

Re: Strange issue on OSX

2014-06-14 Thread David Nadlinger via Digitalmars-d
On Saturday, 14 June 2014 at 11:16:57 UTC, Marc Schütz wrote: On Saturday, 14 June 2014 at 10:38:08 UTC, Jacob Carlborg wrote: Technically you can run 64bit applications on 32bit OS X if you have a 64bit CPU. Really? The other way round, yes, but this would really surprise me... Yes.

Re: foreach

2014-06-14 Thread Nick Treleaven via Digitalmars-d
On 12/06/2014 18:30, Nick Treleaven wrote: On 12/06/2014 17:59, bearophile wrote: there is also this usage: foreach (i, _; range){...} I think this is a very uncommon usage. I think I have not used it so far. Perhaps with something other than a range then. There are some uses in Phobos:

Re: Null pointer dereferencing in D

2014-06-14 Thread Dicebot via Digitalmars-d
On Saturday, 14 June 2014 at 10:15:49 UTC, Marc Schütz wrote: Huh? Types with `@disable this()` still have an `init` value. All it does is disallow instantiating the type without specifying an initializer (e.g. a struct literal, a value returned from a factory function, or `static opCall()`).

Re: foreach

2014-06-14 Thread Timon Gehr via Digitalmars-d
On 06/13/2014 11:41 PM, Jonathan M Davis via Digitalmars-d wrote: It's a special case in that the middle portion is supposed to be the condition that the loop use to determine whether it can continue, and omitting it means that it has to add the true itself, No, omitting it means that it does

Re: Null pointer dereferencing in D

2014-06-14 Thread Timon Gehr via Digitalmars-d
On 06/14/2014 02:39 AM, Jonathan M Davis via Digitalmars-d wrote: On Sat, 14 Jun 2014 00:34:51 +0200 Timon Gehr via Digitalmars-d digitalmars-d@puremagic.com wrote: On 06/13/2014 11:45 PM, Jonathan M Davis via Digitalmars-d wrote: On Fri, 13 Jun 2014 21:23:00 + deadalnix via Digitalmars-d

Re: Null pointer dereferencing in D

2014-06-14 Thread Maxim Fomin via Digitalmars-d
On Saturday, 14 June 2014 at 12:33:28 UTC, Dicebot wrote: On Saturday, 14 June 2014 at 10:15:49 UTC, Marc Schütz wrote: Huh? Types with `@disable this()` still have an `init` value. All it does is disallow instantiating the type without specifying an initializer (e.g. a struct literal, a value

Re: Null pointer dereferencing in D

2014-06-14 Thread Dicebot via Digitalmars-d
On Saturday, 14 June 2014 at 13:38:40 UTC, Maxim Fomin wrote: Which is effectively a type system hole with @disable this : struct A { @disable this(); } auto a = A.init; Why this is a type hole if initializer is explicitly provided? The idea of disabled this() is to prevent default

Re: Null pointer dereferencing in D

2014-06-14 Thread Andrei Alexandrescu via Digitalmars-d
On 6/14/14, 5:33 AM, Dicebot wrote: On Saturday, 14 June 2014 at 10:15:49 UTC, Marc Schütz wrote: Huh? Types with `@disable this()` still have an `init` value. All it does is disallow instantiating the type without specifying an initializer (e.g. a struct literal, a value returned from a

Re: foreach

2014-06-14 Thread bearophile via Digitalmars-d
Timon Gehr: Have you ever used void[0][T]? I have never used that so far. What is it useful for? Bye, bearophile

Re: Null pointer dereferencing in D

2014-06-14 Thread John Colvin via Digitalmars-d
On Saturday, 14 June 2014 at 15:22:07 UTC, Andrei Alexandrescu wrote: On 6/14/14, 5:33 AM, Dicebot wrote: On Saturday, 14 June 2014 at 10:15:49 UTC, Marc Schütz wrote: Huh? Types with `@disable this()` still have an `init` value. All it does is disallow instantiating the type without

Re: Null pointer dereferencing in D

2014-06-14 Thread John Colvin via Digitalmars-d
On Saturday, 14 June 2014 at 14:51:10 UTC, Dicebot wrote: On Saturday, 14 June 2014 at 13:38:40 UTC, Maxim Fomin wrote: Which is effectively a type system hole with @disable this : struct A { @disable this(); } auto a = A.init; Why this is a type hole if initializer is explicitly provided?

Re: foreach

2014-06-14 Thread bearophile via Digitalmars-d
The idea of using code like this (only one or the other should be allowed) is rather natural, it breaks nothing, it avoids the programmer to introduce a variable that is not needed, making the code less noisy: foreach (;0 .. 10) {...} foreach (0 .. 10) {...} I don't see the need for so many

Re: foreach

2014-06-14 Thread Timon Gehr via Digitalmars-d
On 06/14/2014 05:33 PM, bearophile wrote: Timon Gehr: Have you ever used void[0][T]? I have never used that so far. What is it useful for? Bye, bearophile It's a hash set with a somewhat awkward interface.

Re: Concurrent GC (for Windows)

2014-06-14 Thread Rainer Schuetze via Digitalmars-d
On 13.06.2014 12:08, Dmitry Olshansky wrote: 13-Jun-2014 12:22, Rainer Schuetze пишет: If I add the actual copy into heap2 (i.e. every fourth page of 512 MB is copied), I get 80-90 ms more. Aye... this is a lot. Also for me it turns out that unmapping CoW view at the last step takes the

Re: Null pointer dereferencing in D

2014-06-14 Thread monarch_dodra via Digitalmars-d
On Saturday, 14 June 2014 at 15:22:07 UTC, Andrei Alexandrescu wrote: On 6/14/14, 5:33 AM, Dicebot wrote: On Saturday, 14 June 2014 at 10:15:49 UTC, Marc Schütz wrote: Huh? Types with `@disable this()` still have an `init` value. All it does is disallow instantiating the type without

Re: Null pointer dereferencing in D

2014-06-14 Thread Maxim Fomin via Digitalmars-d
On Saturday, 14 June 2014 at 14:51:10 UTC, Dicebot wrote: On Saturday, 14 June 2014 at 13:38:40 UTC, Maxim Fomin wrote: Which is effectively a type system hole with @disable this : struct A { @disable this(); } auto a = A.init; Why this is a type hole if initializer is explicitly provided?

Re: Null pointer dereferencing in D

2014-06-14 Thread Maxim Fomin via Digitalmars-d
On Saturday, 14 June 2014 at 15:41:10 UTC, John Colvin wrote: On Saturday, 14 June 2014 at 14:51:10 UTC, Dicebot wrote: On Saturday, 14 June 2014 at 13:38:40 UTC, Maxim Fomin wrote: Which is effectively a type system hole with @disable this : struct A { @disable this(); } auto a = A.init;

Re: Null pointer dereferencing in D

2014-06-14 Thread David Nadlinger via Digitalmars-d
On Saturday, 14 June 2014 at 16:45:19 UTC, Maxim Fomin wrote: The case which you described is a not a type safety problem. If a struct type has a non-trivial invariant(), .init allows an object to exist that violates it without an Error being thrown. Arguing that this is not part of the

Implementing abstract methods should not require the override attribute, IMO

2014-06-14 Thread via Digitalmars-d
Suppose you are sketching out your application, and you decide that you need two classes, A and B. You know that instances of both classes will be asked to foo things up, so you tell the type checker that both A and B are foo-uppers: interface Foo { void foo(); }

Re: Null pointer dereferencing in D

2014-06-14 Thread Dicebot via Digitalmars-d
On Saturday, 14 June 2014 at 16:41:46 UTC, monarch_dodra wrote: .init should simply mean the default bit state of the object. Let's not make it into anything more complicated than that. I guess this is the root of disagreement. There is no place in documentation that says that T.init is in

Re: Null pointer dereferencing in D

2014-06-14 Thread Maxim Fomin via Digitalmars-d
On Saturday, 14 June 2014 at 17:05:21 UTC, David Nadlinger wrote: On Saturday, 14 June 2014 at 16:45:19 UTC, Maxim Fomin wrote: The case which you described is a not a type safety problem. If a struct type has a non-trivial invariant(), .init allows an object to exist that violates it

Re: Null pointer dereferencing in D

2014-06-14 Thread Maxim Fomin via Digitalmars-d
On Saturday, 14 June 2014 at 17:05:21 UTC, David Nadlinger wrote: On Saturday, 14 June 2014 at 16:45:19 UTC, Maxim Fomin wrote: The case which you described is a not a type safety problem. If a struct type has a non-trivial invariant(), .init allows an object to exist that violates it

Re: Concurrent GC (for Windows)

2014-06-14 Thread Dmitry Olshansky via Digitalmars-d
14-Jun-2014 20:34, Rainer Schuetze пишет: On 13.06.2014 12:08, Dmitry Olshansky wrote: 13-Jun-2014 12:22, Rainer Schuetze пишет: If I add the actual copy into heap2 (i.e. every fourth page of 512 MB is copied), I get 80-90 ms more. Aye... this is a lot. Also for me it turns out that

Re: Null pointer dereferencing in D

2014-06-14 Thread monarch_dodra via Digitalmars-d
On Saturday, 14 June 2014 at 17:15:16 UTC, Dicebot wrote: On Saturday, 14 June 2014 at 16:41:46 UTC, monarch_dodra wrote: .init should simply mean the default bit state of the object. Let's not make it into anything more complicated than that. I guess this is the root of disagreement. There

write(f)ln style exception factory

2014-06-14 Thread Dmitry Olshansky via Digitalmars-d
Recalling the previous discussion of throwing exception being costly, I thought the idiom of pay as you go is worth incorporating into the standard library. In brief: throw exception(CPU temperature is below, 2.5, K); vs throw new Exception(text(CPU temperature is below, 2.5, K)); or:

Re: async/await in F#

2014-06-14 Thread Mason McGill via Digitalmars-d
Good tutorial choices; they're very well-written. I haven't used F# much, but here's my take (call me out on any mistakes in my understanding): `async` being just a particular instance of a class of user/library-defined computation expression has a lot of good things going for it. This setup

Re: DGui newsgroup in Dlang

2014-06-14 Thread Xavier Bigand via Digitalmars-d
Le 12/06/2014 23:12, John a écrit : On Thursday, 12 June 2014 at 19:38:06 UTC, André wrote: Hi, Is it possible to add a newsgroup for DGui on this forum? It would be great to have a communication platform and also advertising this really great Windows ui toolkit. With an easy to use and

Re: DGui newsgroup in Dlang

2014-06-14 Thread Xavier Bigand via Digitalmars-d
Le 14/06/2014 22:18, Xavier Bigand a écrit : Le 12/06/2014 23:12, John a écrit : On Thursday, 12 June 2014 at 19:38:06 UTC, André wrote: Hi, Is it possible to add a newsgroup for DGui on this forum? It would be great to have a communication platform and also advertising this really great

Re: Null pointer dereferencing in D

2014-06-14 Thread Andrei Alexandrescu via Digitalmars-d
On 6/14/14, 10:05 AM, David Nadlinger wrote: On Saturday, 14 June 2014 at 16:45:19 UTC, Maxim Fomin wrote: The case which you described is a not a type safety problem. If a struct type has a non-trivial invariant(), .init allows an object to exist that violates it without an Error being

Re: foreach

2014-06-14 Thread Jonathan M Davis via Digitalmars-d
On Sat, 14 Jun 2014 10:20:51 + via Digitalmars-d digitalmars-d@puremagic.com wrote: On Friday, 13 June 2014 at 21:41:43 UTC, Jonathan M Davis via Digitalmars-d wrote: On Fri, 13 Jun 2014 11:03:14 -0700 H. S. Teoh via Digitalmars-d digitalmars-d@puremagic.com wrote: I disagree, it's

Re: foreach

2014-06-14 Thread Timon Gehr via Digitalmars-d
On 06/14/2014 11:23 PM, Jonathan M Davis via Digitalmars-d wrote: ... It's the lack of a condition that I object to. IMHO it's a fundamental violation of how loops work. Fundamentally, loops loop. That is the only fundamental thing about loops.

Re: foreach

2014-06-14 Thread H. S. Teoh via Digitalmars-d
On Sat, Jun 14, 2014 at 02:23:36PM -0700, Jonathan M Davis via Digitalmars-d wrote: On Sat, 14 Jun 2014 10:20:51 + via Digitalmars-d digitalmars-d@puremagic.com wrote: [...] But this special treatment of the second operand is the same in all forms of the for loop: for(int i =

Re: write(f)ln style exception factory

2014-06-14 Thread Element 126 via Digitalmars-d
On 06/14/2014 09:04 PM, Dmitry Olshansky wrote: Recalling the previous discussion of throwing exception being costly, I thought the idiom of pay as you go is worth incorporating into the standard library. In brief: throw exception(CPU temperature is below, 2.5, K); vs throw new

UTF bug+proposed fix, please check

2014-06-14 Thread Timothee Cour via Digitalmars-d
I filed a bug report: https://issues.dlang.org/show_bug.cgi?id=12923 : UTF exception in stride even though passes validate and then a proposed fix. The fix still passes unittests and also solves the bug, however I'm not sure whether it is correct: is the behavior of strideImpl correct or is the

Re: Null pointer dereferencing in D

2014-06-14 Thread deadalnix via Digitalmars-d
On Saturday, 14 June 2014 at 16:41:46 UTC, monarch_dodra wrote: By that rational, so is void. If you want default initial state, you just use A(). Using A.init is just the same as using void: It's fuck you compiler I'm know what I'm doing. Someone is trying to mess up with Andrei slice

Re: async/await in F#

2014-06-14 Thread Idan Arye via Digitalmars-d
On Saturday, 14 June 2014 at 07:53:17 UTC, bearophile wrote: In this post: http://forum.dlang.org/post/l62466$2n8p$1...@digitalmars.com Walter said, in November: I agree that async/await has to eventually be added to D. I'm not convinced it can or should be done with AST macros. But this

Re: foreach

2014-06-14 Thread Nick Sabalausky via Digitalmars-d
On 6/14/2014 9:15 AM, Timon Gehr wrote: On 06/13/2014 11:41 PM, Jonathan M Davis via Digitalmars-d wrote: It's a special case in that the middle portion is supposed to be the condition that the loop use to determine whether it can continue, and omitting it means that it has to add the true

Re: async/await in F#

2014-06-14 Thread Rikki Cattermole via Digitalmars-d
On 14/06/2014 7:53 p.m., bearophile wrote: In this post: http://forum.dlang.org/post/l62466$2n8p$1...@digitalmars.com Walter said, in November: I agree that async/await has to eventually be added to D. I'm not convinced it can or should be done with AST macros. But this blog post shows why

Re: Tail pad optimization, cache friendlyness and C++ interrop

2014-06-14 Thread Sean Cavanaugh via Digitalmars-d
On 6/11/2014 8:56 AM, Remo wrote: This is pretty strange behavior. At least on Windows I can not confirm this. Visual Studio 2013, Intel Compiler and Clang for windows have the same consistent behavior here. private do NOT affect struct size. But there is a parameter in Visual Studio that

Re: Universal Construction Syntax for Pointers?

2014-06-14 Thread Ali Çehreli via Digitalmars-d-learn
On 06/13/2014 10:29 PM, Meta wrote: I thought this was possible, but DMD 2.065 doesn't allow it, saying no constructor for int: int* p = new int(3); Is something like this planned for the future? I know we can already do: int n = int(3); Those both compile with 2.066 Ali

Re: Universal Construction Syntax for Pointers?

2014-06-14 Thread Meta via Digitalmars-d-learn
On Saturday, 14 June 2014 at 06:39:56 UTC, Ali Çehreli wrote: On 06/13/2014 10:29 PM, Meta wrote: I thought this was possible, but DMD 2.065 doesn't allow it, saying no constructor for int: int* p = new int(3); Is something like this planned for the future? I know we can already do: int n

Re: Universal Construction Syntax for Pointers?

2014-06-14 Thread Philippe Sigaud via Digitalmars-d-learn
Would auto i = (int*)(3); make sense? Does it work?

Re: Does __gshared have shared semantics?

2014-06-14 Thread Jonathan M Davis via Digitalmars-d-learn
On Sat, 14 Jun 2014 01:24:03 + Mike Franklin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: In other words, is 'shared __gshared' redundant? Redundant? Not exactly. __gshared makes it so that the variable is treated like a C variable - it's not in TLS - but its _type_ is

Re: Universal Construction Syntax for Pointers?

2014-06-14 Thread via Digitalmars-d-learn
On Saturday, 14 June 2014 at 08:09:12 UTC, Philippe Sigaud via Digitalmars-d-learn wrote: Would auto i = (int*)(3); make sense? Does it work? No: Error: C style cast illegal, use cast(int*)3 And I don't think it should, because the heap allocation that you're probably expecting should be

Re: Why is stdin.byLine.writeln so slow?

2014-06-14 Thread via Digitalmars-d-learn
On Friday, 13 June 2014 at 22:12:01 UTC, Ali Çehreli wrote: On 06/13/2014 03:02 PM, monarch_dodra wrote: No, it just receives a range, so it does range formating. eg: [ ~ Element ~ , ~ Element ... ]. It still looks like it could send the formatting characters as well as the elements

Re: DMD Fails with fPIC error

2014-06-14 Thread Mike Wey via Digitalmars-d-learn
On 06/14/2014 03:58 AM, Reuben wrote: Hi, I'm new to D and am trying to compile a simple hello world program. I get the following error when compiling it: dmd test.d /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld:

Re: Casts and @trusted

2014-06-14 Thread Anonymous via Digitalmars-d-learn
That really is it. The other methods are just other gets to the buffer, like this: T[] get_dup(TS strat=TS.cyclic)(size_t n) const { static if (strat==TS.once) size_t numreads = fixNToFill(n); else size_t numreads = n; auto ret = new T[](numreads);

Subclass of Exception

2014-06-14 Thread Paul via Digitalmars-d-learn
One stupid question: in Python subclassing of Exception looks like: class MyError(Exception): pass but in D, if I'm right, we should write more code: class MyError : Exception { this(string msg) { super(msg); } } (without constructor we get error: ...Cannot implicitly generate a

Re: DMD Fails with fPIC error

2014-06-14 Thread Reuben via Digitalmars-d-learn
On Saturday, 14 June 2014 at 10:45:25 UTC, Mike Wey wrote: On 06/14/2014 03:58 AM, Reuben wrote: Hi, I'm new to D and am trying to compile a simple hello world program. I get the following error when compiling it: dmd test.d

Re: Universal Construction Syntax for Pointers?

2014-06-14 Thread Philippe Sigaud via Digitalmars-d-learn
And I don't think it should, because the heap allocation that you're probably expecting should be explicit IMO. For me it's also unintuitive, because I would read it as constructing a pointer that points to the address 3. I agree. I'm trying to get a feel on the limits of this new

Re: Subclass of Exception

2014-06-14 Thread bearophile via Digitalmars-d-learn
Paul: class MyError : Exception { this(string msg) { super(msg); } } Don't call exceptions errors, because in D there are also errors, so they should have distinct names. Is any shorter D way? Perhaps not. Bye, bearophile

Re: Subclass of Exception

2014-06-14 Thread FreeSlave via Digitalmars-d-learn
On Saturday, 14 June 2014 at 11:59:53 UTC, Paul wrote: One stupid question: in Python subclassing of Exception looks like: class MyError(Exception): pass but in D, if I'm right, we should write more code: class MyError : Exception { this(string msg) { super(msg); } } (without

Re: Subclass of Exception

2014-06-14 Thread Paul via Digitalmars-d-learn
On Saturday, 14 June 2014 at 12:17:46 UTC, FreeSlave wrote: On Saturday, 14 June 2014 at 11:59:53 UTC, Paul wrote: One stupid question: in Python subclassing of Exception looks like: class MyError(Exception): pass but in D, if I'm right, we should write more code: class MyError : Exception {

Re: DMD Fails with fPIC error

2014-06-14 Thread Mike Wey via Digitalmars-d-learn
On 06/14/2014 02:01 PM, Reuben wrote: On Saturday, 14 June 2014 at 10:45:25 UTC, Mike Wey wrote: On 06/14/2014 03:58 AM, Reuben wrote: Depending on the desired behavior you'll need to remove the -shared flag from the configuration or add -defaultlib=:libphobos2.so dmd.conf contains the

Re: Returning dynamic array from the function

2014-06-14 Thread Marco Cosentino via Digitalmars-d-learn
Hi, I'm new to D and stumbled upon this very interesting discussion. My question now is: can you provide an example of how to return a collection of homogeneous elements whose size is not known at compile time (for wich you would normally use a dynamic array) from a function? Thanks, Marco

Is it normal that unittests of phobos are executed with my project build?

2014-06-14 Thread Xavier Bigand via Digitalmars-d-learn
I get a failure on a test in format.d when I build my own project with unittest. I though importing phobos header would not regenerate their unittest modules. Any idea of what can cause this issue? I already have reinstalled dmd with visualD completely.

Re: DMD Fails with fPIC error

2014-06-14 Thread Reuben via Digitalmars-d-learn
On Saturday, 14 June 2014 at 13:05:52 UTC, Mike Wey wrote: On 06/14/2014 02:01 PM, Reuben wrote: On Saturday, 14 June 2014 at 10:45:25 UTC, Mike Wey wrote: On 06/14/2014 03:58 AM, Reuben wrote: Depending on the desired behavior you'll need to remove the -shared flag from the configuration

Re: Returning dynamic array from the function

2014-06-14 Thread via Digitalmars-d-learn
On Saturday, 14 June 2014 at 14:02:52 UTC, Marco Cosentino wrote: Hi, I'm new to D and stumbled upon this very interesting discussion. My question now is: can you provide an example of how to return a collection of homogeneous elements whose size is not known at compile time (for wich you

Re: hijacking override from template mixin

2014-06-14 Thread sigod via Digitalmars-d-learn
On Monday, 9 June 2014 at 15:54:21 UTC, Ivan Kazmenko wrote: I'd expect a multiple overrides of same function error, much like if I just paste the mixin code by hand. Is that a bug or working by design? In the latter case, please explain the reasoning. http://dlang.org/template-mixin.html

Re: Returning dynamic array from the function

2014-06-14 Thread Marco Cosentino via Digitalmars-d-learn
int[] data = [1,2,3,4];// create new array on the heap Thanks for the answer. This is the bit of information I was missing: how to create an array in the heap. Is also this a valid way to do so? int[] data = new int[0]; data ~= [4,2,3,1];

Re: Returning dynamic array from the function

2014-06-14 Thread monarch_dodra via Digitalmars-d-learn
On Saturday, 14 June 2014 at 21:37:51 UTC, Marco Cosentino wrote: int[] data = [1,2,3,4];// create new array on the heap Thanks for the answer. This is the bit of information I was missing: how to create an array in the heap. Is also this a valid way to do so? int[] data = new

Re: Subclass of Exception

2014-06-14 Thread Jonathan M Davis via Digitalmars-d-learn
On Sat, 14 Jun 2014 11:59:52 + Paul via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: One stupid question: in Python subclassing of Exception looks like: class MyError(Exception): pass but in D, if I'm right, we should write more code: class MyError : Exception {

  1   2   >