Live data from Hacker News

Compiling a Static Web Site Using the C Preprocessor

ithare.com

1–7 of 7 posts

Re: Compiling a Static Web Site Using the C Preprocessor

#4
post #3

> 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...

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

Re: Compiling a Static Web Site Using the C Preprocessor

#5
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 is parsed as macros. /s

Re: Compiling a Static Web Site Using the C Preprocessor

#6

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 is parsed as macros. /s

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..."

Re: Compiling a Static Web Site Using the C Preprocessor

#7
post #6

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 is parsed as macros. /s

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..."

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.