News for hackers. Stuff that matters.
Re:Servo: Inside Mozilla's mission to reinvent the web browser by TheZenPsycho on Tuesday February 25, 2014 @05:22PM (#7301084)
In spite of the firmly stated opinion I left elsewhere in this thread, I do indulge in imagining how all this tech stack could be better.

First things first, I found out the other day that someone actually built the major part of my vision: Constraints Oriented stylesheets (using cassowary).

http://gridstylesheets.org/

This is how iOS now handles layout. It makes easy things easy, and hard things achievable. Exactly what you'd want.

Beyond this, I think that html has too many tags. To put another way, the browser should not generally permit <script> and <style> to exist in the same context that <em> can exist. onblah= attributes were a terrible mistake that we'll never be able to undo. It would be cool if there was something like a <content> tag which, within it, only permits content oriented mark up, while disabling scripting and styling tags. Likewise, forms, scripting, meta tags and linkages should be in isolated contexts.

And finally, what idiot decided that & ampersands should have a prominent position in many URLS and then use & for entity encoding in html, a completely different purpose. URLS now have to be http://entity&amp;encoded

uhg. so stupid. what would be wrong with <amp> or <amp/> instead? or since we've freed up & for normal expected use, <gt> <lt> and <quot>

ah well.

Re:Servo: Inside Mozilla's mission to reinvent the web browser by groks on Wednesday February 26, 2014 @06:33AM (#7304231)
> ...what idiot decided that ampersands...

    example.com/?a=1&b=2
    vs.
    example.com/?a=1;b=2
The second example doesn't need to be encoded in HTML.

https://stackoverflow.com/questions/3481664/semicolon-as-url...

Re:Servo: Inside Mozilla's mission to reinvent the web browser by TheZenPsycho on Wednesday February 26, 2014 @06:36AM (#7304244)
And that would be great if it didn't inadvertently break certain browsers, proxies, web servers and parameter parsers. Back in the day the advice was you could use & or ;. TBL had subtly different semantics in mind for them though: apparently ; was meant to represent some coordinates in some spacial system while & was the normal query parameter separator.

Somewhere along the line, for some reason, everyone settled on & and the web ossified around the assumption that was the only character that ever gets used.

Re:Servo: Inside Mozilla's mission to reinvent the web browser by ufo on Tuesday February 25, 2014 @09:03PM (#7302280)
The worst part about ampersands in URLs is that not only you have to escape them but so few people know that you need to escape it!
Re:Servo: Inside Mozilla's mission to reinvent the web browser by Ygg2 on Wednesday February 26, 2014 @04:52AM (#7303929)
How paralelizable would Cassowary be? It seems it adds a lot of inter-dependencies between elements, no?
Re:Servo: Inside Mozilla's mission to reinvent the web browser by TheZenPsycho on Wednesday February 26, 2014 @06:06AM (#7304158)
I don't know the algorithm well enough to say for certain. but I get the impression it involves a clever work around to the interdependencies. it converts equalities and inequalities into a system of linear equations. It then converts this system into a matrix form it calls a "tableau". The solver appears to work by repeated applications of matrix operations which may be paralelizable. but I'm not sure. This is different from how physics engines resolve constraints, one after another. In a matrix form they just kind of all get optimised "at once"

the paper describing the algorithm is here:

https://docs.google.com/viewer?url=http://www.cs.washington....