Jump to page: 1 2
Thread overview
Is modern D ready for "embedded first" paradigm?
Oct 10, 2023
Dmitry Ponyatov
Oct 10, 2023
Dmitry Ponyatov
Oct 10, 2023
Paulo Pinto
Oct 11, 2023
Dmitry Ponyatov
Oct 11, 2023
Imperatorn
Oct 11, 2023
Imperatorn
Oct 11, 2023
Paulo Pinto
Oct 12, 2023
Dukc
Oct 12, 2023
Dukc
Dec 11
Dukc
Dec 11
IGotD-
Dec 08
IGotD-
October 10, 2023

Reading some posts about the D language here and there I found some opinion that D is not popular because it still did not find its kill features set and application domain.

What do you think about promoting D lang as a main development language for embedded, IoT, and real-time multimedia & automation applications?

Is D ready in its current state (including runtime, stdlib and side libraries) to follow the cross-compile way as a main method of its usage? (GDC/LDC)

Many decades the classical C and some limited set of C++ plays in this area, but nowadays embedded (Arduino, Raspberry, etc) raised its usage among hobbits and not so qualified and non-professional programmers and users. Maybe this directon can push the D language in its evolution and popularity, as people now needs some multiplatform optimizing compiler for rich and handy language but not so complex as classical C, or mbed/Arduino-like C++ dialects?

October 10, 2023

Also, under the more wide "cross-compile first" paradigm I mean that all D toolchains should be sharpened for building and testing projects transparently for multimple (and any if possible) hw/OS targets, at least for Windows[wine,mingw32/64]/Linux/MacOS running build under the same big-three hosts.

October 10, 2023

On Tuesday, 10 October 2023 at 06:39:14 UTC, Dmitry Ponyatov wrote:

>

Reading some posts about the D language here and there I found some opinion that D is not popular because it still did not find its kill features set and application domain.

What do you think about promoting D lang as a main development language for embedded, IoT, and real-time multimedia & automation applications?

Is D ready in its current state (including runtime, stdlib and side libraries) to follow the cross-compile way as a main method of its usage? (GDC/LDC)

Many decades the classical C and some limited set of C++ plays in this area, but nowadays embedded (Arduino, Raspberry, etc) raised its usage among hobbits and not so qualified and non-professional programmers and users. Maybe this directon can push the D language in its evolution and popularity, as people now needs some multiplatform optimizing compiler for rich and handy language but not so complex as classical C, or mbed/Arduino-like C++ dialects?

Go, Java, C#, F#, Rust are already there, with direct CPU vendor support in some of their SDKs.

Yes it would be nice to make D part of that list, however just like in other domains there is at least a decade of tooling to catch up with.

October 11, 2023
>

Go, Java, C#, F#,

on 20K RAM microcontroller? 8)

or on a Raspberry-like board controls some CNC machine or 3D printer in hard realtime?

>

Rust are already there,

maybe, but in my experience Rust totally unacceptable not only by newbies in home&hobby control, but even with people with more then twenty years of coding -- I mean in original post, that D can catch this market segment even comparing to C++

October 11, 2023

On Wednesday, 11 October 2023 at 00:45:40 UTC, Dmitry Ponyatov wrote:

> >

Go, Java, C#, F#,

on 20K RAM microcontroller? 8)

or on a Raspberry-like board controls some CNC machine or 3D printer in hard realtime?

>

Rust are already there,

maybe, but in my experience Rust totally unacceptable not only by newbies in home&hobby control, but even with people with more then twenty years of coding -- I mean in original post, that D can catch this market segment even comparing to C++

Imo D is ready. BetterC exists. ImportC exists. There's nothing stopping us.

October 11, 2023

On Wednesday, 11 October 2023 at 05:38:43 UTC, Imperatorn wrote:

>

On Wednesday, 11 October 2023 at 00:45:40 UTC, Dmitry Ponyatov wrote:

> >

Go, Java, C#, F#,

on 20K RAM microcontroller? 8)

or on a Raspberry-like board controls some CNC machine or 3D printer in hard realtime?

>

Rust are already there,

maybe, but in my experience Rust totally unacceptable not only by newbies in home&hobby control, but even with people with more then twenty years of coding -- I mean in original post, that D can catch this market segment even comparing to C++

Imo D is ready. BetterC exists. ImportC exists. There's nothing stopping us.

Also, this exists:
https://forum.dlang.org/thread/giigcnoyxfoxxaevjmxy@forum.dlang.org

And this:
https://wiki.dlang.org/Programming_in_D_tutorial_on_Embedded_Linux_ARM_devices

And this:
https://wiki.dlang.org/D_on_AVR

And this:
https://wiki.dlang.org/D_on_esp32/esp8266(llvm-xtensa%2Bldc)_and_how_to_get_started

And this is a good resource:
https://github.com/WebFreak001/avrd

Some extra reading:
https://github.com/JinShil/stm32f42_discovery_demo

October 11, 2023

On Wednesday, 11 October 2023 at 00:45:40 UTC, Dmitry Ponyatov wrote:

> >

Go, Java, C#, F#,

on 20K RAM microcontroller? 8)

Only on your dreams does D fit into a 20K controller, when even ISO C doesn't.

Yes, maybe with betterC there is a subset that one can make into it, but that isn't D, just like C dialects that fit into such controllers, full with language extensions aren't ISO C proper.

And yes, if dialects are allowed, there are also microcontroller versions.

>

or on a Raspberry-like board controls some CNC machine or 3D printer in hard realtime?

>

Rust are already there,

maybe, but in my experience Rust totally unacceptable not only by newbies in home&hobby control, but even with people with more then twenty years of coding -- I mean in original post, that D can catch this market segment even comparing to C++

Since a market reality check seems to be required, instead of me just telling they exist out there.

Java:

https://www.ptc.com/en/products/developer-tools/perc

https://www.aicas.com/wp/products-services/jamaicavm/

https://www.microej.com/product/sdk/

https://developer.itron.com/

Go:

https://www.withsecure.com/en/solutions/innovative-security-hardware/usb-armory

https://tinygo.org/

F# / C#:

https://www.wildernesslabs.co/

https://www.nanoframework.net/

Rust:

https://ferrous-systems.com/blog/announce-esp-training/

https://techcommunity.microsoft.com/t5/internet-of-things-blog/modernizing-embedded-development-on-azure-sphere-with-rust/ba-p/3699383

https://www.adacore.com/gnatpro-rust

https://www.windriver.com/products/vxworks/datasheet

Ada:

https://www.adacore.com/

https://www.ghs.com/products/ada_optimizing_compilers.html

https://www.ptc.com/en/products/developer-tools/apexada

https://www.ddci.com/products_score/

http://www.irvine.com/tech.html

http://www.ocsystems.com/w/index.php/OCS:PowerAda

http://www.rrsoftware.com/html/prodinf/janus95/j-ada95.htm

A not exhaustive list of production quality toolchains, some of them more than a decade in production and existing customer base.

October 12, 2023

On Tuesday, 10 October 2023 at 06:39:14 UTC, Dmitry Ponyatov wrote:

>

Reading some posts about the D language here and there I found some opinion that D is not popular because it still did not find its kill features set and application domain.

What do you think about promoting D lang as a main development language for embedded, IoT, and real-time multimedia & automation applications?

Is D ready in its current state (including runtime, stdlib and side libraries) to follow the cross-compile way as a main method of its usage? (GDC/LDC)

If we're talking about a a bare-metal real-time application in a microcontroller, honestly no. D can do this sort of thing but it's not currently it's strong area. You're almost without library support in those platforms. Phobos does work with -betterC (or generally without a full-featured DRuntime) but it means continuously dealing with all sorts of incompatibilities and corner cases.

However, if we're talking about something like Raspberry Pi embedded applications, I could see D being a much better option - I haven't tried myself though so listen to anyone who has.

October 12, 2023

On Thursday, 12 October 2023 at 07:06:15 UTC, Dukc wrote:

>

If we're talking about a a bare-metal real-time application in a microcontroller, honestly no. D can do this sort of thing but it's not currently it's strong area. You're almost without library support in those platforms. Phobos does work with -betterC (or generally without a full-featured DRuntime) but it means continuously dealing with all sorts of incompatibilities and corner cases.

That said, D is still a better choice than C in my opinion. But if the platform in question has a good standard library support in Java, C#, Python, Rust or Go, they are likely more practical.

December 08

On Thursday, 12 October 2023 at 07:06:15 UTC, Dukc wrote:

>

If we're talking about a a bare-metal real-time application in a microcontroller, honestly no. D can do this sort of thing but it's not currently it's strong area. You're almost without library support in those platforms. Phobos does work with -betterC (or generally without a full-featured DRuntime) but it means continuously dealing with all sorts of incompatibilities and corner cases.

First (and most importand) step to achieve support of bare-metal platforms is druntime implementation.

Before, I successfully implemented druntime hacks for checking possibility of work D (not betterC!) on STM32 platform ("Hello, world!" and druntime unittests are passed): https://github.com/denizzzka/d_c_arm_test

Unfortunately, without changes to the existing druntime code organization it seems to impossible to support different non-mainstream architectures. And, at first, this applies to embedded ones.

Therefore, please support (or give constructive criticism feedback) this initiative:
https://forum.dlang.org/post/jdfwovvqdcusjphehwzx@forum.dlang.org - this link explains everything in more detail
https://github.com/dlang/dmd/pull/15822 - here is PR with additional info

« First   ‹ Prev
1 2