Beautiful mini language for outputing HTML in Python
shpaml.webfactional.com
Beautiful mini language for outputing HTML in Python
1–10 of 74 posts
Re: Beautiful mini language for outputing HTML in Python
#2The best way I've found of representing XML/XHTML or even HTML for that matter, is with X-Expressions--a subset of S-Expressions. But, they are most useful in a language that fully supports S-Expressions, like Lisp, since you can then use standard functions to generate your markup for you.
Re: Beautiful mini language for outputing HTML in Python
#3Re: Beautiful mini language for outputing HTML in Python
#4Re: Beautiful mini language for outputing HTML in Python
#5I'm not a big proponent of all of these new HTML replacers. They don't really buy you anything--this one just gets rid of angle brackets as far as I can see, and adds CSS style #id and .classname. Now, instead of angle brackets, we have to use tabs, or spaces, or some other delimiter (I saw | in there for continuing a line). The best way I've found of representing XML/XHTML or even HTML for that matter, is with X-Exp…
These things might be ok for small, tight teams, but I don't see them as buying that much in the long term, as opposed to tools that let you be more productive with HTML.
Re: Beautiful mini language for outputing HTML in Python
#6but once you've done that, this could be very neat. no processors - just constructing html in python.
(i don't know if this sounds crazy or not, but you can see the same kind of approach in lepl, which i wrote. the main problem is operator precedence.)
Re: Beautiful mini language for outputing HTML in Python
#7I no longer fall for languages that only change the syntax for something the author thinks it's cuter...
Re: Beautiful mini language for outputing HTML in Python
#8There's just something wrong about creating a language with a language to produce about in a third language. As Brian Kernighan told Dustin Hoffman one time, "Learn to code!".
In addition, using something like SHPAML requires knowledge of the final output syntax, so the person using it must already know how to code.
Edit: In reading my response, it seems too curt. I definitely see your point, but more so in contexts other than this.
Re: Beautiful mini language for outputing HTML in Python
#9There's just something wrong about creating a language with a language to produce about in a third language. As Brian Kernighan told Dustin Hoffman one time, "Learn to code!".
Re: Beautiful mini language for outputing HTML in Python
#10On the other hand, I don't like new DSLs for writing what is already a simple markup language.