Official DMD compiler written in D
Timon Gehr
timon.gehr at gmx.ch
Wed Jan 9 19:37:03 PST 2013
On Wednesday, 9 January 2013 at 12:29:07 UTC, Philippe Sigaud
wrote:
> On Wed, Jan 9, 2013 at 12:05 PM, Timon Gehr <timon.gehr at gmx.ch>
> wrote:
>> Yes, it is in D. Nothing is released yet. It needs to be
>> polished a little
>> so that there are no known embarrassing shortcomings anymore.
>
> What? That's FOSS, release early, release often!
>
I want to release it at a time when I am ready to cope with
reactions and bug reports.
>
>
>> Also, it obviously needs a repl. :-)
>
> Obviously.
>
Actually, at this point, the main challenge is getting the
interactive code editing to work.
> And direct programmatic access to the lexer and the parser. I'm
> coding
> a macro system for D right now, as an over-layer above DMD
> (like rdmd)
> and having to create the AST by myself to transform them
> according to
> the user-defined macros is a pain.
>
>> CTFE is basically done (as a portable byte code interpreter,
>> but other
>> strategies, such as JIT, could be easily plugged).
>
> Great!
>
>> This is a snippet of my regression test suite:
>>
>> auto dynRangePrimes(){
>> DynRange!int impl(int start)=>
>>
>> dynRange(cons(start,delay(()=>filter!(a=>a%start)(impl(start+1)))));
>> return impl(2);
>> }
>>
>> static assert(array(take(dynRangePrimes(), 20)) ==
>> [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71]);
>
> Lazy recursive range, right? As the usual Haskell definition
> for a prime generator. Nice!
>
It uses the usual range templates + dynRange, which wraps a range
using delegates in order to hide some static type information and
allow recursion.
>> I also need to decide on a licence.
>
> Unless you've reason not to, I'd advise using the same as
> Phobos: Boost.
>
I'll need to give it some thought, my knowledge about licensing
is still rather limited.
>> I assume that the alpha will be out in late spring. (I am busy
>> until early spring.)
>
> You can count me in to test it (I gather to prefer to code this
> as you see fit, right now).
Thanks!
> You could also present it at the D conf.
>
I'd like to, but I probably cannot make it.
>
> In any cases, congratulations for what seems to be a elegantly
> done D implementation.
Thanks! (Well, it makes extensive use of string mixins to
simulate a coroutine-based system with low overhead.)
More information about the Digitalmars-d
mailing list