Re: alias parameters, what for?

2019-05-09 Thread Dennis via Digitalmars-d-learn
On Thursday, 9 May 2019 at 09:52:21 UTC, XavierAP wrote: alias parameters are used for functions (in the general sense). Why this instead of specifying and typing the parameter functions or delegates? With function pointers, there is extra indirection and the function can not be inlined.

Re: Compiler/Phobos/Types problem — panic level due to timing.

2019-05-09 Thread John Colvin via Digitalmars-d-learn
On Wednesday, 8 May 2019 at 11:53:34 UTC, Russel Winder wrote: On Mon, 2019-05-06 at 15:53 +, John Colvin via Digitalmars-d-learn wrote: […] pretty please show people it with UFCS: recurrence!((a, n) => a[n-1] + a[n-2])(zero, one) .dropExactly(n) .front Any particular reason

Re: Framework design, initialization and framework usage

2019-05-09 Thread Robert M. Münch via Digitalmars-d-learn
On 2019-05-08 13:31:40 +, Ron Tarrant said: On Wednesday, 8 May 2019 at 10:21:34 UTC, Robert M. Münch wrote: However, I'm happy to post some updates/screenrecordings to show our progress. Works for me. Ok, so I need to find a good name for this thing which I can use as thread subject

Re: [windows] Can't delete a closed file?

2019-05-09 Thread Rene Zwanenburg via Digitalmars-d-learn
On Thursday, 9 May 2019 at 12:33:37 UTC, Cym13 wrote: On Thursday, 9 May 2019 at 11:31:20 UTC, Cym13 wrote: ... To dismiss any doubt about AV or other processes coming into play I took the binary and ran it with wine on linux with the exact same end result. For reference my windows system

Re: [windows] Can't delete a closed file?

2019-05-09 Thread Cym13 via Digitalmars-d-learn
On Thursday, 9 May 2019 at 13:02:51 UTC, Rene Zwanenburg wrote: On Thursday, 9 May 2019 at 12:33:37 UTC, Cym13 wrote: On Thursday, 9 May 2019 at 11:31:20 UTC, Cym13 wrote: ... To dismiss any doubt about AV or other processes coming into play I took the binary and ran it with wine on linux

Re: alias parameters, what for?

2019-05-09 Thread XavierAP via Digitalmars-d-learn
Thanks, I get your points. I do think they make more sense for the standard library, than in every general case (packages for specific uses). Namely, alias parameters provide absolute genericity (instead of overloading every possible use case, or else constraining the API by design), and

Re: I had a bad time with slice-in-struct array operation forwarding/mimicing. What's the best way to do it?

2019-05-09 Thread Random D user via Digitalmars-d-learn
On Saturday, 4 May 2019 at 15:36:51 UTC, Nicholas Wilson wrote: On Saturday, 4 May 2019 at 15:18:58 UTC, Random D user wrote: I wanted to make a 2D array like structure and support D slice like operations, but I had surprisingly bad experience. The de facto multi dimensional array type in D

Re: Framework design, initialization and framework usage

2019-05-09 Thread Ron Tarrant via Digitalmars-d-learn
On Thursday, 9 May 2019 at 11:48:59 UTC, Robert M. Münch wrote: The application won't know/see a difference on which platform it runs. I expect some differences in how GUI actions are handled or communicated to the framework, however these should be rare and can be handled with conditional

Re: I had a bad time with slice-in-struct array operation forwarding/mimicing. What's the best way to do it?

2019-05-09 Thread Random D user via Digitalmars-d-learn
On Saturday, 4 May 2019 at 16:10:36 UTC, Adam D. Ruppe wrote: On Saturday, 4 May 2019 at 15:18:58 UTC, Random D user wrote: But array copy and setting/clearing doesn't: int[] bar = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ]; foo[] = bar[]; Generally speaking, opIndex is for

Re: Meson build system user new to D.

2019-05-09 Thread Mike Brockus via Digitalmars-d-learn
On Wednesday, 8 May 2019 at 10:28:26 UTC, Andre Pany wrote: On Monday, 6 May 2019 at 19:52:23 UTC, Mike Brockus wrote: Hello everyone I am a Meson build system user and I am new to the D language, just wondering if there are compiler flags that I should add, unit testing frameworks, any good

Re: Erasing passwords from ram?

2019-05-09 Thread Nick Sabalausky via Digitalmars-d-learn
On Tuesday, 30 April 2019 at 08:15:15 UTC, Dukc wrote: I am currently programming a server. So I got the idea that after I've generated all the hashes I need from a password, I want to erase it from RAM before discarding it, just to be sure it won't float around if the server memory is exposed

Re: Framework design, initialization and framework usage

2019-05-09 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 9 May 2019 at 11:48:59 UTC, Robert M. Münch wrote: Good to know that there are not only web-stack people around these days. i do web and gui Though my gui library is 100% from scratch on linux, and... barely even good enough for myself to use. I really need to write a new text

Re: [windows] Can't delete a closed file?

2019-05-09 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 9 May 2019 at 13:18:44 UTC, Cym13 wrote: On Thursday, 9 May 2019 at 13:02:51 UTC, Rene Zwanenburg wrote: On Thursday, 9 May 2019 at 12:33:37 UTC, Cym13 wrote: On Thursday, 9 May 2019 at 11:31:20 UTC, Cym13 wrote: ... To dismiss any doubt about AV or other processes coming into

Re: Compiler/Phobos/Types problem — panic level due to timing.

2019-05-09 Thread Russel Winder via Digitalmars-d-learn
On Thu, 2019-05-09 at 08:33 +, John Colvin via Digitalmars-d-learn wrote: > […] > > Not big benefit in this case, very big benefit with longer chains. > > It reads in the order of operations, as opposed to inside out. John, Coming from a Haskell/Lisp background to declarative expression, I

[windows] Can't delete a closed file?

2019-05-09 Thread Cym13 via Digitalmars-d-learn
Hi, this is likely not related to D itself but hopefully someone can help me with this since I'm rather new to windows programming, I mainly work on linux. I'm trying to bundle a DLL in a binary, write it in a temp folder, use it and remove the dangling file. So far I have the following

Re: [windows] Can't delete a closed file?

2019-05-09 Thread Rumbu via Digitalmars-d-learn
On Thursday, 9 May 2019 at 10:09:23 UTC, Cym13 wrote: Hi, this is likely not related to D itself but hopefully someone can help me with this since I'm rather new to windows programming, I mainly work on linux. I'm trying to bundle a DLL in a binary, write it in a temp folder, use it and

Re: [windows] Can't delete a closed file?

2019-05-09 Thread Cym13 via Digitalmars-d-learn
On Thursday, 9 May 2019 at 11:07:53 UTC, Andre Pany wrote: On Thursday, 9 May 2019 at 10:09:23 UTC, Cym13 wrote: Hi, this is likely not related to D itself but hopefully someone can help me with this since I'm rather new to windows programming, I mainly work on linux. I'm trying to bundle a

Re: [windows] Can't delete a closed file?

2019-05-09 Thread Cym13 via Digitalmars-d-learn
On Thursday, 9 May 2019 at 11:31:20 UTC, Cym13 wrote: ... To dismiss any doubt about AV or other processes coming into play I took the binary and ran it with wine on linux with the exact same end result. For reference my windows system is a 64b windows 10.

alias parameters, what for?

2019-05-09 Thread XavierAP via Digitalmars-d-learn
What are the benefits of alias parameters, compared to specifying the template parameters fully? https://dlang.org/spec/template.html#aliasparameters In most examples, at places in Phobos, and in Andrei's and Ali’s books, alias parameters are used for functions (in the general sense). Why

Re: alias parameters, what for?

2019-05-09 Thread Simen Kjærås via Digitalmars-d-learn
On Thursday, 9 May 2019 at 09:52:21 UTC, XavierAP wrote: What are the benefits of alias parameters, compared to specifying the template parameters fully? https://dlang.org/spec/template.html#aliasparameters In most examples, at places in Phobos, and in Andrei's and Ali’s books, alias

Re: [windows] Can't delete a closed file?

2019-05-09 Thread Andre Pany via Digitalmars-d-learn
On Thursday, 9 May 2019 at 10:09:23 UTC, Cym13 wrote: Hi, this is likely not related to D itself but hopefully someone can help me with this since I'm rather new to windows programming, I mainly work on linux. I'm trying to bundle a DLL in a binary, write it in a temp folder, use it and

Re: [windows] Can't delete a closed file?

2019-05-09 Thread Cym13 via Digitalmars-d-learn
On Thursday, 9 May 2019 at 11:11:56 UTC, Rumbu wrote: Since deploying a dll is a suspect behaviour outside a normal installation process, most probably you have a lock on the file put by windows defender or an antivirus if installed. Thanks for your input but I'm absolutely certain that it's

Re: Blog Post #0032 - Menu Accelerator Keys

2019-05-09 Thread Ron Tarrant via Digitalmars-d-learn
On Wednesday, 8 May 2019 at 15:06:23 UTC, number wrote: I do feel a bit pedantic about it too :) That's like OCD, right? :)