[antlr-interest] Thanks

Christian Schladetsch christian.schladetsch at gmail.com
Fri Jun 5 16:16:50 PDT 2009


Hi Stephen,

Well, I started my own development company last year, so I can solve
problems how I wish to these days ;)

I am in the games industry, and have been contracted to provide a next-gen
graphics rendering system. The current solutions are either all cludgy or
without sufficient control, so I created a DSL for a technique-based system.

It is similar to Microsoft's ID3DXEffect system, but also supports
fragment-level linking and technique inheritance. This has cut down the
number of shaders/techniques that had to be written and maintained from a
few hundred to just about ten, and also spans the HLSL/C++ boundary, making
the shaders and their uniforms all statically type-safe.

I finally did it all "the right way", with a lexer, parser, AST, and ST
outputs. Yes, it's quite complicated, I mean in some files you are using 3
different languages simultaneously and you have to think at a few different
levels sometimes, but its fast, it generates great code, and the DSL itself
is really easy to use and maintain. The thing about using ST is that you
don't really need any 'backend' at all; you generate your output directly
from the string templates. It took me a while to get my head around how to
use it well, but now that I have made a production system from end-to-end
using ANTLR/ST, I look forward to making my next DSL!

There are a lot of benefits to using DSL's. Microsoft knows this too, they
are adding more and more support into VisualStudio and .NET for DSL's, but I
think there will always be a high barrier to entry because DSL-based
solutions are seen as 'over-kill'. In reality of course, you end up making
the DSL anyway, it just comes out of the system, but IMO its best to be
explicit about it.

As we know, inside any sufficiently complex C program is a badly written
Lisp interpreter. I think similarly, inside any sufficiently complex C++
application is a badly written DSL...

Anyway, Cheers guys,
Christian.

On Sat, Jun 6, 2009 at 6:35 AM, J. Stephen Riley Silber
<jsrs701 at yahoo.com>wrote:

> Wow, Christian, tell me how you convinced your company to let you do this.
> I tried to get a company to use a DSL to make their custom app development
> about 50 times more efficient, but to no avail.  They literally thought
> things like "inventing a human-usable language" was impossible, and instead
> make their developers code in a crappy XML tree editor.  ugh.
>
> Yes, ANTLR is da bomb.  I look forward to using StringTemplate now, too.
> :-)
>
> --- On *Fri, 6/5/09, Christian Schladetsch <
> christian.schladetsch at gmail.com>* wrote:
>
>
> From: Christian Schladetsch <christian.schladetsch at gmail.com>
> Subject: [antlr-interest] Thanks
> To: antlr-interest at antlr.org
> Date: Friday, June 5, 2009, 1:48 AM
>
> Hi Guys,
>
> I will not go into details, even though I would love to. I have used ANTLR
> and StringTemplate for a number of years. With various outcomes. I burst
> with pride at my latest results, enabled by ANTLR etc, so am posting this.
>
> Terrence, yes, you are correct, ANTLR and StringTemplate are good ways of
> doing things. You have created a remarkable system that works across many
> languages and reduces effort by orders or magnitude. By using a DSL based on
> ANTLR, I have cut production times by ten.
>
> Thanks,
> Christian.
>
> http://www.linkedin.com/in/christianschladetsch
>
>
> -----Inline Attachment Follows-----
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090606/dda0d6f6/attachment.html 


More information about the antlr-interest mailing list