[GSoC] Trying to find a good topic

Mike Franklin slavo5150 at yahoo.com
Fri Mar 22 02:03:05 UTC 2019


On Thursday, 21 March 2019 at 19:50:49 UTC, Dan Printzell wrote:

> I am planning on applying to GSoC but I'm having a bit of a 
> problem trying to
> decide on what I should do. My goal is to try and do something 
> that I will
> personally use in PowerNex and it is something that will help 
> the whole D
> community, this is why I am looking at dmd and betterC topics.

Hi Dan,

I've been a fan of your work, benefit greatly from your Arch 
Linux contributions, and admire what you've accomplished so far.  
( ̄^ ̄)ゞ  <-- That's supposed to be a salute.

I have been dreaming about this kind of work for years and did a 
lot of work in the 2017~2018 time-frame to move it along, but 
opportunity cost forced me to, at least temporarily, to focus my 
efforts elsewhere.  You're probably a much better D programmer 
and software engineer than I am, but I believe I can help you 
quite a bit in your quest if you're willing to engage me and hear 
me out.

Here are a few suggestions I have that I think will have the most 
beneficial impact on your existing goals and D as a whole

# Suggestion 1 - Replace Runtime Hooks with Templates
IMO the most important thing you can do to help D become more 
scalable to bare-metal-like platforms is to replace the runtime 
hooks [1] with templates.  I think this is what Johannes was 
alluding to in his reply.  This will not only remove the 
runtime/artificial dependency on `TypeInfo` (and therefore a 
dependency on classes as a whole), but it will also make druntime 
a "header-only" library that only requires libc as a dependency.  
Since -betterC only imports druntime, but doesn't link to it, it 
also will expand D language feature support for -betterC (though 
if this work were done, -betterC could even become obsolete).  
See my description at [2] and ask away if you'd like more 
details.  I'm not really qualified to mentor such a project, but 
I believe I can significantly reduce the barrier to entry should 
you wish to pursue this.

# Suggestion 2 - Create a No-dependency D Library
There are a lot of great utilities in Phobos that do not require 
the druntime (e.g. std.meta, std.traits, std.conv, and probably 
more).  What we need is a library that has NO DEPENDENCIES 
WHATSOEVER that can be imported into druntime and DMD to aid in 
their development.  Manu hinted on this with a proposal for 
`core.traits` [3], but I don't think we should stop there, and I 
had more to say about in a bit of a passionate brainstorm [4].  
This no-dependency-library, by its inherent nature, would bring a 
lot of the great features of Phobos and D to all kinds of 
programming, including bare-metal-like platforms.  It would also 
make DMD and druntime development much more productive and 
idiomatic D.

# Suggestion 3 - Port the Entire Runtime to ARM Cortex-M, RISCV, 
X64, {Insert your favorite hardware architecture}
IMO, Suggestion 1 and 2 are prerequisites for this, but if you 
really want to, try to get druntime, in its entirety, ported to a 
bare-metal platform of your choice.  You'll have to find some way 
to implement dynamic memory allocation and threads, but once that 
is done, I think it should be possible.  Though I recommend 
making it easy on yourself and implement Suggestion 1 or 2 first.

# Suggestion 4 - Replace Software Building Blocks with 
Implementations in D.
By software building blocks, I mean `memcpy`, `memcmp`, `malloc`, 
`free` etc.  This is a very unpopular topic, but if you were to 
work on Suggestion 1 and 2, you'd likely see this as a practical 
and worthwhile goal. If you're like most, however, you're 
probably thinking this is a waste of resources, so I'll defer 
elaborating on this for now.  Though, if you do happen to see 
what I see, go for it.

I am by no means an expert in DMD and druntime, but I did stumble 
around enough in the code in the 2017~2018 time-frame to know how 
to get started.  I'm not qualified to mentor such a project but I 
do believe I can help reduce the barrier to entry.  Let me know 
if you're interested in engaging with me and I'll do my best to 
help.  You can reach me on Slack under the handle JinShil, and I 
think you're clever enough to get my e-mail through the same 
handle at GitHub, should you choose to contact me that way.  Or 
we can just go nuts in this thread if you'd like.

Good Luck!

Mike

[1] - Runtime Hooks on the Wiki - 
https://wiki.dlang.org/Runtime_Hooks
[2] - Info on Replacing Runtime Hooks with Template - 
https://forum.dlang.org/post/hequvmostuhwnvcgrcge@forum.dlang.org
[3] - Move `std.traits` to druntime - 
https://forum.dlang.org/post/mailman.6241.1546722791.29801.digitalmars-d@puremagic.com
[4] - Me Dreaming About a More Scalable D - 
https://forum.dlang.org/post/dvbxqrcmyltgnikxdweb@forum.dlang.org



More information about the Digitalmars-d mailing list