Re: No UFCS with nested functions?

2019-11-04 Thread Paul Backus via Digitalmars-d-learn
On Tuesday, 5 November 2019 at 00:34:33 UTC, Nicholas Wilson wrote: https://blog.thecybershadow.net/2015/04/28/the-amazing-template-that-does-nothing/ struct S { ubyte[12] bar; } alias I(alias f) = f; bool foo (ref S s) { static bool prop(const(ubyte)[] f) { return f.length >

Re: No UFCS with nested functions?

2019-11-04 Thread Nicholas Wilson via Digitalmars-d-learn
On Monday, 4 November 2019 at 19:51:26 UTC, Tobias Pankrath wrote: Why does the following not work? It works, if I move the 'prop' out of 'foo'. --- struct S { ubyte[12] bar; } bool foo (ref S s) { static bool prop(const(ubyte)[] f) { return f.length > 1; } return s

Re: Using shared memory and thread

2019-11-04 Thread bioinfornatics via Digitalmars-d-learn
On Tuesday, 5 November 2019 at 00:04:05 UTC, bioinfornatics wrote: On Monday, 4 November 2019 at 22:19:29 UTC, bioinfornatics wrote: On Monday, 4 November 2019 at 21:53:45 UTC, bioinfornatics wrote: On Monday, 4 November 2019 at 19:53:29 UTC, bioinfornatics wrote: [...] One image reveals mor

Re: Using shared memory and thread

2019-11-04 Thread bioinfornatics via Digitalmars-d-learn
On Monday, 4 November 2019 at 22:19:29 UTC, bioinfornatics wrote: On Monday, 4 November 2019 at 21:53:45 UTC, bioinfornatics wrote: On Monday, 4 November 2019 at 19:53:29 UTC, bioinfornatics wrote: Dear, I would like to put a buffer `shared(char[])` into a shared memory ( L2 cache ) and provi

Re: Using shared memory and thread

2019-11-04 Thread bioinfornatics via Digitalmars-d-learn
On Monday, 4 November 2019 at 21:53:45 UTC, bioinfornatics wrote: On Monday, 4 November 2019 at 19:53:29 UTC, bioinfornatics wrote: Dear, I would like to put a buffer `shared(char[])` into a shared memory ( L2 cache ) and provide a start and end index to multiple thread in order to perform co

Re: Using shared memory and thread

2019-11-04 Thread bioinfornatics via Digitalmars-d-learn
On Monday, 4 November 2019 at 19:53:29 UTC, bioinfornatics wrote: Dear, I would like to put a buffer `shared(char[])` into a shared memory ( L2 cache ) and provide a start and end index to multiple thread in order to perform computation on a piece of original buffer. [...] One image revea

Re: No UFCS with nested functions?

2019-11-04 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Nov 04, 2019 at 07:51:26PM +, Tobias Pankrath via Digitalmars-d-learn wrote: > Why does the following not work? It works, if I move the 'prop' out of > 'foo'. UFCS is only supported for module-level functions, as far as I know. > --- > struct S { > ubyte[12] bar; > } > > bool

Re: Which is the active fork in DFL gui library ?

2019-11-04 Thread Vinod K Chandran via Digitalmars-d-learn
On Sunday, 3 November 2019 at 23:25:40 UTC, Jesse Phillips wrote: On Sunday, 3 November 2019 at 16:48:52 UTC, Vinod K Chandran wrote: On Sunday, 3 November 2019 at 14:01:03 UTC, Jesse Phillips https://github.com/Rayerd/dfl @Jesse Phillips, Thank you for the reply. Does DWT is built upon Ja

Re: Which is the active fork in DFL gui library ?

2019-11-04 Thread Vinod K Chandran via Digitalmars-d-learn
On Monday, 4 November 2019 at 19:29:22 UTC, Jacob Carlborg wrote: On 2019-11-03 17:48, Vinod K Chandran wrote: [...] Yes. It's a full translation of the Java code to D. No JNI, JVM or Java or remains. [...] I don't know if that's the case. Also I don't know if that's related to Java/JV

No UFCS with nested functions?

2019-11-04 Thread Tobias Pankrath via Digitalmars-d-learn
Why does the following not work? It works, if I move the 'prop' out of 'foo'. --- struct S { ubyte[12] bar; } bool foo (ref S s) { static bool prop(const(ubyte)[] f) { return f.length > 1; } return s.bar[].prop; } --- Thanks!

Using shared memory and thread

2019-11-04 Thread bioinfornatics via Digitalmars-d-learn
Dear, I would like to put a buffer `shared(char[])` into a shared memory ( L2 cache ) and provide a start and end index to multiple thread in order to perform computation on a piece of original buffer. I read doc from std.concurrency, std.parallelism, core.thead (druntime) and vectorization

Re: Which is the active fork in DFL gui library ?

2019-11-04 Thread Jacob Carlborg via Digitalmars-d-learn
On 2019-11-03 17:48, Vinod K Chandran wrote: @Jesse Phillips, Thank you for the reply.  Does DWT is built upon Java's SWT ? Yes. It's a full translation of the Java code to D. No JNI, JVM or Java or remains. I heard that SWT is somewhat slower in windows. I don't know if that's the case

Dub and gitsubmodules

2019-11-04 Thread Sebastiaan Koppe via Digitalmars-d-learn
Does anyone know a reliable way of having a dub package that contains git submodules and is to be used as a dependency? I am looking for a way to ensure the submodules are initialised before a build.

Re: Hum humm, build latest release with ldc

2019-11-04 Thread Treebeard via Digitalmars-d-learn
On Monday, 4 November 2019 at 09:49:03 UTC, Daniel Kozak wrote: On Mon, Nov 4, 2019 at 10:45 AM Treebeard via Digitalmars-d-learn wrote: Hoom, hum, can you tell me some nice instructions to compile the latest release of DMD using LDC? I walk slowly, but I love fast compilers. --- But I spo

Re: Hum humm, build latest release with ldc

2019-11-04 Thread Daniel Kozak via Digitalmars-d-learn
On Mon, Nov 4, 2019 at 10:45 AM Treebeard via Digitalmars-d-learn wrote: > > Hoom, hum, can you tell me some nice instructions to compile the > latest release of DMD using LDC? > > I walk slowly, but I love fast compilers. > > --- > But I spoke hastily. We must not be hasty. I have become too hot.

Hum humm, build latest release with ldc

2019-11-04 Thread Treebeard via Digitalmars-d-learn
Hoom, hum, can you tell me some nice instructions to compile the latest release of DMD using LDC? I walk slowly, but I love fast compilers. --- But I spoke hastily. We must not be hasty. I have become too hot. I must cool myself and think; for it is easier to shout stop! than to do it - The T