October 01

On Friday, 27 September 2024 at 18:49:27 UTC, Imperatorn wrote:

>

In your opinion, what is the selling point of D, the top 3 use cases where D would be a nice fit?

D has struggled to find a niche (because it's so flexible?), but is that also why it hasn't seen wider adoption?

What do you think are the top 3 places where you think "I could use D here instead of {language} because {reasons}"?

I dont know what it would be useful for in the wider context of software development I will just explain my use case.
I work in a fast paced industry where there are new things every single week, its art based and I need to write scripts to generate things very quickly they are one off and never used again, D is better for this than most other languages the only languages I found that were better for scripting were languages like Common lisp, scheme, and julia, languages like that are fast to write and fast to run. (obviously not including libraries otherwise python would be the best, as I prefer to write the code and not use libraries)

my second use case is long term production code for generating things for work, it needs to work for a long time, and be extended with scripts in emergencies, the production code also needs to be graphical at least at some point.

D is the only language I have found that allows me to do both the scripting workflow and production workflow in one language, every single other language I have tried has some major barrier, I checked dozens of programming languages, most have obvious issues where I didnt need to write any code to see it wasnt useful, like I refuse to use an interpreted language, or were too new for me to trust as I am going to be using the language for many years.

I think one reason people dont use D is because its good at everything, its good at scripting and production code, but for scripting its not as good as other languages, and for production code its not as good as other languages, most people are extreme in either of those directions, few people want balance, thus why they use Rust or Go for production, and python for scripting.

realistically I think its easy to prove its a dumb approach as many companies have spent millions of dollars re writing there python back-ends in faster languages, if they would have used D it literally would have saved millions of dollars, it should be an easy sell, D will save you money because worse case scenario you can always make your code faster, if you cant its a problems with your skills, not the language.

so to answer your questions D's best niche at least in my opinion is any situation where its a good idea to write a script first and write production code later, which is virtually everything.

October 08

On Tuesday, 1 October 2024 at 02:56:11 UTC, Atila Neves wrote:

>

Subjectively, because D is the language that annoys me the least. Objectively, because I write less code with fewer bugs that does a lot more. In what other language can I write a dub package* that autowraps D code so it can be called in Excel and/or Python in two lines, one of which is an import??

In any language with a decent macro system: Nim and probably Rust, Elixir and Julia...

October 09

On Tuesday, 8 October 2024 at 20:07:38 UTC, Araq wrote:

>

On Tuesday, 1 October 2024 at 02:56:11 UTC, Atila Neves wrote:

>

Subjectively, because D is the language that annoys me the least. Objectively, because I write less code with fewer bugs that does a lot more. In what other language can I write a dub package* that autowraps D code so it can be called in Excel and/or Python in two lines, one of which is an import??

In any language with a decent macro system: Nim and probably Rust, Elixir and Julia...

In Rust's case, at least, it would be a lot more code, and a lot more complicated. In D it's straightforward imperative code.

C++ is turing-complete at compile-time just as well as D is. But a lot harder to do.

October 18

On Friday, 27 September 2024 at 18:49:27 UTC, Imperatorn wrote:

>

In your opinion, what is the selling point of D, the top 3 use cases where D would be a nice fit?

D has struggled to find a niche (because it's so flexible?), but is that also why it hasn't seen wider adoption?

What do you think are the top 3 places where you think "I could use D here instead of {language} because {reasons}"?

  1. Avoid split language development in Python + C
  2. Deploy self-contained binaries without the need for a separate ecosystem (Python, Java, C#)
  3. Have technical problems solved by a small focused community instead of working in a language where you're too unimportant to consider (all the big players).

My major reason for trying out D in the first place was to move away from split language development in Python + C. I wanted something with brevity of Python, the speed of C but with a full-featured standard library. I didn't need a GUI, because I mostly write server-side processes. While searching around I tried Rust, D and Go and settled on D.

I had spent about 5 years as a C++ developer, and some time writing Java so the overall syntax felt familiar and the garbage collector sealed the deal. Finally as an experienced developer, I wanted a toolset and community that didn't preach about the "One Right Way" to program, but just provided support for whatever I was trying to do. D's flexibility is one of it's best features from my point of view.

In my own personal opinion, the major draw back of D was that the standard library contained no GUI widgets. Yes there were libraries, but unlike Java Swing, there was nothing officially maintained and distributed as part of the core toolset. To me, this was a major problem and why D remained a niche language among work-a-day programmers. These days Javascript has taken over as everyone's GUI dev language, so it doesn't matter as much, but it certainly would have helped adoption during the 2005 - 2015 decade.

October 19

On Friday, 18 October 2024 at 20:06:42 UTC, Chris Piker wrote:

>

In my own personal opinion, the major draw back of D was that the standard library contained no GUI widgets. Yes there were libraries, but unlike Java Swing, there was nothing officially maintained and distributed as part of the core toolset. To me, this was a major problem and why D remained a niche language among work-a-day programmers. These days Javascript has taken over as everyone's GUI dev language, so it doesn't matter as much, but it certainly would have helped adoption during the 2005 - 2015 decade.

Sure, D didn't distribute Tk like some scripting languages have been doing for a long time, but it was very easy to use. It's hard to imagine that being a dealbreaker. The programmers would have still needed to get approval from their managers.

October 20

On Saturday, 19 October 2024 at 03:13:02 UTC, Lance Bachmeier wrote:

>

Sure, D didn't distribute Tk like some scripting languages have been doing for a long time, but it was very easy to use. It's hard to imagine that being a dealbreaker. The programmers would have still needed to get approval from their managers.

Since my perspective is limited to the environments I know, and I've never worked in industry, I wouldn't presume to claim any expertise in that arena.

However in academia, teams are often rather small and independent work is encouraged. A single person can demonstrate something quite useful on their own volition. Since demonstrating something useful often involves a GUI, it's nice to have one come along for the ride.

Almost all rapid prototyping environments provide some GUI capability (ex: MATLAB) and I see engineers and students whipping up reasonable tools using them all the time. D lends itself to rapid prototyping, but does not have a simple included GUI lib. While not a deal breaker, it's a hindrance. Little bits of friction add up, and eventually the cart stops. Conversely, little bits of thrust also add up, and thinking back to my early days as a programmer, I happen to think this particular addition would have helped D take off.

Anyway, it's all academic at this point. Right now some sort of javascript bindings may be far more important since browsers are everyone's favorite GUI environment, and javascript can be really slow for some operations.

October 20

On Sunday, 20 October 2024 at 20:51:41 UTC, Chris Piker wrote:

>

On Saturday, 19 October 2024 at 03:13:02 UTC, Lance Bachmeier wrote:

>

[...]

Since my perspective is limited to the environments I know, and I've never worked in industry, I wouldn't presume to claim any expertise in that arena.

However in academia, teams are often rather small and independent work is encouraged. A single person can demonstrate something quite useful on their own volition. Since demonstrating something useful often involves a GUI, it's nice to have one come along for the ride.

Almost all rapid prototyping environments provide some GUI capability (ex: MATLAB) and I see engineers and students whipping up reasonable tools using them all the time. D lends itself to rapid prototyping, but does not have a simple included GUI lib. While not a deal breaker, it's a hindrance. Little bits of friction add up, and eventually the cart stops. Conversely, little bits of thrust also add up, and thinking back to my early days as a programmer, I happen to think this particular addition would have helped D take off.

Anyway, it's all academic at this point. Right now some sort of javascript bindings may be far more important since browsers are everyone's favorite GUI environment, and javascript can be really slow for some operations.

To some degree I thought GTK had become a default GUI library for many folks.

There's several tutorials here otherwise: https://gtkdcoding.com/

Perhaps something for Phobos3 to consider otherwise -- it's a big project, but maybe a few simple widgets to start could do the trick.

October 21

On Sunday, 20 October 2024 at 22:05:45 UTC, Mike Shah wrote:
javascript can be really slow for some operations.

>

To some degree I thought GTK had become a default GUI library for many folks.

There's several tutorials here otherwise: https://gtkdcoding.com/

Oh, never been to that page, didn't know it existed. Thanks for the tip!

Though, when I go there I don't see any instructions on how to "install" gtkd.

>

Perhaps something for Phobos3 to consider otherwise -- it's a big project, but maybe a few simple widgets to start could do the trick.

I think it's just a packaging / promotion issue. Right now if I install dmd on Windows I get a compiler and a package manager. Nice enough, and a great start. But a new user is left to google stack overflow to find out how to make a simple GUI. I just flipped through all the pages in the DLang tour and none of the them mention how you might get a window on the screen to display your output. There are nice sections on vibe.d and mir, but nothing for graphical output. That seems a bit odd on the surface.

A couple years ago I had to make a simple test control program for a lab apparatus we designed. There were many environments to chose from. I ended up selecting python because TK + matplotlib provided all the GUI portions that we needed to keep a technician from getting confused. Python provided beautiful plots, but ended up being somewhat of a pain because it's not easy to multi-thread and couldn't keep up with sensor output over a USB-C port, so C handled data collection. Would have been nicer to do everything in D, though I don't know what data plotting libs are recommended.

Anyway, D's a small community so selecting one windowing wrapper (SDL maybe?) and promoting it for simple jobs could be useful. Right now there are multiple projects but none has the guarantee of longevity that dmd and dub have. I presume something that's also useful for the embedded development crowd would be a good choice.

October 21

On Sunday, 20 October 2024 at 22:05:45 UTC, Mike Shah wrote:

>

To some degree I thought GTK had become a default GUI library for many folks.

There's several tutorials here otherwise: https://gtkdcoding.com/

Perhaps something for Phobos3 to consider otherwise -- it's a big project, but maybe a few simple widgets to start could do the trick.

I still use GtkD for my personal GUI stuff. Sadly that project is dead. I am not surprised as maintaining, supporting and improving it takes lots of time. One person simply can't do it. Kudos to Mike for doing this for years...

GUI toolkit should not be in Phobos in my humble opinion, but it must be one of the "core" projects supported by the D Language Foundation. Many people think it can be done by one or two persons, but they have no idea how wrong they are...

October 21

On Monday, 21 October 2024 at 03:51:05 UTC, Chris Piker wrote:

>

over a USB-C port, so C handled data collection. Would have been nicer to do everything in D, though I don't know what data plotting libs are recommended.

Some popular interfaces:
R's ggplot (based on Cairo) (https://code.dlang.org/packages/ggplotd)
Python's matplotlib (still need python installed) (https://code.dlang.org/packages/matplotlib-d)

But their capabilities are quite limited afaik.
So maybe consider to make plot in external library, or prepare some bindings.