Re: Pro programmer

2019-08-25 Thread Tony via Digitalmars-d-learn
On Sunday, 25 August 2019 at 21:30:10 UTC, GreatSam4sure wrote: I am wondering as to what is the starting point of being a pro programmer. If I want to be a pro programmer what language must I start with? Most pro programmer I have heard of are all C and C++ Guru. Most of the best guys on

Do I understand std.experimental.allocator composition correctly?

2019-08-25 Thread James Blachly via Digitalmars-d-learn
The documentation for std.experimental.allocator is a little dense and I wanted to make sure I am understanding composition correctly. Suppose I have the following, taken more-or-less direct from the docs: auto batchAllocator = AllocatorList!( (size_t n) => Region!Mallocator(max(n,

Re: Setting up Dlang Environment

2019-08-25 Thread Mike Brown via Digitalmars-d-learn
On Saturday, 17 August 2019 at 21:26:27 UTC, Andre Pany wrote: On Saturday, 17 August 2019 at 20:42:41 UTC, Mike Brown wrote: Hi All, I've tried installing and setting up Dlang a few times now. I'm struggling to get it reliable and to a decent environment in place. I don't really want to

Pro programmer

2019-08-25 Thread GreatSam4sure via Digitalmars-d-learn
I am wondering as to what is the starting point of being a pro programmer. If I want to be a pro programmer what language must I start with? Most pro programmer I have heard of are all C and C++ Guru. Most of the best guys on this D forum falls into that category. I really want to know

Re: Sort Associative Array by Key

2019-08-25 Thread Paul Backus via Digitalmars-d-learn
On Sunday, 25 August 2019 at 19:03:10 UTC, JN wrote: I think normal lambdas are better than these string ones: foo.byPair.array.sort!((a, b) => a[0] < b[0]).map!(a => a[1]).writeln; You can also use names instead of numeric indices: foo.byPair.array.sort!((a, b) => a.key < b.key).map!(a =>

Re: Sort Associative Array by Key

2019-08-25 Thread JN via Digitalmars-d-learn
On Sunday, 25 August 2019 at 17:01:23 UTC, a11e99z wrote: On Sunday, 25 August 2019 at 16:54:33 UTC, Samir wrote: Is there a way to output the values of an associative array based on the lexicographic order of the keys? For example, if foo = ["VXE":8, "BZP":5, "JLC":2], I'd like to output

Re: Sort Associative Array by Key

2019-08-25 Thread a11e99z via Digitalmars-d-learn
On Sunday, 25 August 2019 at 16:54:33 UTC, Samir wrote: Is there a way to output the values of an associative array based on the lexicographic order of the keys? For example, if foo = ["VXE":8, "BZP":5, "JLC":2], I'd like to output something like: 5 2 8 auto foo = ["VXE":8, "BZP":5,

Sort Associative Array by Key

2019-08-25 Thread Samir via Digitalmars-d-learn
Is there a way to output the values of an associative array based on the lexicographic order of the keys? For example, if foo = ["VXE":8, "BZP":5, "JLC":2], I'd like to output something like: 5 2 8 Thanks! Samir

Re: [Help!] Use two different assembly symbol in D, but they are same address.

2019-08-25 Thread a11e99z via Digitalmars-d-learn
On Sunday, 25 August 2019 at 13:43:42 UTC, a11e99z wrote: On Sunday, 25 August 2019 at 13:24:57 UTC, lili wrote: On Saturday, 24 August 2019 at 12:55:57 UTC, a11e99z wrote: and try to use any compiler DMD/LDC/GDC. maybe result will be that u want.

Re: [Help!] Use two different assembly symbol in D, but they are same address.

2019-08-25 Thread a11e99z via Digitalmars-d-learn
On Sunday, 25 August 2019 at 13:24:57 UTC, lili wrote: On Saturday, 24 August 2019 at 12:55:57 UTC, a11e99z wrote: On Saturday, 24 August 2019 at 12:16:34 UTC, lili wrote: On Saturday, 24 August 2019 at 12:09:19 UTC, a11e99z wrote: On Saturday, 24 August 2019 at 11:53:01 UTC, lili wrote:

Re: [Help!] Use two different assembly symbol in D, but they are same address.

2019-08-25 Thread lili via Digitalmars-d-learn
On Saturday, 24 August 2019 at 12:55:57 UTC, a11e99z wrote: On Saturday, 24 August 2019 at 12:16:34 UTC, lili wrote: On Saturday, 24 August 2019 at 12:09:19 UTC, a11e99z wrote: On Saturday, 24 August 2019 at 11:53:01 UTC, lili wrote: [...] resb 8 just reserving 8 bytes not initializing it.