December 08

On Friday, 8 December 2023 at 19:01:16 UTC, Denis Feklushkin wrote:

>

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

Forgot to add lovely "Hello, World!" video:
https://www.youtube.com/watch?v=PE6pMUA0vNQ

Nostalgia! Oh, how great it was! :-)

December 08

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?

D is about in the same league as C++. D has better C (or stripped object.d) in order to compile directly to object code without the need of any library. When you try to port the library, C++ and D both has the problem with that you need to port a lot of functionality in the STL/Clib first.

You have to keep in mind you need to separate small embedded systems (about 128K and less) IoT, multimedia. IoT and multimedia requires a full "rich OS" with a graphics stack and networking, which means full D and you would probably not use better C or similar.

For Arduinos and such which is commonly call microcontrollers, D can serve a purpose with better C. To be honest, the advantage of D starts to pay off when complexity goes up. If you want to blink a LED, then additional features of D isn't that much worth it and you probably will use the SDK that comes with the microcontroller.

December 09

On Friday, 8 December 2023 at 22:45:05 UTC, IGotD- wrote:

>

You have to keep in mind you need to separate small embedded systems (about 128K and less) IoT, multimedia. IoT and multimedia requires a full "rich OS" with a graphics stack and networking, which means full D and you would probably not use better C or similar.

Could be classified by other way: embedded which does not allocates memory during normal operation and which allocates

And, because of D has ability to easy and gracefuly handle allocation errors, so we can assume that D is better suited than C++ for "embedded multimedia" role

December 11

On Friday, 8 December 2023 at 19:01:16 UTC, Denis Feklushkin wrote:

>

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.

It doesn't necessarily need to be full support and probably won't be for a simple and small microchip project.

>

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.

Reorganisation of the sort you and Iain are pushing for certainly could help. However I think even more important is support for only a partially implemented DRuntime - if you don't use a runtime feature, D shouldn't require it being implemented. With the mainstream DRuntime this currently work badly because of the version (...) else static assert(0, "unsupported platform") paradigm, meaning one has to manually stub all of those. There should be a way to do this without manual work.

Dylan Grahams Lightweight DRuntime seems perfect for these use cases for me but haven't tried so far.

>

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

Not promising but I'll try to remember next time I'm hacking my own projects.

December 11

On Monday, 11 December 2023 at 07:59:43 UTC, Dukc wrote:

dmd/druntime/README.md:

Different compilers will likely have their own versions of DRuntime.

In my opinion, the idea of different DRuntimes for a different tasks should be considered as failed in 2023. It hasn't stood the test of time

December 11

On Monday, 11 December 2023 at 09:26:48 UTC, Denis Feklushkin wrote:

>

dmd/druntime/README.md:

Different compilers will likely have their own versions of DRuntime.

In my opinion, the idea of different DRuntimes for a different tasks should be considered as failed in 2023. It hasn't stood the test of time

They don't really have their own druntime but rather have their own adapted fork of the dmd druntime for compiler specific things like intrinsics. Still it is the same druntime with just a few modifications.

1 2
Next ›   Last »