<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 26, 2016 at 7:54 AM, Sönke Ludwig <span dir="ltr"><<a href="mailto:digitalmars-d-announce@puremagic.com" target="_blank">digitalmars-d-announce@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">Am 26.07.2016 um 05:22 schrieb Puming:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
On Monday, 25 July 2016 at 09:29:38 UTC, Sönke Ludwig wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
The Diet template language is aimed at providing a way to define<br>
procedurally generated HTML/XML pages (or other output formats), with<br>
minimal visual noise. Syntax and feature set are heavily inspired by<br>
Jade <<a href="http://jade-lang.org/" rel="noreferrer" target="_blank">http://jade-lang.org/</a>>, but instead of JavaScript, all<br>
expressions and statements are D statements, and everything that can<br>
be done at compile-time is done at compile-time.<br>
<br>
[...]<br>
</blockquote>
<br>
A feature I want the most for Diet is the ability to parse Diet<br>
templates at RUNTIME instead of compile time with a switch, similar to<br>
Regex/CtRegex.<br>
<br>
In this way one can do quick turnarounds in dev mode, tweaking little<br>
corners of the pages, and then when a page is finished, it can be<br>
switched to compile mode for faster render time.<br>
<br>
Do you think this is feasible?<br>
</blockquote>
<br></div></div>
A real runtime solution would require a D runtime interpreter or JIT compiler. There would be an alternative solution based on compiling each template to a shared library and then dynamically recompiling/reloading those as required, but that currently doesn't work due to the alias parameter based interface of render!(...).<br>
<br>
However, what should work well is a combination of <a href="https://github.com/dlang/dub/pull/446" rel="noreferrer" target="_blank">https://github.com/dlang/dub/pull/446</a> and <a href="https://github.com/rejectedsoftware/vibe.d/pull/1385" rel="noreferrer" target="_blank">https://github.com/rejectedsoftware/vibe.d/pull/1385</a> - I'll merge the latter one into vibe.d master today. It will require to store session information and similar things in an external store, and on Linux the Gold linker should be used for speed, but then it should be almost as good as a runtime solution.<br>
</blockquote></div><br></div><div class="gmail_extra">!! nice, this is going to make my work life so much easier.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks <span style="font-size:9.6px;white-space:nowrap">Sönke!</span></div><div class="gmail_extra"><br></div></div>