DMD versions

Christopher Bergqvist chris at digitalpoetry.se
Wed Feb 23 09:56:03 PST 2011


I've had an idea lately on that note. I'd think it would be cool if
rdmd (not standard dmd) had support for this style of import magic:

// @grab url:http://someserver.com/somelib/v1.0/src/somelib/somemodule.d
size:4321 sha1:2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
import somelib.somemodule;

The hash & size of the file are there to make it very hard for someone
to take over someserver.com and put malicious code there which people
would download & run.

rdmd could also have options for turning this feature off/on or into
interactive mode where the user has to accept each download. Lets role
some local cashing in there while we're at it also. :) Refraining from
having a hash & size in there could be useful for unstable code but
those imports should not be used without conscious input from the
user. One could be allowed to view the code before typing "yes" and
having the code put into the cache.

On Wed, Feb 23, 2011 at 9:16 AM, Russel Winder <russel at russel.org.uk> wrote:
> On Tue, 2011-02-22 at 22:29 -0800, Walter Bright wrote:
> [ . . . ]
>> Just for fun, try:
>>
>>     dmd -man
>>
>> !!
>
> That presupposes you are connected to the Internet.  Much of the time I
> am not.  I appreciate this is an almost heretical position to be in but
> mobile Internet hasn't actually arrived despite being sold.
>
> Interestingly, or not, Go allows for imports to refer to non-local
> Bazaar, Mercurial and Git repositories without local caching which means
> you can't compile code unless you are connected to the Internet.  Don't
> let D go (!) this route.
>
> --
> Russel.
> =============================================================================
> Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
> 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at russel.org.uk
> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
>


More information about the Digitalmars-d mailing list