HNHacker News
TopNewBestAskShowJobs

mathias

3,588 karma · joined December 26, 2009

Web standards enthusiast. https://mathiasbynens.be/
submissionscomments
mathias··on Respond.js: min/max-width CSS3 media queries for IE 6-8, and more
Isn’t IE9 supposed to have native support for media queries? http://caniuse.com/css-mediaqueries
mathias··on I made a node.js page to search npm+github
None of the existing sites like this (http://npm.mape.me/, http://search.npmjs.org/, and now yours) don’t do anything special when a project has multiple maintainers, even though that information is all in the package.json file.
mathias··on [dead]
Hey, I’m the guy who made the jsPerf website.

The product token for Windows Server 2008R2 and Windows 7 is the same (6.1) so there’s technically no way to tell the difference. jsPerf is supposed to show you it could be both, not one of them. Is this bugged?

mathias··on W3Fools Takes on W3Schools
+1. Note that this is also explained under the big “BUILD ONE YOURSELF” heading on http://w3fools.com/.
mathias··on DropQuest 2011
Dropquest can be completed in 60 seconds. Here’s a list of the minimum number of steps required to do so: http://mathiasbynens.be/notes/dropquest-2011
mathias··on I benchmarked 8 different ways of representing a 2d grid in JavaScript
The other article you’re talking about is this one: http://ejohn.org/blog/accuracy-of-javascript-time/

Note that some interesting information is missing from it (e.g., in IE the smallest unit of measure isn’t always 15 ms — it all depends). If you want to know all about it, check out http://calendar.perfplanet.com/2010/bulletproof-javascript-b....

mathias··on I benchmarked 8 different ways of representing a 2d grid in JavaScript
If you mean to run this benchmark across different browsers, you should know there might be some problems with the time measurement technique you’re using. Read http://calendar.perfplanet.com/2010/bulletproof-javascript-b... for a detailed explanation.

Why not use Benchmark.js https://github.com/mathiasbynens/benchmark.js for your test case? This library will take care of all the issues mentioned in the article I linked to. Or just take the easy road and use http://jsperf.com/ which uses Benchmark.js behind the scenes :)

mathias··on Ask HN: please review my tool for rewrite rule testing
It would be great if you would allow for multiple test URLs, i.e. make the “Enter a URL” input field a textarea that accepts a new URL on every line.

Another suggestion: why not just use localStorage instead of a $_SESSION?

mathias··on Ben the Bodyguard: Gorgeous HTML5 Website
http://dhtml5.com/
mathias··on Ben the Bodyguard: Gorgeous HTML5 Website
They’re not using any of the new HTML5 features (except the DOCTYPE). It’s all HTML, JavaScript and CSS.
mathias··on Ben the Bodyguard: Gorgeous HTML5 Website
Calling it an “HTML5 website” is a bit of an overreaction IMHO.

Other than the DOCTYPE, there’s not much “HTML5” to it. It’s just good old HTML, JavaScript and CSS, wrapped together in a document that happens to use the HTML5 DOCTYPE.

mathias··on Zepto.js, a jQuery-compatible mobile JavaScript framework in 2K (presentation)
RTFCommentToWhichJohnReplied.
mathias··on Browse test cases · jsPerf
FYI, this has been submitted before: http://news.ycombinator.com/item?id=1565257
mathias··on 0 degrees celsius + 0 degrees celsius -
0 celsius degrees + 0 celsius degrees = 0 kelvin: http://www.google.com/search?q=0+celsius+degrees+%2B+0+celsi...
mathias··on jsPerf: Easily create and share JavaScript performance test cases / benchmarks
I’m planning to gather test results automatically in the future, so jsPerf will be able to generate a neat overview of test results across browsers.

See the final question in the FAQ: http://jsperf.com/faq :)

mathias··on How to use HTML5 to make your CSS look like brainfuck
Isn’t escaping usually done with a backslash (`\`) instead of a forward slash (`/`)? I don’t see how something like `$('<div />');` could interfere with that.
mathias··on How to use HTML5 to make your CSS look like brainfuck
Q: Any experience with brainfuck?

A: No, but if you want, I can write you some CSS that looks just like it!

mathias··on How to use HTML5 to make your CSS look like brainfuck
So mine got downvoted? I should have added </sarcasm> there…
mathias··on How to use HTML5 to make your CSS look like brainfuck
Good point! To be perfectly safe, `$div.attr('id')` should be escaped before it’s used. I’m not sure in how many browsers this could be a problem though.

FYI, the `.append` line is missing a closing `)`. Also, you probably don’t want to use `$(this)` in that case, you could just use `this`.

mathias··on How to use HTML5 to make your CSS look like brainfuck
I was merely replying to the “PHP does not have access to IDs of HTML elements” statement, but good job on the additional explanation.
mathias··on How to use HTML5 to make your CSS look like brainfuck
How is being able to use any character you want as a value for an ID attribute a bad thing?
mathias··on How to use HTML5 to make your CSS look like brainfuck
He meant the name attributes on form elements.

When a form containing <input type="text" name="foo" value="bar"> is submitted, $_POST['foo'] === 'bar' in PHP. (And it works similarly for other server-side programming languages.)

mathias··on How to use HTML5 to make your CSS look like brainfuck
How un-HTML5 of HackerNews!
mathias··on How to use HTML5 to make your CSS look like brainfuck
There’s no ‘point’, it’s just awesome that it’s possible, and that HTML5 unifies class and ID restrictions.
mathias··on The three levels of HTML5 usage
Your question inspired me to write a post about XHTML5: http://mathiasbynens.be/notes/xhtml5
mathias··on HTML5: it goes to ELEVEN
The blog post I talked about is now published and can be found here: http://mathiasbynens.be/notes/html5-levels
mathias··on The three levels of HTML5 usage
Nope, that's the whole point. You’re free to use the solidus in the HTML serialization of HTML5.

In the XHTML serialization of HTML5, the solidus isn’t required either; you can choose to close the elements instead.

The following examples are both confirming/valid HTML5 in ‘XML mode’ (they’re valid XHTML1 as well):

a) With solidus

    <img src="foo" alt="bar" />
b) Without solidus

    <img src="foo" alt="bar"></img>
Just to be clear though, in my post I was just pointing out that you don’t have to change anything in your HTML4/XHTML code to switch to HTML5, except for the DOCTYPE.
mathias··on HTML5: it goes to ELEVEN
The HTML5 DOCTYPE triggers standards mode in IE6 as well.
mathias··on HTML5: it goes to ELEVEN
By ‘current browsers’, I mean all browsers in use = A-grade browsers, including IE6. See http://hsivonen.iki.fi/doctype/ and http://ejohn.org/blog/html5-doctype/#comment-296891

The HTML5 spec is written with backwards compatibility in mind, and the DOCTYPE is one of the examples. HTML5 specs current behavior and implementations. The DOCTYPE would’ve been different if browsers didn’t already support it.

I realize a lot of additional info is lost on people who are viewing the slides but couldn't attend the presentation, and am working on a blog post with some more explanations.

mathias··on Bulletproof HTML5 &lt;details&gt; fallback using jQuery
You must’ve checked the demo page while I was updating it. Just added support for direct child text nodes, as per Shelley Powers’s comment: http://mathiasbynens.be/notes/html5-details-jquery#comment-4

If it still doesn’t work, there are bugs indeed. But it should work ;)

← PreviousPage 6 of 7Next →