Earlier quoted context omitted.
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.
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.
Beautiful mini language for outputing HTML in Python
51–60 of 74 posts
Re: Beautiful mini language for outputing HTML in Python
#52Why are most comments here negative? HAML already shown this technology does have value to a significant amount of people. Someone took the time to write this, seems to have done a pretty nice job and is releasing it for anyone to use. I can't see why anyone would feel the need to put it down in the comments. If you don't like, just don't use it.
Because; 1) by posting link to it on discussion site you are assumed to be soliciting opinions. 2) it was called "beautiful". A claim so false as to require immediate and forceful contradiction.
Re: Beautiful mini language for outputing HTML in Python
#53Re: Beautiful mini language for outputing HTML in Python
#54this could almost be embedded, which would be much cooler i think. you'd have to define objects with names from html tokens and do some ugly hacking with python's operators. you'd also have to add something other than space between strings (a "+" might be ok). but 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 se…
Re: Beautiful mini language for outputing HTML in Python
#55I'm disappointed they resorted to a one-way preprocessor. Is it really not feasible to make a first-class domain-specific language like this in Python?
I do not know what your criteria are for judging a "first-class" DSL in Python, so I cannot comment on the feasibility. My goal was to create a simple markup language that maps well to HTML and plays nice with templates. SHPAML does that.
Re: Beautiful mini language for outputing HTML in Python
#56I 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
#57Earlier quoted context omitted.
I like what I see of the DSL, but I don't believe meritorious beauty is a matter of taste. Coke vs. Pepsi - taste Python vs. PHP - not-taste For a better explanation, see: http://www.paulgraham.com/taste.html
I think we're in agreement. My distinction is: Beautiful vs Nice - taste. Beautiful vs Ugly - not taste. So, since it's obvious this DSL isn't ugly, being less than beautiful doesn't really merit HN's negative response. In any case, the negative comments seem to be doing great, which is sad for HN. My experience is that people who actually produce stuff (in any field) aren't usually publicly critical of other people'…
Re: Beautiful mini language for outputing HTML in Python
#58I no longer fall for languages that only change the syntax for something the author thinks it's cuter...
Right. I don't see any use case for this syntax especially that modern IDEs offer auto completion .
Re: Beautiful mini language for outputing HTML in Python
#59I no longer fall for languages that only change the syntax for something the author thinks it's cuter...
I was intending on eventually writing my own HAML-type language in Python, but it looks like with SHPAML, I won't have to. Because SHPAML supports raw HTML and doesn't do anything with the {} characters, I can use SHPAML in conjunction with my existing Jinja2 templates. This will enable me to convert my templates organically. The intermediate HTML/Jinja representation doesn't need to appear on disk, so this really looks like an easy way to add "cute" HTML syntax to and existing Python text templating language.
Re: Beautiful mini language for outputing HTML in Python
#60Earlier quoted context omitted.
i use Markdown ( http://daringfireball.net/projects/markdown/ ) regularly rather than directly writing HTML. like this thing, it's also just syntactic sugar, but it's well-designed and makes it so that i can concentrate on writing and not on formatting syntax. my raw text files are much more source-control friendly, since the diffs are clean.
Markdown is different, though. Rather than trying to cram HTML into a yet another pseudo-programming syntax, it tries to generate HTML that matches common plaintext-formatting conventions. You might not guess Markdown-formatted text was written with a formal markup language in mind. FWIW, there's a C implementation of Markdown called "discount" ( http://www.pell.portland.or.us/~orc/Code/discount/ ) which is crazy fas…
SHPAML is not a pseudo-programming syntax. It is purely a markup language, so there are no programming constructs.
SHPAML very deliberately tries to be a lightweight abstraction on top of HTML, unlike wikis and Markdown, which operate at a higher level abstraction. I am a huge fan of wikis, so I value the higher level abstraction at times, but I also see the need for an in-between solution.
I have not used Markdown much, but I see its merits as well.