
Compiling a Static Web Site Using the C Preprocessor - davidthib
http://ithare.com/compiling-a-static-web-site-using-the-c-preprocessor/
======
YngwieMalware
Nice piece of history. You can see its age showing:

"Rather quickly it was realized that if you want to ensure a reasonable user
experience both on desktops and mobiles, there is absolutely no way you can
use the same HTML for both sites."

------
EvanPlaice
Congrats, you've re-discovered the same origin where PHP started nearly 20
years ago.

Maybe you could replace the generic c preprocessor dialect with a new domain
specific DSL. For instance one where macros can simply be embedded directly
into HTML. For instance everything between the <? and ?> is parsed as macros.
/s

~~~
krapp
I wonder if one could propose that "any sufficiently complicated static
website compiler contains an ad-hoc, informally specificed, bug ridden, slow
implementation of half of PHP..."

~~~
EvanPlaice
Haha, I never thought of it like that before.

That probably holds true for any one written in C. Maybe even some others that
use server-side view generation.

------
m6w6
> In fact, almost any kind of text processor can be used to compile web sites
> in a similar way to what has been described above (for example, m4 ...

I thought about m4 all the time while reading through that post...

~~~
Esau
The only time I ever used M4 was when trying to create a Sendmail
configuration. I really disliked it.

