News for hackers. Stuff that matters.
Re:I Heart SASS, But HAML, I'm Just Not That In To You by edw on Wednesday May 04, 2011 @05:56PM (#2515471)
This post is a great example of what I dislike about Ruby culture, making a big deal out of pretty simple stuff. At least the article didn't mention DSLs.

This SASS thing, it seems interesting… I'm a Scheme programmer. I'd like something like it. After about forty-five minutes of hacking, I came up with this:

https://gist.github.com/956113

It lets you write code like this:

    (make-css
     '(("body.loading"
        (font-size "12px")
        (color "#fff")
        (" ul#sidenav"
         (" li"
          (blah "blah"))))))
And generates output like this:

    body.loading { font-size: 12px; color: #fff; }
    body.loading ul#sidenav li { blah: blah; }
I agree with the guy's point though: SASS is different from HAML in that it actually does something conceptually useful, viz. it introduces a scope-like concept to CSS.
Re:I Heart SASS, But HAML, I'm Just Not That In To You by drdaeman on Wednesday May 04, 2011 @06:24PM (#2515526)
I'd disagree - HAML adds syntax sugar. While it can be considered bad (there are some very valid criticisms), it certainly can't be considered conceptually useless.
Re:I Heart SASS, But HAML, I'm Just Not That In To You by edw on Wednesday May 04, 2011 @06:31PM (#2515550)
I know nearly nothing about HAML, but if it's "just" syntactic sugar, then I'll stand by my statement that it's conceptually useless. Or maybe conceptually barren. HAML can very well be useful without introducing any new concepts. It's obviously more concise which i can see justifying its existence if for no other reason.
Re:I Heart SASS, But HAML, I'm Just Not That In To You by grimen on Wednesday May 04, 2011 @06:50PM (#2515580)
Would be cool to benchmark this. Me with HAML/SASS vs. you guys with HTML/CSS. Points given for implmentation time and output validity and semantic quality. A few years ago Ruby was syntetic sugar, later Rails, later HAML/SASS. Give me a break.
Re:I Heart SASS, But HAML, I'm Just Not That In To You by edw on Wednesday May 04, 2011 @07:20PM (#2515634)
1. It was the Java people who pooh-poohed Rails. The rest of us just got to work cloning it, sans any issues we had with it, in our favorite languages. I haven't seriously programmed in Java for almost ten years.

2. Syntactic sugar isn't just hand-waving; it has a reasonably-concrete definition. And it's generally considered acceptable if it delivers enough convenience (The concept of enough, you will find, is highly subjective.)

3. No one in this exchange has busted on the utility of SASS, so I don't understand why you'd deny anyone a SASS-like tool in a cage match nerd bake-off. For that matter, no one has busted on the practical utility of HAML in this exchange, just on the absence of new concepts i.e. powers of abstraction.

Re:I Heart SASS, But HAML, I'm Just Not That In To You by grimen on Monday May 09, 2011 @02:33PM (#2529690)
1. The pointer was "many developers was hating on it" - I didn't say everytime it is the same people. You kow that, this bullet was just waste of characters really.

2. Reference me the official definition. Another point that didn't add anything to the discussion.

3. SASS been heavily hatred on in the past, Google it. Practical utility: Inofficially 80% of Rails/Sinatra developers use HAML - why? Because it makes people productive.

Re:I Heart SASS, But HAML, I'm Just Not That In To You by edw on Thursday May 05, 2011 @10:27AM (#2517455)
Hey guys, I was thinking about my implementation of Sass (apparently, it's not supposed to be in all caps) and came to the conclusion that it's not simple enough. I wrote a version that obviates the need for a bunch of the parentheses. You can check it out here:

https://gist.github.com/957123

The example above can now be written thusly:

    (make-css
     '(("body.loading"
        font-size "12px"
        color "#fff"
        (" ul#sidenav"
         (" li"
          blah "blah")))))
Have a nice day!