Re: build dll project use VisualD with the "Use MS-COFF object file..." setting selected failed

2016-08-25 Thread magicdmer via Digitalmars-d-learn
On Friday, 26 August 2016 at 06:38:01 UTC, Daniel Kozak wrote: That image is too small, so I can't see it :) Dne 26.8.2016 v 08:26 magicdmer via Digitalmars-d-learn napsal(a): I use VisualD create a windows dll project , and select the "Use MS-COFF object file fromat for win32" . when i build

Re: build dll project use VisualD with the "Use MS-COFF object file..." setting selected failed

2016-08-25 Thread Daniel Kozak via Digitalmars-d-learn
That image is too small, so I can't see it :) Dne 26.8.2016 v 08:26 magicdmer via Digitalmars-d-learn napsal(a): I use VisualD create a windows dll project , and select the "Use MS-COFF object file fromat for win32" . when i build it ,it display the error follow ,look at the picture I use dmd

build dll project use VisualD with the "Use MS-COFF object file..." setting selected failed

2016-08-25 Thread magicdmer via Digitalmars-d-learn
I use VisualD create a windows dll project , and select the "Use MS-COFF object file fromat for win32" . when i build it ,it display the error follow ,look at the picture I use dmd 2.071.1 https://s14.postimg.org/a4wcv74ct/image.png

Re: std.functional.compose compilation error

2016-08-25 Thread Antonio Corbi via Digitalmars-d-learn
On Thursday, 25 August 2016 at 14:30:00 UTC, Meta wrote: On Thursday, 25 August 2016 at 14:06:32 UTC, Antonio Corbi wrote: Hello, Trying to compile this example from Chuck Allison: --- import std.stdio; import std.functional; void main() { auto div3

Re: Judy Arrays

2016-08-25 Thread Illuminati via Digitalmars-d-learn
On Thursday, 25 August 2016 at 20:42:42 UTC, Illuminati wrote: http://judy.sourceforge.net/downloads/10minutes.htm Would be nice to have such an implementation. Supposedly one of the best all around data structures in existence? Maybe D could be used to make them work with arbitrary cache-size

Judy Arrays

2016-08-25 Thread Illuminati via Digitalmars-d-learn
http://judy.sourceforge.net/downloads/10minutes.htm Would be nice to have such an implementation. Supposedly one of the best all around data structures in existence? Maybe D could be used to make them work with arbitrary cache-sizes? Anyone up for the challenge?

Re: Nogc Associative Array?

2016-08-25 Thread Illuminati via Digitalmars-d-learn
On Thursday, 25 August 2016 at 20:11:32 UTC, Laeeth Isharc wrote: On Thursday, 25 August 2016 at 18:14:42 UTC, Illuminati wrote: Does D have a non-gc based associative array? If not, what would be a good way to go about creating one? See EMSI containers in code.dlang.org Thanks.

Re: union mutability

2016-08-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, August 25, 2016 19:43:49 Jack Applegame via Digitalmars-d-learn wrote: > Also I hate Rebindable. Yeah, well, without a language change, it's the best that we have for dealing with the problem that it's designed to solve. D just isn't designed with the idea that there's any distinctio

Re: Nogc Associative Array?

2016-08-25 Thread Laeeth Isharc via Digitalmars-d-learn
On Thursday, 25 August 2016 at 18:14:42 UTC, Illuminati wrote: Does D have a non-gc based associative array? If not, what would be a good way to go about creating one? See EMSI containers in code.dlang.org

Re: union mutability

2016-08-25 Thread Jack Applegame via Digitalmars-d-learn
On Thursday, 25 August 2016 at 19:19:49 UTC, Jonathan M Davis wrote: Why? I don't know exactly what that PR is supposed to do, but std.datetime uses immutable time zone objects, and if that PR made it so that you couldn't have an immutable instance of a class, then it would have failed the auto

Re: union mutability

2016-08-25 Thread Jack Applegame via Digitalmars-d-learn
Also I hate Rebindable.

Re: union mutability

2016-08-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, August 25, 2016 18:27:25 Jack Applegame via Digitalmars-d-learn wrote: > On Thursday, 25 August 2016 at 17:01:40 UTC, Meta wrote: > > This should be fixed pretty soon: > > https://github.com/dlang/dmd/pull/5940 > > Bye-bye immutable classes. :'( Why? I don't know exactly what that PR

Re: union mutability

2016-08-25 Thread Jack Applegame via Digitalmars-d-learn
On Thursday, 25 August 2016 at 17:01:40 UTC, Meta wrote: This should be fixed pretty soon: https://github.com/dlang/dmd/pull/5940 Bye-bye immutable classes. :'(

Re: nested enum

2016-08-25 Thread Illuminati via Digitalmars-d-learn
On Thursday, 25 August 2016 at 01:37:05 UTC, Mike Parker wrote: On Wednesday, 24 August 2016 at 23:04:25 UTC, Illuminati wrote: How can I create nested enum like structures? instead of Enum.X_Y I would like to access like Enum.X.Y Yet I want it to behave exactly as an enum. I just want to no

Re: std.functional.compose compilation error

2016-08-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, August 25, 2016 17:50:44 bachmeier via Digitalmars-d-learn wrote: > On Thursday, 25 August 2016 at 17:49:26 UTC, bachmeier wrote: > > On Thursday, 25 August 2016 at 15:04:43 UTC, Jonathan M Davis > > > > wrote: > >> Yes. Because the module is compose, within that file, compose > >> wil

Nogc Associative Array?

2016-08-25 Thread Illuminati via Digitalmars-d-learn
Does D have a non-gc based associative array? If not, what would be a good way to go about creating one?

Re: std.functional.compose compilation error

2016-08-25 Thread bachmeier via Digitalmars-d-learn
On Thursday, 25 August 2016 at 17:49:26 UTC, bachmeier wrote: On Thursday, 25 August 2016 at 15:04:43 UTC, Jonathan M Davis wrote: Yes. Because the module is compose, within that file, compose will refer to the module, not anything you import. The selective import essentially creates a local

Re: std.functional.compose compilation error

2016-08-25 Thread bachmeier via Digitalmars-d-learn
On Thursday, 25 August 2016 at 15:04:43 UTC, Jonathan M Davis wrote: Yes. Because the module is compose, within that file, compose will refer to the module, not anything you import. The selective import essentially creates a local alias like alias compose = std.functional.compose; as part o

Re: union mutability

2016-08-25 Thread Meta via Digitalmars-d-learn
On Thursday, 25 August 2016 at 15:22:23 UTC, Jack Applegame wrote: Code: union A { immutable int f; } union B { immutable int f; int e; } void main() { A a = A(1); //a = A(2); // a.f is immutable, fails to compile as expected B b = B(1); b = B(2); // comp

Re: union mutability

2016-08-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, August 25, 2016 15:22:23 Jack Applegame via Digitalmars-d-learn wrote: > Code: > > union A { > immutable int f; > } > > union B { > immutable int f; > int e; > } > > void main() { > A a = A(1); > //a = A(2); // a.f is immutable, fails to compile as expected >

Re: nested enum

2016-08-25 Thread Seb via Digitalmars-d-learn
On Thursday, 25 August 2016 at 11:09:43 UTC, Cauterite wrote: On Thursday, 25 August 2016 at 10:36:21 UTC, Daniel Kozak wrote: Btw, tehre is no need for extra semicolon (`;`) after enum and struct definition Thanks. This forum insists on reminding me every time I write code here. Warning ab

union mutability

2016-08-25 Thread Jack Applegame via Digitalmars-d-learn
Code: union A { immutable int f; } union B { immutable int f; int e; } void main() { A a = A(1); //a = A(2); // a.f is immutable, fails to compile as expected B b = B(1); b = B(2); // compiles!!! } It turns out that if the union contains at least one mutabl

Re: std.functional.compose compilation error

2016-08-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, August 25, 2016 14:30:00 Meta via Digitalmars-d-learn wrote: > On Thursday, 25 August 2016 at 14:06:32 UTC, Antonio Corbi wrote: > > Hello, > > > > Trying to compile this example from Chuck Allison: > > --- > > import std.stdio; > > import std.fu

Re: std.functional.compose compilation error

2016-08-25 Thread Meta via Digitalmars-d-learn
On Thursday, 25 August 2016 at 14:06:32 UTC, Antonio Corbi wrote: Hello, Trying to compile this example from Chuck Allison: --- import std.stdio; import std.functional; void main() { auto div3 = (double x) => x/3.0; auto sq = (double x) => x*x;

std.functional.compose compilation error

2016-08-25 Thread Antonio Corbi via Digitalmars-d-learn
Hello, Trying to compile this example from Chuck Allison: --- import std.stdio; import std.functional; void main() { auto div3 = (double x) => x/3.0; auto sq = (double x) => x*x; auto pls1 = (double x) => x+1.0; alias compose!(div3,sq,pls1)

Re: nested enum

2016-08-25 Thread Cauterite via Digitalmars-d-learn
On Thursday, 25 August 2016 at 10:36:21 UTC, Daniel Kozak wrote: Btw, tehre is no need for extra semicolon (`;`) after enum and struct definition Thanks. This forum insists on reminding me every time I write code here.

Re: nested enum

2016-08-25 Thread Daniel Kozak via Digitalmars-d-learn
Btw, tehre is no need for extra semicolon (`;`) after enum and struct definition Dne 25.8.2016 v 12:23 Cauterite via Digitalmars-d-learn napsal(a): On Wednesday, 24 August 2016 at 23:04:25 UTC, Illuminati wrote: Well those other answers aren't wrong, but I envisioned that you'd have multi

Re: nested enum

2016-08-25 Thread Cauterite via Digitalmars-d-learn
On Wednesday, 24 August 2016 at 23:04:25 UTC, Illuminati wrote: Well those other answers aren't wrong, but I envisioned that you'd have multiple categories within your sub-enums and whatnot, so you'd need something more like this: struct A { enum X { one,