Re: Good to the last drop.

2022-03-31 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/31/22 3:44 PM, WhatMeWorry wrote: I run the program (at the bottom) and get, as expected, the run-time out of memory error: PS C:\D\sandbox> .\Reserve.exe   newCapacity = [  1]   newCapacity = [  3]   newCapacity = [  5]     o    o    o

Re: Good to the last drop.

2022-03-31 Thread Paul Backus via Digitalmars-d-learn
On Thursday, 31 March 2022 at 19:44:23 UTC, WhatMeWorry wrote: Is there a way to programmatically determine the exact maximum memory size available to the DRuntime’s array implementation? Closest you can get is probably [`GC.stats`][1], which will give you the total amount of free memory avail

Good to the last drop.

2022-03-31 Thread WhatMeWorry via Digitalmars-d-learn
I run the program (at the bottom) and get, as expected, the run-time out of memory error: PS C:\D\sandbox> .\Reserve.exe newCapacity = [ 1] newCapacity = [ 3] newCapacity = [ 5] ooo newCapacity = [905,207,293] newCapaci

Re: How pretty-print a struct?

2022-03-31 Thread ZZ via Digitalmars-d-learn
On Thursday, 31 March 2022 at 16:08:19 UTC, mw wrote: On Thursday, 31 March 2022 at 06:35:15 UTC, ZZ wrote: Hi, Is there an easy way to pretty-print a struct which also includes arrays? pretty_array does a very good job for arrays. If you want the field variable names in the output, you

Re: How pretty-print a struct?

2022-03-31 Thread mw via Digitalmars-d-learn
On Thursday, 31 March 2022 at 06:35:15 UTC, ZZ wrote: Hi, Is there an easy way to pretty-print a struct which also includes arrays? pretty_array does a very good job for arrays. If you want the field variable names in the output, you can use: https://code.dlang.org/packages/jdiutil htt