News for hackers. Stuff that matters.
Re:Beautiful mini language for outputing HTML in Python by davidw on Tuesday December 29, 2009 @01:03PM (#1020901)
It's not the verbosity or lack of it that makes it shareable, it's the fact that it's a standard.

Some of these inventions are a bit nicer than the original thing, but not so much that I'd give up being able to share the code with pretty much anyone and everyone.

I can do HTML pretty quickly with Emacs' psgml mode, and I'm sure there are other people who specialize in it who can do it even faster with other tools. I think that's the place to look for improvements, rather than generating it like machine code.

Re:Beautiful mini language for outputing HTML in Python by showell on Tuesday December 29, 2009 @01:25PM (#1020956)
When you run SHPAML through the preprocessor, it produces HTML that you can share with other people. So it's not that big an issue. Your greater point is well taken, though--using SHPAML is particularly suited to small teams.
Re:Beautiful mini language for outputing HTML in Python by silentbicycle on Tuesday December 29, 2009 @03:12PM (#1021186)
Things can get messy if people sending you patches for something generated, rather than patches for the original source, though. Most such transformations aren't trivially reversible.
Re:Beautiful mini language for outputing HTML in Python by showell on Tuesday December 29, 2009 @03:28PM (#1021230)
I understand the use case, and if people are frequently sending you patches for your HTML, you probably want to make HTML the authoritative source. Do people frequently send you patches for HTML that you author? SHPAML does not allow you to trivially reverse HTML patches, but it does allow you to manually apply them without too much pain, as it lets most HTML pass through unmolested. I actually source control my HTML output to be able to see diffs on the HTML, for what it's worth.