Jump to page: 1 2
Thread overview
Scientific computing using D
Mar 17
ahmat
Mar 17
9il
Mar 17
9il
Mar 17
jmh530
Mar 17
Ahmat
Mar 17
Ahmat
Mar 17
9il
Mar 17
jmh530
Mar 17
Ahmat
Mar 17
bachmeier
Mar 17
Ahmat
Mar 17
jmh530
Mar 17
bachmeier
Mar 18
jmh530
Mar 17
bachmeier
March 17
Hi everyone,
I use mainly Python for scientific computing and I want to switch to D but I can't find good libraries as replacement for pandas, matplotlib, scipy, ...
Are there plans to make D better in this area?
March 17
On Tuesday, 17 March 2020 at 00:48:24 UTC, ahmat wrote:
> Hi everyone,
> I use mainly Python for scientific computing and I want to switch to D but I can't find good libraries as replacement for pandas, matplotlib, scipy, ...
> Are there plans to make D better in this area?

https://github.com/libmir/mir-algorithm
https://github.com/libmir/mir-random
https://github.com/libmir/mir-blas
https://github.com/libmir/mir-lapack
https://github.com/libmir/mir-optim
https://github.com/libmir/mir-intergral

Mir is not the libraries for scientific research on a PC as well as the whole D isn't the best choice for that. Python is better for this kind of stuff. If you just like D, it isn't a good reason to use it. Use D if you don't have other choices because of technical reasons. D offers what other languages can't and sometimes it is the only good choice an engineer has.

Ilya
March 17
On Tuesday, 17 March 2020 at 06:02:25 UTC, 9il wrote:
> https://github.com/libmir/mir-intergral

https://github.com/libmir/mir-integral



March 17
On Tuesday, 17 March 2020 at 00:48:24 UTC, ahmat wrote:
> Hi everyone,
> I use mainly Python for scientific computing and I want to switch to D but I can't find good libraries as replacement for pandas, matplotlib, scipy, ...
> Are there plans to make D better in this area?


Matplotlib-d:
https://github.com/koji-kojiro/matplotlib-d

Numir:
https://github.com/libmir/numir

There is not currently something as polished as pandas, but there has been some progress made on magpie that covers some of the functionality of that and the tidyverse:
https://github.com/Kriyszig/magpie
March 17
On Tuesday, 17 March 2020 at 06:02:25 UTC, 9il wrote:
> [snip]
>
> Mir is not the libraries for scientific research on a PC as well as the whole D isn't the best choice for that. Python is better for this kind of stuff. If you just like D, it isn't a good reason to use it. Use D if you don't have other choices because of technical reasons. D offers what other languages can't and sometimes it is the only good choice an engineer has.
>
> Ilya

I think it is useful for anyone to think about their use case and whether the programming language is the best tool to use.

I am often more productive in Python/Matlab/R for small projects that do not take long to write and where the code does not need to run for a long time. Knowing nothing about what the OP is doing, I would say start there.

However, if they are doing something that starts to run into the limitations of those languages, maybe they are doing something that uses a lot of memory or the code takes a long time to run, then they should start thinking about what the bottlenecks are. Sometimes with python, you might find the the bottleneck is actually some C code that numpy is calling. In which case, the improvement in performance may not be so large by using D instead. Other times, you can use something like cython to improve performance. However, then you start mixing C and Python in your code and then you might wonder why not do it in C first?

I considered using D because I was writing code that took several hours to run and sometimes ran into memory problems. I also didn't want to use C, and I couldn't stand the template system in C++. It has been good to learn D. I think I've gotten a better handle on many other programming languages because of it. However, I'm not sure I've saved as much time as I expected.
March 17
On Tuesday, 17 March 2020 at 10:28:00 UTC, jmh530 wrote:
> On Tuesday, 17 March 2020 at 06:02:25 UTC, 9il wrote:
>> [...]
>
> I think it is useful for anyone to think about their use case and whether the programming language is the best tool to use.
>
> [...]

Python is easy to use but difficult to debug, Cython is a nightmare, C++ have many good libraries but it’s kind of complex. I am still a beginner in D, but if writing high performance code in D is easy i am definitely going to drop Python.
March 17
Have you considered julia? I like D and even tried to sneak it into as many uni assignments as possible but the package ecosystem isn't really there. You will spend a considerable amount of time on non-scientific-computing tasks such as writing interfaces for other c libraries.

Op di 17 mrt. 2020 om 01:50 schreef ahmat via Digitalmars-d < digitalmars-d@puremagic.com>:

> Hi everyone,
> I use mainly Python for scientific computing and I want to switch
> to D but I can't find good libraries as replacement for pandas,
> matplotlib, scipy, ...
> Are there plans to make D better in this area?
>


March 17
On Tuesday, 17 March 2020 at 06:02:25 UTC, 9il wrote:
> On Tuesday, 17 March 2020 at 00:48:24 UTC, ahmat wrote:
>> [...]
>
> https://github.com/libmir/mir-algorithm
> https://github.com/libmir/mir-random
> https://github.com/libmir/mir-blas
> https://github.com/libmir/mir-lapack
> https://github.com/libmir/mir-optim
> https://github.com/libmir/mir-intergral
>
> Mir is not the libraries for scientific research on a PC as well as the whole D isn't the best choice for that. Python is better for this kind of stuff. If you just like D, it isn't a good reason to use it. Use D if you don't have other choices because of technical reasons. D offers what other languages can't and sometimes it is the only good choice an engineer has.
>
> Ilya

Thanks you, How is Libmir in term of performance ?
March 17
On Tuesday, 17 March 2020 at 11:50:26 UTC, Ahmat wrote:
> On Tuesday, 17 March 2020 at 06:02:25 UTC, 9il wrote:
>> On Tuesday, 17 March 2020 at 00:48:24 UTC, ahmat wrote:
>>> [...]
>>
>> https://github.com/libmir/mir-algorithm
>> https://github.com/libmir/mir-random
>> https://github.com/libmir/mir-blas
>> https://github.com/libmir/mir-lapack
>> https://github.com/libmir/mir-optim
>> https://github.com/libmir/mir-intergral
>>
>> Mir is not the libraries for scientific research on a PC as well as the whole D isn't the best choice for that. Python is better for this kind of stuff. If you just like D, it isn't a good reason to use it. Use D if you don't have other choices because of technical reasons. D offers what other languages can't and sometimes it is the only good choice an engineer has.
>>
>> Ilya
>
> Thanks you, How is Libmir in term of performance ?

When compiled with LDC Mir has the same performance as C/C++ code compiled with Clang/Clang++. The linear algebra performance depends on BLAS/Lapack library that is linked with.
March 17
On Tuesday, 17 March 2020 at 12:10:24 UTC, 9il wrote:

> When compiled with LDC Mir has the same performance as C/C++ code compiled with Clang/Clang++. The linear algebra performance depends on BLAS/Lapack library that is linked with.

What he is trying to say is: The performance is about the best mankind has developed so far, sometimes + some small epsilon which he it about to minimize.

« First   ‹ Prev
1 2