[GSoC 2019] Interested in Baremetal D Runtime and project ideas
Mike Franklin
slavo5150 at yahoo.com
Sun Apr 7 04:07:43 UTC 2019
On Saturday, 6 April 2019 at 20:22:19 UTC, Stefanos Baziotis
wrote:
> I totally agree with all of these. What I roughly got from the
> project
> description was to achieve what Andrei said but without the
> dependencies to
> so much existing C/C++ code.
I don't see that Andrei objects much to the C/C++ dependency.
Afterall, he recently approved adding the C++ standard library to
the druntime: https://github.com/dlang/druntime/pull/2286
In fact, I find I'm in the minority when it comes to wanting to
replace `memcpy` and friends with templates. It's hard to
advocate for it right now because there isn't actually a way to
utilize it. That's why Dan's project is so important. Once Dan
is done and the other runtime hooks are converted to templates
the benefit of replacing `memcpy` and friend will become more
apparent. Until that work happens, we can't really utilize the
templatized versions of `memcpy` and friends and so it will be
difficult to measure real-world benefits. Once done however,
could replace `memcpy` and friends in the runtime and run some
real-world benchmarks on the DMD compiler, Phobos, and other D
projects to measure real benefit. And that's not to mention
turtles-all-the-way-down safety and purity guarantees provided by
the compiler.
I'm not sure who posted the original GSoC idea, so they'd have to
speak for themselves, but it appears to be a synthesis of things
I have been advocating for for a long time. It's not really
about creating a bare metal runtime, it's mostly just about being
able to use D for bare-metal programming in a pay-as-you-go
fashion.
> So what do you believe is the best way I can help?
Where to begin? There's so much work that needs to be done, I'm
not even sure where to start. At the moment, I'm just trying to
clean up some unfinished business in the compiler like converting
the last remaining C files in DMD to D, following through on
deprecations so we can be liberated from some technical debt, and
hopefully getting around to finishing
https://github.com/dlang/dmd/pull/9068 which is a prerequisite to
refactoring druntime enabling much of what I've been talking
about.
Probably the best thing you can do is focus on your proposal and
make it great. I hope those reviewing the proposals will be able
to see the relationship and natural progression with Dan's
proposal and yours and both will be selected.
For the past 5 years this has been my experience working on D:
https://www.youtube.com/watch?v=AbSehcT19u0
If you're anxious to get your hands dirty, you can start by
choosing a not-yet-converted runtime hook from
https://wiki.dlang.org/Runtime_Hooks and have at it. See
https://github.com/dlang/druntime/pull/2508 for another recent
example of another contributor getting busy.
https://github.com/dlang/dmd/pull/9068 is a low barrier to entry
task that would help us out a lot.
You can also start stripping out utilities from Phobos (e.g.
std.traits, std.meta, std.conv, etc.) to create a no-dependency
utility library. Basically my "Suggestion 2" here:
https://forum.dlang.org/post/qooasdrdlrqdhghjwmus@forum.dlang.org
It could potentially serve as a starting point for std.v2 and
the opt-in continuum. See
https://forum.dlang.org/post/mailman.7799.1553797857.29801.digitalmars-d@puremagic.com for the thread where that was first proposed.
Mike
More information about the Digitalmars-d
mailing list