Re: container vs standard array

2023-09-19 Thread vino via Digitalmars-d-learn
On Tuesday, 19 September 2023 at 20:20:17 UTC, Nick Treleaven wrote: On Tuesday, 19 September 2023 at 19:57:34 UTC, Nick Treleaven wrote: This is because a single array can be passed to a typesafe variadic parameter rather than elements of that array type. And then immutable(char) doesn't conve

Re: container vs standard array

2023-09-19 Thread Nick Treleaven via Digitalmars-d-learn
On Tuesday, 19 September 2023 at 19:57:34 UTC, Nick Treleaven wrote: This is because a single array can be passed to a typesafe variadic parameter rather than elements of that array type. And then immutable(char) doesn't convert to string. I think a non-variadic overload could be added to make

Re: container vs standard array

2023-09-19 Thread Nick Treleaven via Digitalmars-d-learn
On Tuesday, 19 September 2023 at 06:35:01 UTC, JG wrote: On Tuesday, 19 September 2023 at 00:34:01 UTC, vino wrote: //auto a = Array!string("Aname"); // throws error auto b = Array!char("Bname");// works auto c = Array!string("Aname", "Bname"); // works ... Looks

Array!string -> data compression -> Data Encryption -> Hash statement

2023-09-19 Thread Vino via Digitalmars-d-learn
Hi All, We have a requirement as below, and I tried the libraries such as std.digest, crypto, botan etc but no luck, hence request you suggestion's on how to achieve the below requirement. Array!string -> data compression -> Data Encryption -> Hash statement -> store the result in database

Re: Which function returns a pair after division ? (integer,frac)

2023-09-19 Thread claptrap via Digitalmars-d-learn
On Tuesday, 19 September 2023 at 03:44:18 UTC, Vitaliy Fadeev wrote: What D function or D operator does this? ```asm IDIV EAX, r/m32 ``` ``` IDIV 5, 2 EAX = 2 EDX = 1 ``` and returns (2,1) at once? If you use LDC it'll automatically optimize that for you https://d.godbolt.org/z/oz4h9ccbP