Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-04-27 Thread Atila Neves via Digitalmars-d-announce
On Tuesday, 25 April 2017 at 20:20:08 UTC, jmh530 wrote: On Monday, 24 April 2017 at 21:59:34 UTC, Atila Neves wrote: Enter the `@Dispose` UDA: I found this really interesting. Am I understanding the process correctly: apply map to numbers, allocate and return a new array in D, copy it to

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-04-26 Thread Atila Neves via Digitalmars-d-announce
On Tuesday, 25 April 2017 at 22:21:33 UTC, Ali Çehreli wrote: On 04/25/2017 01:20 PM, jmh530 wrote: > [...] numbers, allocate > [...] to free the > [...] Yes. > [...] freed by D > [...] Correct. > [...] of just the > [...] C++ smart > [...] totally grok it > [...] Just by guessing, what we

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-04-25 Thread jmh530 via Digitalmars-d-announce
On Tuesday, 25 April 2017 at 22:21:33 UTC, Ali Çehreli wrote: Just by guessing, what we don't see here is that there is a wrapping layer that does the copying. Disposal logic is called by that layer. So, your scope(exit) takes place at a higher layer. Here is made-up-pseudo-code by me. :)

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-04-25 Thread Ali Çehreli via Digitalmars-d-announce
On 04/25/2017 01:20 PM, jmh530 wrote: > On Monday, 24 April 2017 at 21:59:34 UTC, Atila Neves wrote: >> >> Enter the `@Dispose` UDA: >> > > I found this really interesting. > > Am I understanding the process correctly: apply map to numbers, allocate > and return a new array in D, copy it to

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-04-25 Thread jmh530 via Digitalmars-d-announce
On Monday, 24 April 2017 at 21:59:34 UTC, Atila Neves wrote: Enter the `@Dispose` UDA: I found this really interesting. Am I understanding the process correctly: apply map to numbers, allocate and return a new array in D, copy it to Excel, call dispose to free the D memory. So if you

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-04-24 Thread Laeeth Isharc via Digitalmars-d-announce
C++ example for XLW: LPXLFOPER EXCEL_EXPORT xlStats(LPXLFOPER inTargetRange) { EXCEL_BEGIN; XlfOper xlTargetRange(inTargetRange); // Temporary variables. double averageTmp = 0.0; double varianceTmp = 0.0; // Iterate over the cells in the

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-04-24 Thread Laeeth Isharc via Digitalmars-d-announce
On Monday, 24 April 2017 at 21:59:34 UTC, Atila Neves wrote: Now with more `@nogc`. Before, this worked fine: double func(double d) @nogc nothrow { return d * 2; } The function is `@nogc`, the wrapper function (i.e. the function that Excel actually calls) is also `@nogc` via the magic of

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-04-24 Thread Atila Neves via Digitalmars-d-announce
On Monday, 20 March 2017 at 20:09:58 UTC, Atila Neves wrote: http://code.dlang.org/packages/excel-d This dub package allows D code to be called from Excel. It uses compile-time reflection to register the user's code in an XLL (a DLL loaded by Excel) so no boilerplate is necessary. Not even

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-04-13 Thread Atila Neves via Digitalmars-d-announce
On Monday, 20 March 2017 at 20:09:58 UTC, Atila Neves wrote: http://code.dlang.org/packages/excel-d This dub package allows D code to be called from Excel. It uses compile-time reflection to register the user's code in an XLL (a DLL loaded by Excel) so no boilerplate is necessary. Not even

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-22 Thread Laeeth Isharc via Digitalmars-d-announce
On Wednesday, 22 March 2017 at 02:30:50 UTC, Saurabh Das wrote: On Monday, 20 March 2017 at 20:09:58 UTC, Atila Neves wrote: http://code.dlang.org/packages/excel-d This dub package allows D code to be called from Excel. It uses compile-time reflection to register the user's code in an XLL (a

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-21 Thread Saurabh Das via Digitalmars-d-announce
On Monday, 20 March 2017 at 20:09:58 UTC, Atila Neves wrote: http://code.dlang.org/packages/excel-d This dub package allows D code to be called from Excel. It uses compile-time reflection to register the user's code in an XLL (a DLL loaded by Excel) so no boilerplate is necessary. Not even

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-21 Thread bachmeier via Digitalmars-d-announce
On Tuesday, 21 March 2017 at 13:59:56 UTC, Jacob Carlborg wrote: It's cool that this is possible to do in D, but I feel sorry for anyone that has a reason :) In my discussions with people doing real world data analysis, making decisions in meetings, by email, and such, spreadsheets are an

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-21 Thread Laeeth Isharc via Digitalmars-d-announce
On Tuesday, 21 March 2017 at 13:59:56 UTC, Jacob Carlborg wrote: On 2017-03-20 21:09, Atila Neves wrote: http://code.dlang.org/packages/excel-d This dub package allows D code to be called from Excel. It uses compile-time reflection to register the user's code in an XLL (a DLL loaded by Excel)

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-21 Thread Jacob Carlborg via Digitalmars-d-announce
On 2017-03-20 21:09, Atila Neves wrote: http://code.dlang.org/packages/excel-d This dub package allows D code to be called from Excel. It uses compile-time reflection to register the user's code in an XLL (a DLL loaded by Excel) so no boilerplate is necessary. Not even `DllMain`! It works like

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-21 Thread Atila Neves via Digitalmars-d-announce
On Tuesday, 21 March 2017 at 01:12:45 UTC, Laeeth Isharc wrote: On Tuesday, 21 March 2017 at 00:25:46 UTC, Steven Schveighoffer wrote: On 3/20/17 4:09 PM, Atila Neves wrote: http://code.dlang.org/packages/excel-d This dub package allows D code to be called from Excel. It uses compile-time

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-21 Thread Atila Neves via Digitalmars-d-announce
On Tuesday, 21 March 2017 at 00:25:46 UTC, Steven Schveighoffer wrote: On 3/20/17 4:09 PM, Atila Neves wrote: http://code.dlang.org/packages/excel-d This dub package allows D code to be called from Excel. It uses compile-time reflection to register the user's code in an XLL (a DLL loaded by

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-20 Thread Laeeth Isharc via Digitalmars-d-announce
On Tuesday, 21 March 2017 at 00:25:46 UTC, Steven Schveighoffer wrote: On 3/20/17 4:09 PM, Atila Neves wrote: http://code.dlang.org/packages/excel-d This dub package allows D code to be called from Excel. It uses compile-time reflection to register the user's code in an XLL (a DLL loaded by

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-20 Thread Laeeth Isharc via Digitalmars-d-announce
On Monday, 20 March 2017 at 20:32:20 UTC, Stefan Koch wrote: On Monday, 20 March 2017 at 20:09:58 UTC, Atila Neves wrote: http://code.dlang.org/packages/excel-d This dub package allows D code to be called from Excel. It uses compile-time reflection to register the user's code in an XLL (a

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-20 Thread Laeeth Isharc via Digitalmars-d-announce
On Tuesday, 21 March 2017 at 00:25:46 UTC, Steven Schveighoffer wrote: On 3/20/17 4:09 PM, Atila Neves wrote: http://code.dlang.org/packages/excel-d This dub package allows D code to be called from Excel. It uses compile-time reflection to register the user's code in an XLL (a DLL loaded by

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-20 Thread Steven Schveighoffer via Digitalmars-d-announce
On 3/20/17 4:09 PM, Atila Neves wrote: http://code.dlang.org/packages/excel-d This dub package allows D code to be called from Excel. It uses compile-time reflection to register the user's code in an XLL (a DLL loaded by Excel) so no boilerplate is necessary. Not even `DllMain`! It works like

Re: excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-20 Thread Stefan Koch via Digitalmars-d-announce
On Monday, 20 March 2017 at 20:09:58 UTC, Atila Neves wrote: http://code.dlang.org/packages/excel-d This dub package allows D code to be called from Excel. It uses compile-time reflection to register the user's code in an XLL (a DLL loaded by Excel) so no boilerplate is necessary. Not even

excel-d v0.0.1 - D API to write functions callable from Excel

2017-03-20 Thread Atila Neves via Digitalmars-d-announce
http://code.dlang.org/packages/excel-d This dub package allows D code to be called from Excel. It uses compile-time reflection to register the user's code in an XLL (a DLL loaded by Excel) so no boilerplate is necessary. Not even `DllMain`! It works like this: main.d: import xlld;