std.string.assumeUTF() silently casting mutable to immutable?

2024-02-12 Thread Forest via Digitalmars-d-learn
I may have found a bug in assumeUTF(), but being new to D, I'm not sure. The description: Assume the given array of integers arr is a well-formed UTF string and return it typed as a UTF string. ubyte becomes char, ushort becomes wchar and uint becomes dchar. Type qualifiers are preserved.

Re: std.uni CodepointSet toString

2024-02-12 Thread Paul Backus via Digitalmars-d-learn
On Friday, 9 February 2024 at 08:04:28 UTC, Danilo wrote: Incredible! Seems like D is experiencing featuritis. Priorities may be wrong. Instead of bug fixing and stabilization, people concentrate on getting new stuff like ˋ:blubˋ into the language. If you look at the work actually being done

Re: LDC Stacktrace with symbols instead of addresses

2024-02-12 Thread Johan via Digitalmars-d-learn
On Monday, 12 February 2024 at 16:14:27 UTC, Per Nordlöw wrote: . Doing the same thing with LDC via ```sh ldc2 -g --d-debug -run app ``` gives ``` ld: error: undefined symbol: _D3etc5linux11memoryerror26registerMemoryErrorHandlerFNbZb referenced by app.d:3

Re: length's type.

2024-02-12 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Feb 12, 2024 at 07:34:36PM +, bachmeier via Digitalmars-d-learn wrote: > On Monday, 12 February 2024 at 18:22:46 UTC, H. S. Teoh wrote: > > > Honestly, I think this issue is blown completely out of proportion. > > Only for people that don't have to deal with the problems it causes.

Re: length's type.

2024-02-12 Thread bachmeier via Digitalmars-d-learn
On Monday, 12 February 2024 at 18:22:46 UTC, H. S. Teoh wrote: Honestly, I think this issue is blown completely out of proportion. Only for people that don't have to deal with the problems it causes. D decided on an unsigned type. You just learn that and adapt your code accordingly, end

Re: length's type.

2024-02-12 Thread bachmeier via Digitalmars-d-learn
On Monday, 12 February 2024 at 17:26:25 UTC, Nick Treleaven wrote: On Friday, 9 February 2024 at 15:19:32 UTC, bachmeier wrote: It's been discussed many, many times. The behavior is not going to change - there won't even be a compiler warning. (You'll have to check with the leadership for

Re: length's type.

2024-02-12 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Feb 12, 2024 at 05:26:25PM +, Nick Treleaven via Digitalmars-d-learn wrote: > On Friday, 9 February 2024 at 15:19:32 UTC, bachmeier wrote: > > It's been discussed many, many times. The behavior is not going to > > change - there won't even be a compiler warning. (You'll have to > >

Re: length's type.

2024-02-12 Thread Nick Treleaven via Digitalmars-d-learn
On Friday, 9 February 2024 at 15:19:32 UTC, bachmeier wrote: It's been discussed many, many times. The behavior is not going to change - there won't even be a compiler warning. (You'll have to check with the leadership for their reasons.) Was (part of) the reason because it would disrupt

Re: LDC Stacktrace with symbols instead of addresses

2024-02-12 Thread ryuukk_ via Digitalmars-d-learn
I agree, debug builds should show proper stack trace by default You should submit a PR for dmd and call what ever is that function behind a `debug` block when it hooks the C main function As for LDC, it's weird that it doesn't work, they should share the same runtime no?

Re: LDC Stacktrace with symbols instead of addresses

2024-02-12 Thread Per Nordlöw via Digitalmars-d-learn
On Sunday, 11 February 2024 at 06:43:19 UTC, Per Nordlöw wrote: How do I make LDC stacktraces like ```test-library(+0x1fb232)[0x562230d82232] So it turns out that ldc2 doesn't show symbols in stack traces by default. IMHO, in debug mode D should adhere to what other languages do. Meaning