how to build up the library..

Regan Heath regan at netmail.co.nz
Thu Oct 6 09:18:54 PDT 2011


On Thu, 06 Oct 2011 15:47:03 +0100, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> On 10/6/11 5:25 AM, Regan Heath wrote:
>> I've been lurking and contributing to this news group on and off for
>> years (since 2005/2006, maybe earlier). But, in all that time I have
>> contributed nothing to Phobos. I have contributed a set of
>> digest/hashing routines to Tango, because at the time Phobos wasn't
>> taking submissions. I have been meaning to clean my originals of these
>> up, get them properly documented, etc and submit them for review for
>> Phobos, but I just haven't had the time, and/or inclination to do so (my
>> free time is precious and I've just not been feeling the urge/itch to
>> code.. blame minecraft :p)
>>
>> However, I am more than happy to hand them off in their current state to
>> anyone who does have both time and inclination .. and I wonder how many
>> other blocks of code are out there, just like mine, just waiting for the
>> right person to take charge of them. Would this be useful do you think?
>> Or would the time it takes someone to pick up new code, learn it, fine
>> tune it and document it.. etc be more than if they just started again
>> from scratch. It seems to me that sometimes, all that is needed to get a
>> new module off the ground is a working prototype for the guts of it,
>> which is what people like me who have some experience/knowledge but
>> little time/energy could do, before handing it to someone who has a
>> better idea of the D/Phobos 'way' and can organise the guts into a well
>> formed module which complies with D style and Phobos guidelines etc.
>>
>> Part of what puts people off (I suspect) is the 'relative' complexity of
>> submitting code (obtaining/learning GIT etc), the standard the code
>> needs to be at (well organised, documented etc), and the implied
>> promise/commitment that submitting code brings with it (that you'll hang
>> around and maintain it). But, what if we were to create a system where
>> people could submit code, no strings attached, in any state (they would
>> define the state they believe it to be in) for the more dedicated
>> contributors to pick up, clean up, and include as and when they could?
>> It could be as simple as a web page, where code is pasted, files
>> attached, and a license waiver agreed to.
>>
>> I know I have several pieces of code floating about the place which do
>> useful things and would be motivated to create more if it would help the
>> effort, and I could get a mention in the comments at the top of the
>> finished module :p
>
> Thanks for your thoughts and generosity. It's great you are sharing your  
> code in the hope it adds value to the community.

That's just it however, I am not generous enough with my time to be of use  
to you/D/phobos.  I spend my free time doing other things, and not working  
on the code I have which could be of use.  I suspect there are quite a  
number of people out there who are just like me.  People who have some  
code which may be of use, in varying degrees of completeness from just an  
idea to a pretty much complete re-usable library which just needs the  
final touches etc.

If we collect these pieces of code somewhere and make it searchable then  
anyone could pick up a piece and re-use it, or work on it, or .. well  
anything they want.  That's all I'm suggesting, that we create a "well of  
lost code" and let people dump things there.

> Also, if past is indicative of future, it's possible but unlikely that  
> someone will take your code, bring it to perfection, and go through the  
> hurdles of submitting it to Phobos.
>
> Making a body of code into a reusable library is often comparable work  
> with writing the code itself. It's also seen by many as unpleasant work,  
> which means most people would be more motivated to do it for their own  
> work rather than others'.

You're probably right, people prefer their own code.  And, doing the work  
required to get something to the level required for Phobos is not as  
pleasant as hacking away at more 'exciting' things, this is exactly why my  
code remains incomplete (from a Phobos submission point of view).  But,  
they don't have to work on 'my' code, they might take it and tear it to  
pieces and only really take the ideas away to create something new.  The  
point is, it's a starting point.

> Things have changed a lot in the way D is evolving. This includes  
> migration to git, opening the compiler, runtime, and standard library  
> for contributions, and a review process for adding to the standard  
> library. Focusing on the last aspect, this has been a big change from  
> the previous approach in which the standard library was closed, and from  
> an awkward stage in which we were inclined to accept somewhat random  
> contributions (encoding, xml, json) without much due process.
>
> By any measure I can think of, establishing a review process has been a  
> tremendous success, and everything else failed. We have std.datetime,  
> std.parallelism to show, and there are many more to come. The difficulty  
> in carrying through a Phobos submission also means establishing a strong  
> esprit de corps, a commitment to quality, and a sense of meaningfully  
> moving things forward together.

Sure, all this is true.  The new model works and is great.  I'm not  
suggesting a replacement for that, but rather a resource which might aid  
it.

> As far as I know many other open source projects follow a similar model.  
> There is essentially no evidence in this space to suggest that your  
> hypothetical model of development would work.

The size of a contribution for phobos is (one complete module) whereas in  
many open source projects you can contribute as little as a line of  
code/fix for a problem.  The goal of this idea is to lower the bar for  
"contributions" and "contributors" to include more people and more code  
until even very small ideas/examples may eventually contribute to the  
whole if only indirectly.

In any case, it's just an idea :p

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/


More information about the Digitalmars-d mailing list