Live data from Hacker News

Less.js will obsolete CSS

fadeyev.net

101–110 of 131 posts

Re: Less.js will obsolete CSS

#101
post #79

Earlier quoted context omitted.

I demand a benchmark. Saying that something is just false without numbers to back it up is not something I have high trust in, and is the start of the gossip that causes internet wars. First back it up with numbers, then we talk.

Fair enough. I'm running less.js from the command line using node.js on my old-ish MacBook pro: A trivial CSS file (foo {a: b}) takes about 0.11s. This is probably mostly time spent spawning Node and loading the JS. The combined CSS for GitHub, about 160K, takes about 1.6s. This is already longer than most HTTP requests. The doubled CSS for GitHub (the same CSS twice in a row), about 316K, takes about 4s. This is qui…

That's because the parser isn't optimized for compressed CSS.

By airing the file out a bit (just adding some double line-breaks), and passing -O2, it goes down to 177ms :)

Re: Less.js will obsolete CSS

#104
post #50

Earlier quoted context omitted.

MW adds practically any word that someone uses, ever. And Wiktionary? Come on. If you take a gander at WordNet or even OneLook (searches multiple dictionaries), you'll find that the majority list obsolete only as an adjective, including Webster's 1828. However, I concur that obsolesce would have been a better choice.

OED has it as a transitive verb, with usage going back to 1640.

OED > *

Sounds strange to the modern ear though.

Re: Less.js will obsolete CSS

#105
Nonsense about obsoleting CSS aside, I've downloaded this Javascript version and I've been using it as a standalone program with Node. The command-line tool is a lot less mature than the Ruby version, but it's so much faster. The Ruby one was really painfully slow. It was really frustrating to have to wait a whole five seconds for it to regenerate your CSS files every time you make a small little change. This one will regenerate your CSS in comfortably less than a second. It's much better.

Re: Less.js will obsolete CSS

#106
post #19

Earlier quoted context omitted.

The article makes it sound like the author expects in-browser processing to be the only way it'll be used: "Less.js is a JavaScript implementation of LESS that’s run by your web browser. As any JavaScript, you include a link to the script in your HTML, and…that’s that. LESS is now going to process LESS code so instead of including a link to a CSS file, you’ll include a link directly to your LESS code. That’s right, n…

I demand a benchmark. Saying that something is just false without numbers to back it up is not something I have high trust in, and is the start of the gossip that causes internet wars. First back it up with numbers, then we talk.

The benchmark file,

http://github.com/cloudhead/less.js/blob/master/benchmark/be...

Which has all the features of LESS in it, and weighs 94KB (3600loc), compiles in 130ms on my macbook pro.

I would say that's plenty fast. You can try it out by running `$ make benchmark`

Re: Less.js will obsolete CSS

#107
post #4

Literally the only problem with CSS itself is that it doesn't have defines. Every other problem is just browser implementations.

There are plenty of problems with CSS. You can't specify the width of an inline element, for one. That alone prevents a lot of reasonable layouts, like tables. Also problematic is a standards body that ignores this use case! In this case, they protect the writer from over-filling some boxes with more boxes. But that would at least be visible - in this case, the workarounds end up far worse.

> You can't specify the width of an inline element, for one.

  display: inline-block;
  width: ...

?

Re: Less.js will obsolete CSS

#108

What if the user uses noscript, or otherwise disable Javascript? Preventing cautious people from seeing the eye candy doesn't sound like a good idea.

Users running noscript are typically prepared for any site to look broken or not work as expected. They also comprise a tiny majority of visitors, so for all practical intents and purposes accommodating their case is not really a development priority.

Re: Less.js will obsolete CSS

#109
post #50
post #35

Earlier quoted context omitted.

Says who? http://www.merriam-webster.com/dictionary/obsoleted http://en.wiktionary.org/wiki/obsolete

MW adds practically any word that someone uses, ever. And Wiktionary? Come on. If you take a gander at WordNet or even OneLook (searches multiple dictionaries), you'll find that the majority list obsolete only as an adjective, including Webster's 1828. However, I concur that obsolesce would have been a better choice.

Dictionaries are historians of usage, not legislators of language. If the communication is clear, which in this case I think it is, then I don't see a problem.

(BTW, I used to be a grammar nazi years ago.)

Re: Less.js will obsolete CSS

#110
post #61
post #21

Earlier quoted context omitted.

I wonder why there is no general "template" language that you can use on any text/source file. For example, I'm writing a lot of AutoHotKey code lately, and I find myself wishing I had some of the expressive power of Python so I wouldn't have to repeat things. I'm seriously considering writing a Python-based "Preprocessor" language which lets me drop in Python code on any file, and deals with transforming it into the…

We're going back to M4 now, but with python?

Thanks for that, never heard of that.

Link for anyone interested: http://en.wikipedia.org/wiki/M4_(computer_language).

By the way, I really think that to work (i.e. become usable, maybe even popular), this needs to be built on an existing and popular language. Otherwise it's too steep a learning curve.

Ideally, I'd like to be able to put in code in the text file wherever I want, be able to put the value of expressions in the code, and that's it.

Post reply on HN