Re: How can I allocate a int[] array on stack?

2021-03-25 Thread Daniel Kozak via Digitalmars-d-learn
On Fri, Mar 26, 2021 at 7:36 AM Daniel Kozak wrote: > On Fri, Mar 26, 2021 at 7:31 AM Daniel Kozak wrote: > >> On Fri, Mar 26, 2021 at 6:50 AM Jack via Digitalmars-d-learn < >> digitalmars-d-learn@puremagic.com> wrote: >> >>> What's the equivalent of C's VLA in D? scoped from std.typecons >>> do

Re: How can I allocate a int[] array on stack?

2021-03-25 Thread Daniel Kozak via Digitalmars-d-learn
On Fri, Mar 26, 2021 at 6:50 AM Jack via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > What's the equivalent of C's VLA in D? scoped from std.typecons > doesn't seem to work with arrays. Should I use alloca() for my > array or is there something else? > https://dlang.org/libra

How can I allocate a int[] array on stack?

2021-03-25 Thread Jack via Digitalmars-d-learn
What's the equivalent of C's VLA in D? scoped from std.typecons doesn't seem to work with arrays. Should I use alloca() for my array or is there something else?

Re: Contributing CDF bindings to Deimos

2021-03-25 Thread Chris Piker via Digitalmars-d-learn
On Friday, 26 March 2021 at 00:50:36 UTC, Jordan Wilson wrote: Nice one. I've used HDF5/NetCDF, will have to check out and see what CDF offers. AFAIK CDF is much simpler than NetCDF. If you do generate CDF files and want other common tools to understand your data structures, use the ISTP met

Re: Contributing CDF bindings to Deimos

2021-03-25 Thread Jordan Wilson via Digitalmars-d-learn
On Thursday, 25 March 2021 at 04:00:33 UTC, Chris Piker wrote: On Tuesday, 23 March 2021 at 05:54:13 UTC, mw wrote: [...] Okay, that's done. The repo https://github.com/das-developers/deimos.cdf and package https://code.dlang.org/packages/cdf have been drafted and tested on Linux, I'm about

Re: How to delete dynamic array ?

2021-03-25 Thread mw via Digitalmars-d-learn
On Tuesday, 16 March 2021 at 23:49:00 UTC, H. S. Teoh wrote: On Tue, Mar 16, 2021 at 11:28:00PM +, mw via Digitalmars-d-learn wrote: [...] suppose: double[] data; // D type: dynamic array As of 2021 what's the correct way to allocate and deallocate (free memory to the system immediatel

Re: Contributing CDF bindings to Deimos

2021-03-25 Thread Chris Piker via Digitalmars-d-learn
On Thursday, 25 March 2021 at 16:57:05 UTC, Bastiaan Veelo wrote: On Thursday, 25 March 2021 at 04:00:33 UTC, Chris Piker wrote: As an aside, software developers at NASA Goddard have now heard of D which is nice. They were pleased to see that it was supported by gcc. (Hat tip to the GDC team)

Re: What happened to std.net.curl HTTP execute?

2021-03-25 Thread tastyminerals via Digitalmars-d-learn
On Wednesday, 17 March 2021 at 16:02:58 UTC, tastyminerals wrote: I am using std.net.curl and the following chunk of code in many places: """ http.setPostData(userData, "application/json"); http.addRequestHeader("Accept", "application/json"); http.addRequestHeader("Authorization", "

Re: Contributing CDF bindings to Deimos

2021-03-25 Thread Bastiaan Veelo via Digitalmars-d-learn
On Thursday, 25 March 2021 at 04:00:33 UTC, Chris Piker wrote: As an aside, software developers at NASA Goddard have now heard of D which is nice. They were pleased to see that it was supported by gcc. (Hat tip to the GDC team) That’s cool. I’d love to see NASA on https://dlang.org/orgs-usin

Re: Contributing CDF bindings to Deimos

2021-03-25 Thread mw via Digitalmars-d-learn
On Thursday, 25 March 2021 at 04:00:33 UTC, Chris Piker wrote: The repo https://github.com/das-developers/deimos.cdf and package https://code.dlang.org/packages/cdf have been drafted and tested on Linux, I'm about to test on Windows and MacOS. As an aside, software developers at NASA Goddard h