Re: Financial Library

2021-06-13 Thread mw via Digitalmars-d-learn
On Sunday, 13 June 2021 at 12:46:29 UTC, Financial Wiz wrote: What are some of the best Financial Libraries for D? I would like to be able to aggregate as much accurate information as possible. A number of numerical libraries kind of like numpy https://code.dlang.org/search?q=Mir D

Re: cannot take address of scope local in safe function

2021-06-13 Thread Paul Backus via Digitalmars-d-learn
On Sunday, 13 June 2021 at 17:49:50 UTC, vit wrote: Is possible create and use scope output range allocated on stack in @safe code? Example: ```d //-dip1000 struct OutputRange{ private bool valid = true; private void* ptr; int count = 0; void

Re: Financial Library

2021-06-13 Thread jmh530 via Digitalmars-d-learn
On Sunday, 13 June 2021 at 22:32:16 UTC, Bastiaan Veelo wrote: On Sunday, 13 June 2021 at 12:46:29 UTC, Financial Wiz wrote: What are some of the best Financial Libraries for D? I would like to be able to aggregate as much accurate information as possible. Thanks. I am not into financials,

Re: Financial Library

2021-06-13 Thread Bastiaan Veelo via Digitalmars-d-learn
On Sunday, 13 June 2021 at 12:46:29 UTC, Financial Wiz wrote: What are some of the best Financial Libraries for D? I would like to be able to aggregate as much accurate information as possible. Thanks. I am not into financials, but these libs show up in a search:

Re: Inclusion of Parenthesis on Certain Functions

2021-06-13 Thread Bastiaan Veelo via Digitalmars-d-learn
On Sunday, 13 June 2021 at 15:45:53 UTC, Justin Choi wrote: I've tried looking through the documentation but can't find an explanation for why you can use it without parenthesis. https://dlang.org/spec/function.html#optional-parenthesis (Some exceptions regarding delegates and function

Re: What exactly gets returned with extern(C) export string func() ?

2021-06-13 Thread frame via Digitalmars-d-learn
On Sunday, 13 June 2021 at 10:02:45 UTC, cc wrote: it seems to work as expected with the same C# code. Does D explicitly disallow slices as an extern(C) export parameter type? The spec says that there is no equivalent to type[]. You get a type* instead.

Re: cannot take address of scope local in safe function

2021-06-13 Thread vit via Digitalmars-d-learn
On Sunday, 13 June 2021 at 17:18:46 UTC, ag0aep6g wrote: On Sunday, 13 June 2021 at 16:27:18 UTC, vit wrote: Why I can take address of Foo variable but not Bar? ```d //-dip1000 struct Foo{ private double d; } struct Bar{ private void* ptr; } void main()@safe{ ///this is OK:

Re: cannot take address of scope local in safe function

2021-06-13 Thread ag0aep6g via Digitalmars-d-learn
On Sunday, 13 June 2021 at 16:27:18 UTC, vit wrote: Why I can take address of Foo variable but not Bar? ```d //-dip1000 struct Foo{ private double d; } struct Bar{ private void* ptr; } void main()@safe{ ///this is OK: { scope Foo x; scope ptr = }

cannot take address of scope local in safe function

2021-06-13 Thread vit via Digitalmars-d-learn
Why I can take address of Foo variable but not Bar? ```d //-dip1000 struct Foo{ private double d; } struct Bar{ private void* ptr; } void main()@safe{ ///this is OK: { scope Foo x; scope ptr = } ///Error: cannot take address of `scope` local `x` in

Re: Inclusion of Parenthesis on Certain Functions

2021-06-13 Thread H. S. Teoh via Digitalmars-d-learn
On Sun, Jun 13, 2021 at 03:45:53PM +, Justin Choi via Digitalmars-d-learn wrote: > I'm currently learning D right now, and I was wondering why certain > functions like std.stdio.readln can work both with and without > parenthesis for the function call. I've tried looking through the >

Re: Inclusion of Parenthesis on Certain Functions

2021-06-13 Thread mw via Digitalmars-d-learn
On Sunday, 13 June 2021 at 15:45:53 UTC, Justin Choi wrote: I'm currently learning D right now, and I was wondering why certain functions like std.stdio.readln can work both with and without parenthesis for the function call. I've tried looking through the documentation but can't find an

Inclusion of Parenthesis on Certain Functions

2021-06-13 Thread Justin Choi via Digitalmars-d-learn
I'm currently learning D right now, and I was wondering why certain functions like std.stdio.readln can work both with and without parenthesis for the function call. I've tried looking through the documentation but can't find an explanation for why you can use it without parenthesis.

There are some Feed RSS or mail alert for new Dlang compiler update?

2021-06-13 Thread Marcone via Digitalmars-d-learn
Thank you very much guys.

Financial Library

2021-06-13 Thread Financial Wiz via Digitalmars-d-learn
What are some of the best Financial Libraries for D? I would like to be able to aggregate as much accurate information as possible. Thanks.

What exactly gets returned with extern(C) export string func() ?

2021-06-13 Thread cc via Digitalmars-d-learn
D under dmd/Win10/64-bit currently seems to store strings (slices) internally like so: ```d static struct DString { size_t length; immutable(char)* ptr; } static assert(DString.sizeof == string.sizeof); string s = "abcde"; DString d; memcpy(, , s.sizeof); assert(d.length ==