April 27, 2021
On 4/27/2021 5:17 PM, Paul Backus wrote:
> On Tuesday, 27 April 2021 at 23:38:14 UTC, Walter Bright wrote:
>>
>> As always, when confused about this, rewrite the code in terms of simple ref's and pointers.
> 
> I think a large part of the confusion here stems from the fact that `scope ref T` behaves very differently from `scope T*`, even though `ref T` and `T*` are the same "under the hood."
> 
>     @safe:
>     static int* betty(scope ref S s) { return s.ptr; } // Error
>     static int* veronica(scope S* s) { return s.ptr; } // Ok
> 
> Unfortunately, there is no documentation of this distinction in the language spec (or anywhere else, as far as I know), so the only way anyone can learn about it is through trial and error.

`scope` is for pointers, `ref` is for references. That's the distinction.

`ref` never applies to pointers, `scope` never applies to references.

(A class reference is treated as a pointer.)
April 28, 2021
On Tuesday, 27 April 2021 at 22:45:58 UTC, mw wrote:
> On Monday, 26 April 2021 at 12:05:48 UTC, Calvin P wrote:
>> On Monday, 26 April 2021 at 01:28:35 UTC, Walter Bright wrote:
>>> https://alexgaynor.net/2019/apr/21/modern-c++-wont-save-us/
>>>
>>> Lists some perfectly reasonable code in Modern C++ style that has hidden memory safety bugs.
>>
>> Rust used for kernel/browser/database/UI, D also king able to work but not work good(no product or big projects).
>>
>>
>> Rust replace c++ jobs, go replace java jobs.  D need better long-term strategy.
>
> For me, D replace Python for data crutching.

D do not have yet a competitive framework on Big Data «à la» Spark, datascience «à la» Pandas/Dask (pandas with multi nodes computing)


April 28, 2021
On Wednesday, 28 April 2021 at 10:33:43 UTC, bioinfornatics wrote:
> D do not have yet a competitive framework on Big Data «à la» Spark, datascience «à la» Pandas/Dask (pandas with multi nodes computing)

I've found it to be very difficult to move away from Python in general, it isn't only about frameworks but the massive amount of focused tested libraries available. For instance, I recently were to analyze a set of HRTFs (signal processing impulse responses) in a file format called SOFA, and I only found C++ and Python libraries for it. I tried to set up the C++ library, but it turned out to be time consuming, Python was just plug and play... so I ended up doing everything in numpy.

At the end of the day developer time was more precious than execution time, which was somewhat slow, but not slower than the time I saved on development time.

It is very difficult for any language to get there, not because of the computational aspect, but because of the interfacing, both social and technical.

April 28, 2021
On Tuesday, 27 April 2021 at 05:01:09 UTC, Walter Bright wrote:
> On 4/26/2021 1:20 PM, MoonlightSentinel wrote:
>> Isn't this an error that should be detected by DIP25 / DIP1000? I was quite surprised that -preview=dip1000 accepted this code.
>
> The checks are defeated by the @trusted function:
>
>     @property inout(To)* buffPtr() inout
>     {
>         return _ptr == useStack ? _buff.ptr : _ptr;
>     }
>
>
> https://github.com/dlang/phobos/blob/master/std/internal/cstring.d#L229

Introduced in https://github.com/dlang/phobos/commit/681964cfbfb4480e756f5f40d3e9871db2469937
How old is it?
April 29, 2021
On Wednesday, 28 April 2021 at 13:18:57 UTC, Ola Fosheim Grøstad wrote:
> On Wednesday, 28 April 2021 at 10:33:43 UTC, bioinfornatics wrote:
>> D do not have yet a competitive framework on Big Data «à la» Spark, datascience «à la» Pandas/Dask (pandas with multi nodes computing)
>
> I've found it to be very difficult to move away from Python in general, it isn't only about frameworks but the massive amount of focused tested libraries available. For instance, I recently were to analyze a set of HRTFs (signal processing impulse responses) in a file format called SOFA, and I only found C++ and Python libraries for it. I tried to set up the C++ library, but it turned out to be time consuming, Python was just plug and play... so I ended up doing everything in numpy.
>
> At the end of the day developer time was more precious than execution time, which was somewhat slow, but not slower than the time I saved on development time.
>
> It is very difficult for any language to get there, not because of the computational aspect, but because of the interfacing, both social and technical.

Exactly the strength of python is the eco-system and not a library alone.
For datascience they are a rich ecosystem with pandas/dask/ray/numpy/scikitlearn as core.

I see in my works when you have to choose a language is not for a killer app but for a set of library that meet our needs. This eco-system have to be easy to set as our job is to make an application with all requested feature not a try hard path to install and configure new things.

And I am a D fan but for reason above I never yet be able to use D for a professional needs.

Moreover we have to take in account the number of candidate to hire which would like to do a D application … Its is close to impossible to find while Rust most have never used it but it is a dreamed technology and they want to learn it with a professional use case.
Recently with the declaration of linus torvald that c++ is a shit and Rust is now into to the kernel. The Rust hype growth even quickly.

To me, Walter Bright or Andrei Alexandrescu have to meet Linus Torvald to shown how D is a good language. And After let the influencer Linus Torvald to do the job.




April 29, 2021
On Thursday, 29 April 2021 at 06:46:40 UTC, bioinfornatics wrote:
> On Wednesday, 28 April 2021 at 13:18:57 UTC, Ola Fosheim Grøstad wrote:
>> On Wednesday, 28 April 2021 at 10:33:43 UTC, bioinfornatics wrote:
>>> D do not have yet a competitive framework on Big Data «à la» Spark, datascience «à la» Pandas/Dask (pandas with multi nodes computing)
>>
>> I've found it to be very difficult to move away from Python in general, it isn't only about frameworks but the massive amount of focused tested libraries available. For instance, I recently were to analyze a set of HRTFs (signal processing impulse responses) in a file format called SOFA, and I only found C++ and Python libraries for it. I tried to set up the C++ library, but it turned out to be time consuming, Python was just plug and play... so I ended up doing everything in numpy.
>>
>> At the end of the day developer time was more precious than execution time, which was somewhat slow, but not slower than the time I saved on development time.
>>
>> It is very difficult for any language to get there, not because of the computational aspect, but because of the interfacing, both social and technical.
>
> Exactly the strength of python is the eco-system and not a library alone.
> For datascience they are a rich ecosystem with pandas/dask/ray/numpy/scikitlearn as core.
>
> I see in my works when you have to choose a language is not for a killer app but for a set of library that meet our needs. This eco-system have to be easy to set as our job is to make an application with all requested feature not a try hard path to install and configure new things.
>
> And I am a D fan but for reason above I never yet be able to use D for a professional needs.
>
> Moreover we have to take in account the number of candidate to hire which would like to do a D application … Its is close to impossible to find while Rust most have never used it but it is a dreamed technology and they want to learn it with a professional use case.
> Recently with the declaration of linus torvald that c++ is a shit and Rust is now into to the kernel. The Rust hype growth even quickly.
>
> To me, Walter Bright or Andrei Alexandrescu have to meet Linus Torvald to shown how D is a good language. And After let the influencer Linus Torvald to do the job.

I am afraid it might be already too late by now,

https://security.googleblog.com/2021/04/rust-in-android-platform.html

https://docs.microsoft.com/en-us/windows/dev-environment/rust




April 29, 2021
On Wednesday, 28 April 2021 at 03:40:55 UTC, Walter Bright wrote:
> On 4/27/2021 5:17 PM, Paul Backus wrote:
>> [...]
>
> `scope` is for pointers, `ref` is for references. That's the distinction.
>
> `ref` never applies to pointers, `scope` never applies to references.
>
> (A class reference is treated as a pointer.)

Is that written explicitly anywhere in the docs?
April 29, 2021
On Thursday, 29 April 2021 at 12:32:25 UTC, Paulo Pinto wrote:
> On Thursday, 29 April 2021 at 06:46:40 UTC, bioinfornatics wrote:
>> [...]
>
> I am afraid it might be already too late by now,
>
> https://security.googleblog.com/2021/04/rust-in-android-platform.html
>
> https://docs.microsoft.com/en-us/windows/dev-environment/rust

It's so strange to me that Rust is everywhere. Like, it's "ok", but not really more than that. Also, productivity isn't really great compared to D for example imo.

What *is* a plus for Rust tho is the ecosystem, but maybe D can improve there in time? *dreaming*
April 30, 2021
On Thursday, 29 April 2021 at 15:18:50 UTC, Imperatorn wrote:
> On Thursday, 29 April 2021 at 12:32:25 UTC, Paulo Pinto wrote:
>> On Thursday, 29 April 2021 at 06:46:40 UTC, bioinfornatics wrote:
>>> [...]
>>
>> I am afraid it might be already too late by now,
>>
>> https://security.googleblog.com/2021/04/rust-in-android-platform.html
>>
>> https://docs.microsoft.com/en-us/windows/dev-environment/rust
>
> It's so strange to me that Rust is everywhere. Like, it's "ok", but not really more than that. Also, productivity isn't really great compared to D for example imo.
>
> What *is* a plus for Rust tho is the ecosystem, but maybe D can improve there in time? *dreaming*

the biggest invention in static-typing is templates, you can forgive c++ for the ugly syntax and the shorcomings since they had no idea at the time, what excuse do the new languages have? rust looks almost as ugly as c++ and afaik only d got templates right. i have nothing against optional gc but knowing the code-generation powers of d plus RAII, you would think gc would be a secondary concern, because you finally have the tools to eliminate most of the memory issues that plagues c/c++.
April 30, 2021
On Friday, 30 April 2021 at 12:21:05 UTC, throway wrote:
> the biggest invention in static-typing is templates, you can forgive c++ for the ugly syntax and the shorcomings since they had no idea at the time, what excuse do the new languages have? rust looks almost as ugly as c++ and afaik only d got templates right.

Hm. I think D templates are rather close to C++. What aspects of D templating do you think makes a difference?

> i have nothing against optional gc but knowing the code-generation powers of d plus RAII, you would think gc would be a secondary concern, because you finally have the tools to eliminate most of the memory issues that plagues c/c++.

I don't really have memory issues in C++, if I do it tends to be related to issues that can only be easily solved by a GC... (E.g. ownership not being obvious and avoiding circular reference being difficult)