Re: Fixing race issues the right way

2020-04-20 Thread solidstate1991 via Digitalmars-d-learn
On Sunday, 5 April 2020 at 22:33:50 UTC, Stefan Koch wrote: Look at your program in a debugger and see if it does spawn threads. If it does find out where and why they are spawned. Thanks for the answer, but it seems the issue was the lack of the ability of unittesting such a large

Re: Integration tests

2020-04-20 Thread aliak via Digitalmars-d-learn
On Friday, 17 April 2020 at 16:56:57 UTC, Russel Winder wrote: Hi, Thinking of trying to do the next project in D rather than Rust, but… Rust has built in unit testing on a module basis. D has this so no problem. Rust allows for integration tests in the tests directory of a project.

Re: Multiplying transposed matrices in mir

2020-04-20 Thread p.shkadzko via Digitalmars-d-learn
On Monday, 20 April 2020 at 02:50:29 UTC, 9il wrote: On Monday, 20 April 2020 at 02:42:33 UTC, 9il wrote: On Sunday, 19 April 2020 at 20:29:54 UTC, p.shkadzko wrote: On Sunday, 19 April 2020 at 20:06:23 UTC, jmh530 wrote: [...] Thanks. I somehow missed the whole point of "a * a.transposed"

Re: Multiplying transposed matrices in mir

2020-04-20 Thread jmh530 via Digitalmars-d-learn
On Monday, 20 April 2020 at 19:06:53 UTC, p.shkadzko wrote: [snip] It is. I was trying to calculate the covariance matrix of some dataset X which would be XX^T. Incorrect. The covariance matrix is calculated with matrix multiplication, not element-wise multiplication. For instance, I often

Re: Multiplying transposed matrices in mir

2020-04-20 Thread p.shkadzko via Digitalmars-d-learn
On Sunday, 19 April 2020 at 21:27:43 UTC, jmh530 wrote: On Sunday, 19 April 2020 at 20:29:54 UTC, p.shkadzko wrote: [snip] Thanks. I somehow missed the whole point of "a * a.transposed" not working because "a.transposed" is not allocated. a.transposed is just a view of the original matrix.

Re: Integration tests

2020-04-20 Thread Russel Winder via Digitalmars-d-learn
On Fri, 2020-04-17 at 17:51 +, Jon Degenhardt via Digitalmars-d- learn wrote: > On Friday, 17 April 2020 at 16:56:57 UTC, Russel Winder wrote: > > Hi, > > > > Thinking of trying to do the next project in D rather than > > Rust, but… > > > > Rust has built in unit testing on a module basis.

Re: mir: How to change iterator?

2020-04-20 Thread jmh530 via Digitalmars-d-learn
On Monday, 20 April 2020 at 00:27:40 UTC, 9il wrote: [snip] Using two arguments Iterator1, Iterator2 works without allocation /+dub.sdl: dependency "mir-algorithm" version="~>3.7.28" +/ import mir.ndslice; void foo(Iterator1, Iterator2, SliceKind kind) (Slice!(Iterator1, 1, kind) x,

Error: module ctype is in file 'std/ctype.d' which cannot be read - when running dmd

2020-04-20 Thread duapple via Digitalmars-d-learn
https://forum.dlang.org/post/idvspaicssrosayuc...@forum.dlang.org On Friday, 24 June 2016 at 21:06:30 UTC, cym13 wrote: On Friday, 24 June 2016 at 21:01:11 UTC, Roman wrote: I should probably add that only importing std.ctype causes the error. I have a bunch of other imports: import