March 12
On Tuesday, 12 March 2024 at 08:29:08 UTC, dweldon wrote:
> On Monday, 11 March 2024 at 09:41:16 UTC, Martyn wrote:
>> From what I have seen, Linus seems pretty level headed towards Rust. I dont think he has any interest learning it. Behind the curtains he might hate the language as much as he does C++. It is moving with the times.
>
> Rust is already in the Linux kernel:
>
> https://thenewstack.io/rust-in-the-linux-kernel/
>
> https://docs.kernel.org/rust/index.html

Yes. I know most on this forum knows this, which is why I did not state it.
March 13
On Monday, 11 March 2024 at 09:55:04 UTC, Martyn wrote:
> On Sunday, 10 March 2024 at 04:24:15 UTC, Walter Bright wrote:
>> On 3/9/2024 3:32 PM, Lance Bachmeier wrote:
>>> I "ported" a few thousand lines of C to D in a couple hours this afternoon. That includes the time it took to put all C memory allocation inside SafeRefCounted. With the overhead out of the way (setting up the SafeRefCounted structs, testing, and some minor other things) I bet I could easily port 20,000 lines in an 8-hour day. Working directly with C macros was the last thing needed to make this go fast.
>>
>> Thanks for posting that, I enjoy such testimonials!
>
> +1
>
> Very impressive!

+1 also. Quite a useful use case.

March 13

On Sunday, 10 March 2024 at 09:34:28 UTC, Emmanuel Danso Nyarko wrote:

>

On Sunday, 10 March 2024 at 04:24:15 UTC, Walter Bright wrote:

>

On 3/9/2024 3:32 PM, Lance Bachmeier wrote:

>

I "ported" a few thousand lines of C to D in a couple hours this afternoon. That includes the time it took to put all C memory allocation inside SafeRefCounted. With the overhead out of the way (setting up the SafeRefCounted structs, testing, and some minor other things) I bet I could easily port 20,000 lines in an 8-hour day. Working directly with C macros was the last thing needed to make this go fast.

Thanks for posting that, I enjoy such testimonials!

What about we build maybe a strategy to send D out there! We must let the world see the power of D.

Show them working code. This is a separate project I did after the one I posted about in my previous comment.

https://github.com/bachmeil/d-gslrng

It took only a few hours and there's over 7000 lines of C. There are some nice features of this project:

  • I made zero changes to the C code. Now that we have macro support, every line in the C files was copied and pasted. That means I get to reuse the decades of testing done on this popular library.
  • I was able to strip out a small part of a much larger library. If I were calling into a C library, I'd be stuck with whatever they give me.
  • There's no shared library dependency. That means support for every OS out of the box. No bindings or wrappers. Aside from the previous comment about stripping out most of the library, I can make changes to the functions if I want. With a shared library you either use what they give you or you maintain your own fork in order to share your work with others.
March 13

On Wednesday, 13 March 2024 at 19:18:20 UTC, bachmeier wrote:

>

On Sunday, 10 March 2024 at 09:34:28 UTC, Emmanuel Danso Nyarko wrote:

>

On Sunday, 10 March 2024 at 04:24:15 UTC, Walter Bright wrote:

>

On 3/9/2024 3:32 PM, Lance Bachmeier wrote:

>

I "ported" a few thousand lines of C to D in a couple hours this afternoon. That includes the time it took to put all C memory allocation inside SafeRefCounted. With the overhead out of the way (setting up the SafeRefCounted structs, testing, and some minor other things) I bet I could easily port 20,000 lines in an 8-hour day. Working directly with C macros was the last thing needed to make this go fast.

Thanks for posting that, I enjoy such testimonials!

What about we build maybe a strategy to send D out there! We must let the world see the power of D.

Show them working code. This is a separate project I did after the one I posted about in my previous comment.

https://github.com/bachmeil/d-gslrng

It took only a few hours and there's over 7000 lines of C. There are some nice features of this project:

  • I made zero changes to the C code. Now that we have macro support, every line in the C files was copied and pasted. That means I get to reuse the decades of testing done on this popular library.
  • I was able to strip out a small part of a much larger library. If I were calling into a C library, I'd be stuck with whatever they give me.

[snip]

Cool!

So this proves that importC works on a limited subset of gsl. Do you have any reason to believe it wouldn’t work on the whole library?

March 13

On Wednesday, 13 March 2024 at 20:49:01 UTC, jmh530 wrote:

>

On Wednesday, 13 March 2024 at 19:18:20 UTC, bachmeier wrote:

>

On Sunday, 10 March 2024 at 09:34:28 UTC, Emmanuel Danso Nyarko wrote:

>

On Sunday, 10 March 2024 at 04:24:15 UTC, Walter Bright wrote:

>

On 3/9/2024 3:32 PM, Lance Bachmeier wrote:

>

I "ported" a few thousand lines of C to D in a couple hours this afternoon. That includes the time it took to put all C memory allocation inside SafeRefCounted. With the overhead out of the way (setting up the SafeRefCounted structs, testing, and some minor other things) I bet I could easily port 20,000 lines in an 8-hour day. Working directly with C macros was the last thing needed to make this go fast.

Thanks for posting that, I enjoy such testimonials!

What about we build maybe a strategy to send D out there! We must let the world see the power of D.

Show them working code. This is a separate project I did after the one I posted about in my previous comment.

https://github.com/bachmeil/d-gslrng

It took only a few hours and there's over 7000 lines of C. There are some nice features of this project:

  • I made zero changes to the C code. Now that we have macro support, every line in the C files was copied and pasted. That means I get to reuse the decades of testing done on this popular library.
  • I was able to strip out a small part of a much larger library. If I were calling into a C library, I'd be stuck with whatever they give me.

[snip]

Cool!

So this proves that importC works on a limited subset of gsl. Do you have any reason to believe it wouldn’t work on the whole library?

I'd be surprised if there's anything it can't compile. I've compiled lots of other parts, but split this one out because I don't want to add hundreds of unnecessary files if all I want to do is generate random draws in parallel.

March 16

On Wednesday, 13 March 2024 at 19:18:20 UTC, bachmeier wrote:

>

On Sunday, 10 March 2024 at 09:34:28 UTC, Emmanuel Danso Nyarko wrote:

>

On Sunday, 10 March 2024 at 04:24:15 UTC, Walter Bright wrote:

>

On 3/9/2024 3:32 PM, Lance Bachmeier wrote:

>

I "ported" a few thousand lines of C to D in a couple hours this afternoon. That includes the time it took to put all C memory allocation inside SafeRefCounted. With the overhead out of the way (setting up the SafeRefCounted structs, testing, and some minor other things) I bet I could easily port 20,000 lines in an 8-hour day. Working directly with C macros was the last thing needed to make this go fast.

Thanks for posting that, I enjoy such testimonials!

What about we build maybe a strategy to send D out there! We must let the world see the power of D.

Show them working code. This is a separate project I did after the one I posted about in my previous comment.

https://github.com/bachmeil/d-gslrng

It took only a few hours and there's over 7000 lines of C. There are some nice features of this project:

  • I made zero changes to the C code. Now that we have macro support, every line in the C files was copied and pasted. That means I get to reuse the decades of testing done on this popular library.
  • I was able to strip out a small part of a much larger library. If I were calling into a C library, I'd be stuck with whatever they give me.
  • There's no shared library dependency. That means support for every OS out of the box. No bindings or wrappers. Aside from the previous comment about stripping out most of the library, I can make changes to the functions if I want. With a shared library you either use what they give you or you maintain your own fork in order to share your work with others.

I will admit that I didn't know what ImportC was all this time. I started gleaning it must be something where you can easily port C code and then thought it sounded like you could just use C code in D. That seemed like a great goal, but obviously that couldn't be it because D would be a lot more popular. Now you say this is true!? This is such an enormous benefit! This should be a huge driver for D. With this functionality, I could easily see it being the language of the year on tiobe, for example. Good work D team! I hope you can follow it up with some success in adoption.

March 17

On Saturday, 16 March 2024 at 18:47:40 UTC, harakim wrote:

>

That seemed like a great goal, but obviously that couldn't be it because D would be a lot more popular. Now you say this is true!?

The thing is, it is only very recently that it works well enough to be a practical way to incorporate C code into your project.

Initially it just compiled C code. The only problem is that there's very little C code in the wild. It's a mix of C, the preprocessor, and compiler extensions. Over time, that was addressed, but the one remaining (big) limitation was that it couldn't deal with function-like macros. Walter recently remedied that, so for the first time you can grab a 10,000-line .c file and have an expectation that it'll compile cleanly. The only issue I've had is a minor bug that has an easy workaround. Other than that, tens of thousands of lines of C code has compiled for me. Note that right now you need to use the DMD release candidate for 2.108.

>

This is such an enormous benefit! This should be a huge driver for D. With this functionality, I could easily see it being the language of the year on tiobe, for example.

It's hard to predict usage, but it's a darn good tool for working with a legacy C codebase. With module support, you can even add import statements to your C files to import D functions. I've used that in a couple cases to eliminate dependencies.

March 18

On Wednesday, 6 March 2024 at 10:46:48 UTC, RazvanN wrote:

>

On Wednesday, 6 March 2024 at 09:42:22 UTC, Sergey wrote:

>

On Wednesday, 6 March 2024 at 09:19:20 UTC, RazvanN wrote:

>

We see no realistic path for an evolution of C++

So the future of humanity is with JVM/Swift/Go/Rust?

Well, it might be D if we are able to convince people.

You don't need to convince people. The proof is in the pudding. Instead, a reddit explains much of this ------------------------------- title: Why is D unpopular? https://www.reddit.com/r/d_language/comments/q74bzr/why_is_d_unpopular/

reply to first comment by
koczurekk

2y ago :
randomguy4q5b3ty

4mo ago In that sense, I have always felt that D's features are just too general for their own good.


So, D is missing the KISS principle, Keep It Simple, Stupid! Do one thing and one thing well. Trying to be jack of all trades will make an expert in none.

So! Where does D have unmet potential to shine, and a pre-emptive strike against the rise of rivals, including Rust, and zombie language Java?

My answer: Industrial Robotics

If we can get a core rock solid industrial robotics set of libraries, D will sell itself. And the C, C++, Java/C++ and endless variants of C#, Objective C, this entire family of C descendants -- can move for 1 thing and 1 thing well, to D.

Is D Lang willing to take on such a task? Why or why not. What would need to happen for this?

March 18

On Monday, 18 March 2024 at 00:43:37 UTC, Dodobird wrote:

>

On Wednesday, 6 March 2024 at 10:46:48 UTC, RazvanN wrote:

>

On Wednesday, 6 March 2024 at 09:42:22 UTC, Sergey wrote:

>

On Wednesday, 6 March 2024 at 09:19:20 UTC, RazvanN wrote:

>

We see no realistic path for an evolution of C++

So the future of humanity is with JVM/Swift/Go/Rust?

Well, it might be D if we are able to convince people.

You don't need to convince people. The proof is in the pudding. Instead, a reddit explains much of this ------------------------------- title: Why is D unpopular? https://www.reddit.com/r/d_language/comments/q74bzr/why_is_d_unpopular/

reply to first comment by
koczurekk

2y ago :
randomguy4q5b3ty

4mo ago In that sense, I have always felt that D's features are just too general for their own good.


So, D is missing the KISS principle, Keep It Simple, Stupid! Do one thing and one thing well. Trying to be jack of all trades will make an expert in none.

So! Where does D have unmet potential to shine, and a pre-emptive strike against the rise of rivals, including Rust, and zombie language Java?

My answer: Industrial Robotics

If we can get a core rock solid industrial robotics set of libraries, D will sell itself. And the C, C++, Java/C++ and endless variants of C#, Objective C, this entire family of C descendants -- can move for 1 thing and 1 thing well, to D.

Is D Lang willing to take on such a task? Why or why not. What would need to happen for this?

from linkedIn post: ...Context is King Kong, and Consistency is King Kong's MOTHER!

https://media.licdn.com/dms/image/C4D12AQH_t0Tkls1dAg/article-inline_image-shrink_400_744/0/1597073878308?e=1715817600&v=beta&t=iaTKFdJ7itHmP1MxUlwxgxjD2jCiquHbkIKY11I39Mc

(focus daniel-san image)

from: https://www.linkedin.com/pulse/anatomy-linkedin-post-jeff-young

March 18

On Wednesday, 13 March 2024 at 21:13:31 UTC, bachmeier wrote:

>

On Wednesday, 13 March 2024 at 20:49:01 UTC, jmh530 wrote:

>

On Wednesday, 13 March 2024 at 19:18:20 UTC, bachmeier wrote:

>

On Sunday, 10 March 2024 at 09:34:28 UTC, Emmanuel Danso Nyarko wrote:

>

On Sunday, 10 March 2024 at 04:24:15 UTC, Walter Bright wrote:

>

On 3/9/2024 3:32 PM, Lance Bachmeier wrote:

>

I "ported" a few thousand lines of C to D in a couple hours this afternoon. That includes the time it took to put all C memory allocation inside SafeRefCounted. With the overhead out of the way (setting up the SafeRefCounted structs, testing, and some minor other things) I bet I could easily port 20,000 lines in an 8-hour day. Working directly with C macros was the last thing needed to make this go fast.

Thanks for posting that, I enjoy such testimonials!

What about we build maybe a strategy to send D out there! We must let the world see the power of D.

Show them working code. This is a separate project I did after the one I posted about in my previous comment.

https://github.com/bachmeil/d-gslrng

It took only a few hours and there's over 7000 lines of C. There are some nice features of this project:

  • I made zero changes to the C code. Now that we have macro support, every line in the C files was copied and pasted. That means I get to reuse the decades of testing done on this popular library.
  • I was able to strip out a small part of a much larger library. If I were calling into a C library, I'd be stuck with whatever they give me.

[snip]

Cool!

So this proves that importC works on a limited subset of gsl. Do you have any reason to believe it wouldn’t work on the whole library?

I'd be surprised if there's anything it can't compile. I've compiled lots of other parts, but split this one out because I don't want to add hundreds of unnecessary files if all I want to do is generate random draws in parallel.

Yes, a strategy. Without it business will say 不靠谱 (boo cow poo, aka unreliable) and flee. You never wanna hear that from customers, and when you do, bust your ass to build trust that was lost.

If you don't know where you are going, and road will get you there.

(lyrics) But she wants everything
(He can pretend to give her everything)
Or there's nothing she wants
(She don't want to sort it out)
He's crazy for this girl
(But she don't know what she's looking for)
If she knew what she wants
He'd be giving it to her
Giving it to her
I'd say her values are corrupted
But she's open to change
Then one day she's satisfied
And the next I'll find her crying
And it's nothing she can explain ------

If She Knew What She Wants
Song by The Bangles 1986
https://www.youtube.com/watch?v=mu_pNeqAQ-U