Re: Thinking about the difference between fixed and 'dynamic' arrays.

2022-12-03 Thread Paul Backus via Digitalmars-d-learn
On Saturday, 3 December 2022 at 22:46:31 UTC, DLearner wrote: I agree should not change existing meaning of ``` int[] A; ``` But why not allow a construct for value-type variable arrays like: ``` int[*] B; ``` There's no reason to add more complexity to the language for this when the same

Re: Thinking about the difference between fixed and 'dynamic' arrays.

2022-12-03 Thread DLearner via Digitalmars-d-learn
On Wednesday, 30 November 2022 at 02:29:03 UTC, Paul Backus wrote: [...] If you want a dynamic array with value semantics, you should use a library-defined container type (e.g., `struct DynamicArray`). I agree should not change existing meaning of ``` int[] A; ``` But why not allow a

Re: How to compiler dlang code on Apple M1?

2022-12-03 Thread Steven Schveighoffer via Digitalmars-d-learn
On 12/3/22 1:59 PM, zoujiaqing wrote: ``` dub build --compiler=ldc2 --arch=arm64-apple-macos     Starting Performing "debug" build using ldc2 for aarch64, arm_hardfloat.     Building taggedalgebraic 0.11.22: building configuration [library]     Building eventcore 0.9.20+commit.4.g6744ae7:

How to compiler dlang code on Apple M1?

2022-12-03 Thread zoujiaqing via Digitalmars-d-learn
``` dub build --compiler=ldc2 --arch=arm64-apple-macos Starting Performing "debug" build using ldc2 for aarch64, arm_hardfloat. Building taggedalgebraic 0.11.22: building configuration [library] Building eventcore 0.9.20+commit.4.g6744ae7: building configuration [cfrunloop]

Re: How do you print all Unicode characters in a range - I want the subscripts, can't google a range of Unicode.

2022-12-03 Thread Adam D Ruppe via Digitalmars-d-learn
On Saturday, 3 December 2022 at 14:43:15 UTC, Adam D Ruppe wrote: The problem is just that writeln to the console is broken. You can either write to a function instead and load it in a text editor aaargh not to a "function" i meant to a "file". like auto f = File("test.txt", "wt");

Re: How do you print all Unicode characters in a range - I want the subscripts, can't google a range of Unicode.

2022-12-03 Thread Adam D Ruppe via Digitalmars-d-learn
On Friday, 2 December 2022 at 05:27:40 UTC, Daniel Donnelly, Jr. wrote: Doesn't work. The result I get is shit: The problem is just that writeln to the console is broken. You can either write to a function instead and load it in a text editor, or use a non-broken writeln like my

Re: How do you print all Unicode characters in a range - I want the subscripts, can't google a range of Unicode.

2022-12-03 Thread Adam D Ruppe via Digitalmars-d-learn
On Saturday, 3 December 2022 at 14:43:15 UTC, Adam D Ruppe wrote: import arsd.terminal; oh yeah my module: can download direct and compile with your program https://github.com/adamdruppe/arsd/blob/master/terminal.d or it is also on dub

Re: Why can't D store all UTF-8 code units in char type? (not really understanding explanation)

2022-12-03 Thread ag0aep6g via Digitalmars-d-learn
On 02.12.22 22:39, thebluepandabear wrote: Hm, that specifically might not be. The thing is, I thought a UTF-8 code unit can store 1-4 bytes for each character, so how is it right to say that `char` is a utf-8 code unit, it seems like it's just an ASCII code unit. You're simply not using the

Re: Easy sockets - don't exist yet?

2022-12-03 Thread Vincent via Digitalmars-d-learn
On Monday, 10 October 2016 at 02:54:09 UTC, Jonathan M Davis wrote: Quite some time ago, it was decided that the *stream modules as they were were unacceptable and that they needed to be replaced with something range-based That's the key! Absolutely dilettantish solution of "profi", biased

Re: Easy sockets - don't exist yet?

2022-12-03 Thread Vincent via Digitalmars-d-learn
On Saturday, 8 October 2016 at 17:52:25 UTC, Karabuta wrote: This is how a usable socket in a standard library should be http://dsfml.com/docs/sockets.html. This is using DSFML (a D bindings to SFML). Pity, doesn't exist anymore.

Re: Easy sockets - don't exist yet?

2022-12-03 Thread Vincent via Digitalmars-d-learn
On Monday, 10 October 2016 at 07:37:48 UTC, Bauss wrote: Wrote some pretty simple sockets that you could use (Based on vibe.d though.) That's the point! STANDARD library cannot/must not rely on bloatware like vibe.d; Only small, native, non-depended socket implementation.