Hacker News new | ask | show | jobs
by bytK7 1617 days ago
Looking at this reminds me strongly of texthon, but with a less attractive syntax. A quick skim through the source appears to show a similar use of eval.

Too bad texthon is essentially unknown and unmaintained, as far as I know. I worked on a project with it for several years and it always worked really well and was much more pleasant to use than something like jinja. Maybe I need to make a modern fork…

Anyway, anyone interested in cog should check it out as well.

1 comments

Texthon seems like a bog-standard templating langage, nothing to do with cog but in the barest most remote commonalities of executing code to output text.
You’re right, I realize now that cog doesn’t process an input template but the actual output file, modifying it in place. Perhaps that why it took so long to gain popularity: that fact seems somewhat non-obvious from the documentation. Even the examples on a cursory glance are not obviously not templates. At least to me.

Re-reading the docs I realize that sure enough, they say very clearly what it does. But I think it just doesn’t click immediately.

Now that get it, I have a few problems coming to mind that I can solve with cog that I didn’t have a great solution to before. So I’m jumping on the bandwagon.