Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Markaby is pretty sweet:

  html do
    head { title "Boats.com" }
    body do
      h1 "Boats.com has great deals"
      ul do
        li "$49 for a canoe"
        li "$39 for a raft"
        li "$29 for a huge boot that floats and can fit 5 people"
      end
    end
  end


Thanks. I modded up the parent submission, in part, because I was pretty sure I'd seen several of these syntaxes by now and I wanted to precipitate a shootout in the comment section. ;)

More examples, please! Here's some haml, from the haml site. (I don't actually know haml, but perhaps I soon will:)

  #content
    .left.column
      %h2 Welcome to our site!
      %p= print_information
    .right.column= render :partial => "sidebar"
Grading these competitions is hard, since it depends on taste and you can't always tell from a short example how something will perform in the field. haml may be a bit too terse (though I say that without being convinced that it's true; terse is generally good), and on first glance it will confuse the daylights out of an otherwise HTML-savvy person who has never seen it before. But I certainly like it compared to tag soup.


Just because everyone else is doing it. I like Compojure (library for Clojure):

    (html
        [:head {:title "Boats.com" }]
        [:body
            [:h1 "Boats.com has great deals"]
            [:ul
                [:li "$49 for a canoe"]]
            (sidebar)])
render(:partial, sidebar) is accomplished by just calling another function that generates html.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: