Re: Improving dot product for standard multidimensional D arrays

2020-03-03 Thread maarten van damme via Digitalmars-d-learn
it is difficult to write an efficient matrix matrix multiplication in any language. If you want a fair comparison, implement your naive method in python and compare those timings. Op di 3 mrt. 2020 om 04:20 schreef 9il via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com>: > On Sunday, 1 M

Re: D is Multiplatform[DUVIDA]

2017-09-08 Thread maarten van damme via Digitalmars-d-learn
It's a compiled language, it'll behave like c++. 2017-09-08 7:13 GMT+02:00 dark777 via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com>: > On Friday, 8 September 2017 at 03:56:25 UTC, rikki cattermole wrote: > >> On 08/09/2017 3:08 AM, dark777 wrote: >> >>> On Friday, 8 September 2017 at

Re: very odd directx 11 error

2017-08-24 Thread maarten van damme via Digitalmars-d-learn
zeroMemory(&scd, scd.sizeof); void zeroMemory(void* ad,size_t size){ (cast(byte*)& ad)[0 .. size] = 0; } I was totally corrupting my stack and it's not even needed in D, the compiler zero's it out automatically. Mystery solved, thanks a lot irc (adam,wolfgang,...) 2017-08-24 17:26 GMT+

Re: very odd directx 11 error

2017-08-24 Thread maarten van damme via Digitalmars-d-learn
I should probably add that the error is a hresult, being 0 when it works but -2005270527 when it fails. 2017-08-24 17:24 GMT+02:00 maarten van damme : > Hi all. > > This works (dub --arch=x86_mscoff) http://dpaste.com/1XCJEX7 but this > fails : http://dpaste.com/1C7WMB7 . > > Notice that all I've

very odd directx 11 error

2017-08-24 Thread maarten van damme via Digitalmars-d-learn
Hi all. This works (dub --arch=x86_mscoff) http://dpaste.com/1XCJEX7 but this fails : http://dpaste.com/1C7WMB7 . Notice that all I've done is manually inlined init3d... You can compile this with the following dub.json http://dpaste.com/2QBQFSX Any help would be appreciated, it make absolutely

Re: How to get uniq to return an array?

2017-07-04 Thread maarten van damme via Digitalmars-d-learn
have you tried std.range's .array? 2017-07-04 13:00 GMT+02:00 PumpkinCake via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com>: > I'm trying to strip repeated values out of an int array using uniq. It's > returning a UniqResult which can't be accessed like an array... how can I > get it t

Re: Neural Networks / ML Libraries for D

2016-10-25 Thread maarten van damme via Digitalmars-d-learn
There is mir https://github.com/libmir/mir which is geared towards machine learning, I don't know if it has anything about neural networks, I've yet to use it. If you're only interested in neural networks, I've used FANN (a C library) together with D and it worked very well. 2016-10-25 13:17 GMT+0

Re: store template value

2015-08-02 Thread maarten van damme via Digitalmars-d-learn
Oh, neat. This saves the day :) 2015-08-01 23:22 GMT+02:00 Ali Çehreli : > On 08/01/2015 08:37 AM, maarten van damme via Digitalmars-d-learn wrote: > >> I have a class that creates a task in it's constructor. How do I store >> this >> created task as one of it'

Re: store template value

2015-08-01 Thread maarten van damme via Digitalmars-d-learn
But it's std.parallelism's task... And how can I use get!T if I don't know the type of the task? 2015-08-01 19:02 GMT+02:00 Adam D. Ruppe via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com>: > On Saturday, 1 August 2015 at 16:41:54 UTC, maarten van damme wrote: > >> I was afraid I would

Re: store template value

2015-08-01 Thread maarten van damme via Digitalmars-d-learn
I was afraid I would have to do that. Templatizing the class on the value doesn't work as I later on want to create a hashmap of these classes. When I assign a task to a variant, how do I call .yieldForce later on? 2015-08-01 18:28 GMT+02:00 Adam D. Ruppe via Digitalmars-d-learn < digitalmars-d-le

store template value

2015-08-01 Thread maarten van damme via Digitalmars-d-learn
I have a class that creates a task in it's constructor. How do I store this created task as one of it's value members and later on call .yieldForce()?

Re: How to use core.thread.Thread

2015-07-16 Thread maarten van damme via Digitalmars-d-learn
You can certainly use thread but in most use cases, concurrency or parallelism will accomplish the same in a much saner/safer way. (they're wrappers around core.thread anyway). Don't know of any tutorials about core.thread, about the other two you can find help here : http://ddili.org/ders/d.en/ 2

Re: How to use core.thread.Thread

2015-07-16 Thread maarten van damme via Digitalmars-d-learn
Have you checked out std.parallelism and std.concurrency? 2015-07-16 9:57 GMT+02:00 aki via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com>: > I can't resolve the compile errors: > > import core.thread; > class DerivedThread : Thread { > int count = 0; > this() { >

Re: Beginner ?. Why does D suggest to learn java

2014-10-16 Thread maarten van damme via Digitalmars-d-learn
While d can be complex, there's nothing preventing you from starting out simple and not using all features at first. I don't understand why it's not suitable for a beginner if you use this approach... 2014-10-17 6:51 GMT+02:00 via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com>: > On Fri

Re: D with no druntime

2014-08-21 Thread maarten van damme via Digitalmars-d-learn
There were 2 talks about bare metal D this year at the D conference. The first one is about someone able to use D on microcontrollers with a few k ram.: https://www.youtube.com/watch?v=o5m0m_ZG9e8 The second one is about someone trying to strip almost everything out and see what works: https://ww

Re: Command Line Application in D

2014-08-04 Thread maarten van damme via Digitalmars-d-learn
I am a little bit confused as to what you want. There is a command line example at dlang.org, and there exists a program (rdmd) that compiles several D files and runs them. http://dlang.org/rdmd.html 2014-08-04 23:20 GMT+02:00 TJB via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com>: > I

Re: std.algorithm range violation

2014-05-28 Thread maarten van damme via Digitalmars-d-learn
wow. senpai, teach me what I did wrong... 2014-05-28 13:21 GMT+02:00 bearophile via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com>: > maarten van damme: > > > writeln(providor_symbol_map.keys.sort!((x,y)=>providor_ >> symbol_map[x].length>=providor_symbol_map[y].length)); >> [/code] >

Re: std.algorithm range violation

2014-05-28 Thread maarten van damme via Digitalmars-d-learn
nderer via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com>: > On Wednesday, 28 May 2014 at 10:10:41 UTC, maarten van damme via > > Digitalmars-d-learn wrote: > >> an anyone explain me what I'm doing wrong here : >> >> [code] >> dstring[][dstring]

std.algorithm range violation

2014-05-28 Thread maarten van damme via Digitalmars-d-learn
an anyone explain me what I'm doing wrong here : [code] dstring[][dstring] providor_symbol_map; ... writeln(providor_symbol_map.keys.sort!((x,y)=>providor_symbol_map[x].length>=providor_symbol_map[y].length)); [/code] output: core.exception.RangeError@std.algorithm(9429): Range violation