Re: Access violation when using IShellFolder2

2020-09-09 Thread John Chapman via Digitalmars-d-learn
On Wednesday, 9 September 2020 at 22:44:50 UTC, FreeSlave wrote: Btw do you know how to parse a date returned by GetDetailsOf? Couldn't find any examples in C++. I actually can see digits representing date and time as a part of the string, but I would prefer to use some winapi function to trans

Re: Access violation when using IShellFolder2

2020-09-09 Thread FreeSlave via Digitalmars-d-learn
On Wednesday, 9 September 2020 at 07:18:04 UTC, John Chapman wrote: On Tuesday, 8 September 2020 at 22:24:22 UTC, FreeSlave wrote: However if I change the type of recycleBin variable to IShellFolder (not IShellFolder2), the crash does not happen. Does IShellFolder2 require some special handlin

Re: How to use labeled break in static foreach?

2020-09-09 Thread visitor via Digitalmars-d-learn
https://run.dlang.io/is/xiqi4P not pretty :)) but ...

Re: How to use labeled break in static foreach?

2020-09-09 Thread visitor via Digitalmars-d-learn
On Wednesday, 9 September 2020 at 17:02:26 UTC, visitor wrote: On Friday, 14 February 2020 at 06:41:02 UTC, cc wrote: import std.meta; enum A = AliasSeq!(1, 2, 3, 4); static foreach (idx, field; A) { static if (__traits(compiles, THREELOOP)) {} else { static if (field == 3) {

Re: How to use labeled break in static foreach?

2020-09-09 Thread visitor via Digitalmars-d-learn
On Friday, 14 February 2020 at 06:41:02 UTC, cc wrote: import std.meta; enum A = AliasSeq!(1, 2, 3, 4); static foreach (idx, field; A) { static if (__traits(compiles, THREELOOP)) {} else { static if (field == 3) { pragma(msg, "Got a 3!"); enum THREELO

Re: How to use libmir --> mir-algorithm, numir, mir-random?

2020-09-09 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 9 September 2020 at 15:30:33 UTC, Shaleen Chhabra wrote: [snip] Hi, I updated my dmd version to dmd-2.093.1 Now it throws a conflict error between 1. function mir.ndslice.topology.iota!(long, 1LU).iota at mir/ndslice/topology.d(630) conflicts with function std.range.iota!int.iot

Re: How to use libmir --> mir-algorithm, numir, mir-random?

2020-09-09 Thread Shaleen Chhabra via Digitalmars-d-learn
On Wednesday, 9 September 2020 at 11:43:16 UTC, Fynn Schröder wrote: On Wednesday, 9 September 2020 at 11:36:56 UTC, Shaleen Chhabra wrote: but i am unable to configure the libraries, have dmd v2.076.1 installed on my PC. DMD v2.076 is ancient (almost 2 years old!). Current is DMD 2.093.1. I

Re: How to use libmir --> mir-algorithm, numir, mir-random?

2020-09-09 Thread Shaleen Chhabra via Digitalmars-d-learn
On Wednesday, 9 September 2020 at 11:44:35 UTC, Fynn Schröder wrote: On Wednesday, 9 September 2020 at 11:43:16 UTC, Fynn Schröder wrote: DMD v2.076 is ancient (almost 2 years old!) typo: its almost 3 years old thanks, I have upgraded my dmd to latest version. I now import numir and face this

Re: bindbc OpenGL ES

2020-09-09 Thread Danny Arends via Digitalmars-d-learn
On Monday, 31 August 2020 at 22:25:48 UTC, Mike Parker wrote: On Monday, 31 August 2020 at 14:04:19 UTC, Danny Arends wrote: Don't know exactly where to post this, so I hope the bindbc team will see the post here in learn. I was wondering if it would be possible to have bindbc OpenGL ES bindi

Re: Named parameters in function call

2020-09-09 Thread Cecil Ward via Digitalmars-d-learn
On Wednesday, 9 September 2020 at 11:48:28 UTC, Paul Backus wrote: On Tuesday, 8 September 2020 at 13:28:22 UTC, Cecil Ward wrote: I wonder if there is any way in which we could combine this with strong typing of some sort (how?) to detect errors such as int xcoord; int ycoord; m

Re: Named parameters in function call

2020-09-09 Thread Paul Backus via Digitalmars-d-learn
On Tuesday, 8 September 2020 at 13:28:22 UTC, Cecil Ward wrote: I wonder if there is any way in which we could combine this with strong typing of some sort (how?) to detect errors such as int xcoord; int ycoord; myfunc( x : ycoord, y : xcoord, color : blue )[3] where the

Re: How to use libmir --> mir-algorithm, numir, mir-random?

2020-09-09 Thread Fynn Schröder via Digitalmars-d-learn
On Wednesday, 9 September 2020 at 11:43:16 UTC, Fynn Schröder wrote: DMD v2.076 is ancient (almost 2 years old!) typo: its almost 3 years old

Re: How to use libmir --> mir-algorithm, numir, mir-random?

2020-09-09 Thread Fynn Schröder via Digitalmars-d-learn
On Wednesday, 9 September 2020 at 11:36:56 UTC, Shaleen Chhabra wrote: but i am unable to configure the libraries, have dmd v2.076.1 installed on my PC. DMD v2.076 is ancient (almost 2 years old!). Current is DMD 2.093.1. I can only recommend to download and install an up-to-date version of D

Re: How to use libmir --> mir-algorithm, numir, mir-random?

2020-09-09 Thread Shaleen Chhabra via Digitalmars-d-learn
On Wednesday, 9 September 2020 at 11:30:58 UTC, Shaleen Chhabra wrote: On Wednesday, 2 September 2020 at 08:19:30 UTC, 9il wrote: On Wednesday, 2 September 2020 at 07:01:48 UTC, Shaleen Chhabra wrote: Hi, The libmir libraries can be found here: https://github.com/libmir I wish to use mir-al

Re: How to use libmir --> mir-algorithm, numir, mir-random?

2020-09-09 Thread Shaleen Chhabra via Digitalmars-d-learn
On Wednesday, 2 September 2020 at 08:19:30 UTC, 9il wrote: On Wednesday, 2 September 2020 at 07:01:48 UTC, Shaleen Chhabra wrote: Hi, The libmir libraries can be found here: https://github.com/libmir I wish to use mir-algorithm and numir so that i can directly use .npy format from python an

Re: Range checked assignment

2020-09-09 Thread Cecil Ward via Digitalmars-d-learn
On Tuesday, 8 September 2020 at 16:04:29 UTC, Harry Gillanders wrote: On Tuesday, 8 September 2020 at 14:18:14 UTC, Cecil Ward wrote: [...] If you want to define an integral-like type which is more-or-less interchangeable with the native integral types, you'll need to provide the following

Re: Named parameters in function call

2020-09-09 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Tuesday, 8 September 2020 at 13:28:22 UTC, Cecil Ward wrote: int xcoord; int ycoord; You can define your own types, of course: struct xcoord { int x; alias x this; } struct ycoord { int y; alias y this; } void myfunc(xcoord x; ycoord y, color c) {}

Re: Access violation when using IShellFolder2

2020-09-09 Thread John Chapman via Digitalmars-d-learn
On Tuesday, 8 September 2020 at 22:24:22 UTC, FreeSlave wrote: However if I change the type of recycleBin variable to IShellFolder (not IShellFolder2), the crash does not happen. Does IShellFolder2 require some special handling? The issue is caused by druntime's definition of IShellFolder2. T