Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-07 Thread Mike Parker via Digitalmars-d-announce
On Thursday, 7 January 2021 at 21:26:28 UTC, Steven Schveighoffer wrote: Should this be on the announce forum? No it shouldn't. But by the time I realized it was, the discussion was well underway.

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-07 Thread Mike Parker via Digitalmars-d-announce
On Thursday, 7 January 2021 at 21:42:55 UTC, Per Nordlöw wrote: On Wednesday, 6 January 2021 at 09:21:53 UTC, Mike Parker wrote: https://github.com/dlang/DIPs/blob/c06ce7f144b3dabf363d1896ddcd31a2a6b7c969/DIPs/DIP1039.md A bit off topic: Would Kenji Hara still have been an active Dlang

Re: Printing shortest decimal form of floating point number with Mir

2021-01-07 Thread Walter Bright via Digitalmars-d-announce
On 1/6/2021 1:31 AM, 9il wrote: > [...] This is the same problem as https://issues.dlang.org/show_bug.cgi?id=21526 It has been provided in the thread https://forum.dlang.org/post/gqzdiicrvtlicurxy...@forum.dlang.org In general, I strongly reiterate that posting bugs to the n.g. means they

Re: Printing shortest decimal form of floating point number with Mir

2021-01-07 Thread Walter Bright via Digitalmars-d-announce
On 1/6/2021 4:26 AM, Jacob Carlborg wrote: On 2021-01-06 03:30, Walter Bright wrote: The baseline Linux target does not have SSE. Other compilers solve this by having a flag to specify the minimum target CPU. DMD has flags for that, too.

Re: Printing shortest decimal form of floating point number with Mir

2021-01-07 Thread Ali Çehreli via Digitalmars-d-announce
On 12/23/20 10:05 AM, 9il wrote: > It was a mockery executed by Atila For those who read the above comment but do not want to read the rest of this long thread, the linked PR discussion does not contain mockery: > https://github.com/dlang/dmd/pull/9778#issuecomment-498700369 Ali

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-07 Thread Per Nordlöw via Digitalmars-d-announce
On Wednesday, 6 January 2021 at 09:21:53 UTC, Mike Parker wrote: https://github.com/dlang/DIPs/blob/c06ce7f144b3dabf363d1896ddcd31a2a6b7c969/DIPs/DIP1039.md A bit off topic: Would Kenji Hara still have been an active Dlang community member if his solution to DIP-1039 hadn't been reverted.

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-07 Thread Steven Schveighoffer via Digitalmars-d-announce
On 1/6/21 4:21 AM, Mike Parker wrote: This is the discussion thread for the first round of Community Review of DIP 1039, "Static Arrays with Inferred Length": https://github.com/dlang/DIPs/blob/c06ce7f144b3dabf363d1896ddcd31a2a6b7c969/DIPs/DIP1039.md The review period will end at 11:59 PM

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-07 Thread Steven Schveighoffer via Digitalmars-d-announce
On 1/6/21 1:14 PM, Luhrel wrote: On Wednesday, 6 January 2021 at 17:59:57 UTC, Jacob Carlborg wrote: On 2021-01-06 10:21, Mike Parker wrote: This is the discussion thread for the first round of Community Review of DIP 1039, "Static Arrays with Inferred Length":

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-07 Thread Luhrel via Digitalmars-d-announce
On Thursday, 7 January 2021 at 15:27:09 UTC, Dukc wrote: On Thursday, 7 January 2021 at 13:03:54 UTC, Luhrel wrote: 2. if staticArrFunc returns a size_t, then the problem can be simplified as: ``` staticArrFunc(cast(int[$])[1,2,3]); // no need to cast : staticArrFunc([1,2,3]); // already works

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-07 Thread Dukc via Digitalmars-d-announce
On Thursday, 7 January 2021 at 13:03:54 UTC, Luhrel wrote: I don't get it. 1. `y` should be a int[]. True - see my correction at the feedback theard. 2. if staticArrFunc returns a size_t, then the problem can be simplified as: ``` staticArrFunc(cast(int[$])[1,2,3]); // no need to cast :

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-07 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Thursday, 7 January 2021 at 13:03:54 UTC, Luhrel wrote: I think that `int[$] a = [1, 2, 3]` is much more user-friendly. ``` auto a = [1,2,3].staticArray!ubyte ``` But what prevents you from writing your own library solution that works like this? auto ints = mkarray(1,2,3,4,5); auto

Re: Discussion Thread: DIP 1039--Static Arrays with Inferred Length--Community Review Round 1

2021-01-07 Thread Luhrel via Digitalmars-d-announce
On Wednesday, 6 January 2021 at 18:22:32 UTC, Nick Treleaven wrote: From the feedback thread: On Wednesday, 6 January 2021 at 17:54:34 UTC, Dukc wrote: `std.array.staticArray` can already handle most of the problems described, and it does work in betterC - I just tested with LDC 1.20.1