Why 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.
Beautiful mini language for outputing HTML in Python
31–40 of 74 posts
Re: Beautiful mini language for outputing HTML in Python
#32Earlier quoted context omitted.
1) As an HN submission, it's certainly better than most. Anything with code in it beats "Startup lessons from J-Lo". 2) Beauty is a matter of taste. It might not be the Bar Rafaeli of languages, but I wouldn't think it's so ugly as to require "forceful contradiction".
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
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's work, since they can appreciate the effort involved, and don't want to be at the same spot when they release their own work.
Re: Beautiful mini language for outputing HTML in Python
#33Earlier quoted context omitted.
Yes, I think that for HTML, "better tools" is the right answer. HTML is something that can be shared between people with various backgrounds, skills, and toolsets. I can write it in Emacs on Ubuntu, and send it to some guy who will work on it in Windows with Notepad, who can send it to someone else who will open it with Chrome on a Mac. These things might be ok for small, tight teams, but I don't see them as buying t…
I believe that I see your point, and I would agree that the verbosity of HTML leads to sharability, and that is a strength. But the verbosity is also one of its weaknesses for large projects; it adds a great deal of overhead in terms of keeping track of the tags, especially if the HTML needs to be re-arranged. And with no language-supplied rules for how much whitespace to use or where (beyond "all adjacent whitespace…
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
#34Why 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.
One of the primary benefits I get from HN is the pro and con discussion of technology, especially if it's something I might want to use. If there are good reasons not use a technology, then I would rather hear about them before I rediscover them from my own experience.
Re: Beautiful mini language for outputing HTML in Python
#35Is HTML that hard to write?
Re: Beautiful mini language for outputing HTML in Python
#36I'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…
I agree that there are plenty of other useful ways to represent XML/HTML.
SHPAML does require or even support tabs. The "|" is not for line continuation; it is to separate markup from content.
Re: Beautiful mini language for outputing HTML in Python
#37Earlier quoted context omitted.
I believe that I see your point, and I would agree that the verbosity of HTML leads to sharability, and that is a strength. But the verbosity is also one of its weaknesses for large projects; it adds a great deal of overhead in terms of keeping track of the tags, especially if the HTML needs to be re-arranged. And with no language-supplied rules for how much whitespace to use or where (beyond "all adjacent whitespace…
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…
Re: Beautiful mini language for outputing HTML in Python
#38Is HTML that hard to write?
Re: Beautiful mini language for outputing HTML in Python
#39Finding the potentially missing closing tag has been a common problem I have seen some people face.
Re: Beautiful mini language for outputing HTML in Python
#40I kinda like it.. sure it is one more level of abstraction, and good editors will help with the tag balancing, but let's face it, (X|HT)ML syntax isn't exactly natural to write, and I say this despite having written it by hand for well over a decade. This probably appeals more to people who have made the Python jump and like that whitespace means something, as that's what really makes it terse.
Glad you like it! I have also been hand writing HTML for well over a decade too (as well as other means of producing HTML), so my goal in SHPAML was simply to relieve pain points for an everyday task. It has worked for me.