News for hackers. Stuff that matters.
Re:Beautiful mini language for outputing HTML in Python by drhowarddrfine on Tuesday December 29, 2009 @08:31AM (#1020423)
There'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 by nopal on Tuesday December 29, 2009 @08:40AM (#1020439)
While your language^3 comment is technically true, this seems to be simply shifting one markup syntax to another, using a language to perform the translation.

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 by showell on Tuesday December 29, 2009 @06:12PM (#1021541)
It is not a promise, or even a goal, of SHPAML that it will relieve you the burden of understand the final output syntax, whether that is HTML or HTML combined with some template language.

SHPAML users are expected to be literate in both HTML semantics and syntax. The semantics of HTML are not abstracted away at all. The syntax is only abstracted away where it is redundant.

As a couple folks have pointed out, HTML is a pretty simple language. The problem with HTML is not its lack of simplicity; it is its verbosity.

So, if you use SHPAML, you undeniably get the terseness of SHPAML and the powerful semantics of HTML. So the question then comes down to simplicity. Does SHPAML eliminate too much of the simplicity of HTML syntax in trying to achieve terseness?

Re:Beautiful mini language for outputing HTML in Python by tpyo on Tuesday December 29, 2009 @08:49AM (#1020451)
How did Hoffman and Kernighan meet?
Re:Beautiful mini language for outputing HTML in Python by julius_geezer on Tuesday December 29, 2009 @09:30AM (#1020509)
Pulling your leg. Hoffman, who had learned in the "method acting" schools, apparently stayed up all night to look properly harrowed for a scene. Laurence Olivier, playing opposite, is said to have told him something like "Why don't you try acting, my boy? It's so much simpler."
Re:Beautiful mini language for outputing HTML in Python by showell on Thursday December 31, 2009 @06:30PM (#1025187)
The Laurnence Olivier analogy is stupid, inaccurate, and irrelevant.
Re:Beautiful mini language for outputing HTML in Python by kashif on Tuesday December 29, 2009 @10:25AM (#1020580)
What is the problem with using one language to produce another? How do you think your primary programmin language gets converted to assembly and then to machine code?

As far as I am concerned this is a useful abstraction on a trivial problem.

Re:Beautiful mini language for outputing HTML in Python by mbreese on Tuesday December 29, 2009 @11:15AM (#1020655)
The problem is that this is a trivial problem. Why add an abstraction on top of something that is already so simple?
Re:Beautiful mini language for outputing HTML in Python by showell on Tuesday December 29, 2009 @01:51PM (#1021014)
My problem with HTML is not its lack of simplicity; it is its verbosity. SHPAML solves the (fairly) trivial problem of making HTML less verbose. The abstraction pays off for me insofar as I expect to use SHPAML for the next decade or so, and it's easy to remember the syntax, easy to share the output, etc.
Re:Beautiful mini language for outputing HTML in Python by mbreese on Wednesday December 30, 2009 @01:46PM (#1022933)
Yeah, but how many other people will be using it? You may be planning on using it for a decade, but you will be in a very small minority. And so to share the output (the very common and portable HTML), you need to add another step to your workflow to convert things. This just seems like too much effort for very little gain.
Re:Beautiful mini language for outputing HTML in Python by showell on Wednesday December 30, 2009 @02:21PM (#1023029)
If 0.001% of the world's population uses it, I think that comes out to something like 60,000 people.

You can see here that I've already solved the problem of sharing SHPAML output using HTML:

http://shpaml.webfactional.com/

You are right about it adding a step to my workflow. If only there was some kind of machine that could automate things for me...

Re:Beautiful mini language for outputing HTML in Python by timtadh on Tuesday December 29, 2009 @11:47AM (#1020717)
Well machine language is pretty simple especially when you use something like MIPS. It can even be pretty fun to code in if you assembler has good macro support. However there is value is adding an abstraction layer on top of machine code. I think what people are really trying to say in these comments is that this new mini language does not provide useful value vs HTML like C provides vs. MIPS. Cheers.
Re:Beautiful mini language for outputing HTML in Python by Confusion on Tuesday December 29, 2009 @02:26PM (#1021076)
Right, just like creating Python with C is 'just wrong' if you're going to be writing applications that produce HTML?