This is another tangential thought that comes from "Thinking In Perl" rather than thinking like the rest of the world.

Given that we know the strengths and weaknesses of HTML, can YAML or POD be adapted to do what HTML currently does?

Does this sound absurd? I was thinking about it idly, because I recall that an inconvenient feature of HTML is that it's hard to build a layout. Tables have to be used. Or maybe place components precisely. Gotta use the clear pixel image. Or something. Has anybody else thought about Doing It Better than HTML?

Perl is the Swiss-Army Chainsaw of filtering languages. It processes POD. It's also a YAML target. Surely there's a synthesis there that can interpret a more refined Web Markup system?

Replies are listed 'Best First'.
Re: YAML-POD to Perl to Web?
by Corion (Patriarch) on Feb 19, 2004 at 16:47 UTC

    Nowadays, layout is done via CSS. You can do pixel-exact layout, or enough of it to keep the artsy-heads quiet. Tables and clear pixel images are soo 20th century.

    There even are Perl modules to create CSS files, in the CSS namespace, if you want to create special CSS for different browsers.

    Take a look at the CSS Zen Garden for some inspiration of what can be done with CSS. The HTML page stays the same, only the CSS file changes.

      I agree. CSS has already solved the problem

      And another good CSS resource to look at is the CSS-discuss Wiki site

      It has quite a lot of advice and examples.

      That is simply a beautiful site. I never knew how amazingly flexible CSS is. Thanks for the link!

      ...in fact, it looks like the CSS is very similar to YAML...
Re: YAML-POD to Perl to Web?
by hardburn (Abbot) on Feb 19, 2004 at 16:53 UTC

    POD is too simplistic for a lot of the tasks people use for HTML. While it makes for a decent, minimalistic documentation system, it's rather lacking as a full layout system.

    YAML is mainly for cross-language data exchange which is reasonably readable by humans. I don't think it would work well as a layout system.

    In any case, while old-skool HTML sucks, XHTML+CSS+XForms fixes most of my grievances. It'll be nice when we can actually start using all those things in real web pages.

    ----
    : () { :|:& };:

    Note: All code is untested, unless otherwise stated

Re: YAML-POD to Perl to Web?
by zby (Vicar) on Feb 19, 2004 at 22:18 UTC
    YAML is general data structure serialisation language while XML and HTML are specially designed for text markup. To show the difference write a YAML representation of this HTML:
    This is <em>another tangential thought</em> that comes from <i>"Thinking In <b>Perl</b>"</i> rather than thinking like he rest of the <b>world</b>.
    Formated:

    This is another tangential thought that comes from "Thinking In Perl" rather than thinking like he rest of the world.

      Or even more bluntly, YAML's recursive acronym is "YAML Ain't Markup Language", not "Yet Another Markup Language" as most folks tend to think.
        Yes, it's a way to represent a graph or heirarchy, I guess. But sometimes chunks of HTML display heirarchical data. Every few months I keep coming back to the idea of YAML -> perl structures -> HTML, and I'm not quite sure why. Could be my brain is stuck on a roundabout somewhere.
Re: YAML-POD to Perl to Web?
by flyingmoose (Priest) on Feb 19, 2004 at 17:19 UTC

    (off-topic)

    CSS has been on my list of "stuff to learn" for a long time. My site is still raw HTML because I haven't had that time, since various programming languages are a little more valuable to keep polished.

    I suppose it's time to take the plunge and buy some dead tree on the subject.

    Any recommendation on CSS books?

      Designing With Web Standards (aka the "Shocking Bad Hat" book) by Zeldman is recommended by other people, as is Eric Meyers CSS book. Personally, I only used O'Reillys CSS Pocket Reference (also by Eric Meyer).

        I haven't read the book but the author's web site displays poorly when given an unusual Mozilla browser. I'd take whatever advice is in that book with a grain of salt.

      Any recommendation on CSS books?

      Not really. I've found that like the HTML specs, you can learn CSS reasonably well from the w3c docs alone. It helps to have working examples around (especially for layout techniques), but there are plenty of web sites that have those for free.

      There are subjects I prefer to find a good book for, but CSS isn't one of them.

      ----
      : () { :|:& };:

      Note: All code is untested, unless otherwise stated

        Dead tree is ideal for reading when you are doing other work on a computer monitor. But I suppose printers can do :)
      CSS has been on my list of "stuff to learn" for a long time. My site is still raw HTML because I haven't had that time

      If you write a significant amount of HTML, learning CSS will save you time. You can learn quite a lot of CSS in one day, enough to throw out your legacy HTML deprecated physical markup and never look back. In three weeks you'll have regained the time you spent learning CSS.

      There are a very small handful of things you'll still use deprecated markup for, because of missing browser support for the corresponding bits of CSS. Horizontal centering is one. border="1" (or whatever thickness you want) on table elements is another. But the time you'll save that you used to spend just in putting in font tags will pay you back the time for learning CSS in short order. Don't delay; learn it today. You can find a good CSS1 tutorial at htmlhelp, and there's a decent CSS2 tutorial at w3schools.

      I have Mozilla bookmark keywords set up for XHTML and CSS to point to the corresponding w3schools pages, so that I can type into my browser's address bar something like "css border" and go straight to the explanation of the border property. When I was first learning CSS I used this a lot.


      ;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$;[-1]->();print