AdBlock Plus's effect on Firefox's memory usage - <AUTHOR> https://blog.mozilla.org/nnethercote/2014/05/14/adblock-pluss-effect-on-firefoxs-memory-usage/ <comment><USER2> It's not just memory overhead, it is also CPU overhead.

One approach is to write the filtering engine from scratch. It is what I did, without looking at ABP's code beforehand in order to ensure a clean slate mind.

I didn't get it right the first time, I did spend _quite a large amount of time_ benchmarking, measuring, prototyping, etc.

Once I was satisfied I had finally had a solid code base, I went and benchmarked it against ABP to find out how it compared:

[https://github.com/gorhill/httpswitchboard/wiki/Net- request-...](https://github.com/gorhill/httpswitchboard/wiki/Net-request- filtering:-overview#abp-filtering)

And for HTTPSB's numbers, keep in mind there were an _extra over 50,000 rules_ in the matrix filtering engine (something not found in ABP).

So I think this shows clearly ABP's code can be improved.

<comment><USER3> As far as I can tell, HTTPSB is not available for Firefox, please fix!

I would love to use something better than ABP (in terms of performance, it does content filtering just fine), but I'm not so desperate to abandon the (warning: subjective content ahead) greatest browser of all times to lower the memory footprint of an ad blocker.

<comment><USER4> I'm betting this is not an easy task.

It however would be really awesome for HTTPSB (which I just installed on chromium and fallen in love instantly with) to be ported to firefox.

Seeing all the privacy-related features treated, by domain/site/everywhere rules, being able to block separately js/plugins/cookies (and by the way, the matrix is a great idea, a lot more useable than anything else out there)... in one extension only. Great work already, gorhill!

<comment><USER5> Eh it has some default behavior quirks. Like being unable to log into arstechnica.com because it won't let that cookie get stored.

<comment><USER2> Whitelist the "cookie" cell in the matrix, save with one click on the padlock. Now cookies will be allowed everywhere by default (except for those ubiquitously blacklisted hostnames).

</comment></comment></comment></comment></comment><comment><USER6> The first thing people complain about with browsers is probably memory usage. I doubt that many people actually understand what a browser actually does with that memory. I sure don't.

100mb sounds like a lot of memory for a webpage. Where does all this memory go to?

<comment><USER7> Many people think of a browser as a tool for displaying text and pictures, with maybe a bit of JS code and some CSS effects on the side. That was true in the late 90s, but these days a browser is actually a fully-fledged programming environment that also happens to have some incredibly sophisticated multimedia capabilities: text, images, video, audio, animations, 3d graphics, etc.

The most popular websites run quite amazing amounts of code, and JavaScript execution is usually the dominant consumer of memory.

If you want a deeper understanding, visit about:memory in Firefox you'll get a detailed breakdown of how memory is used.

<comment><USER8> > That was true in the late 90s, but these days a browser is actually a fully- > fledged programming environment that also happens to have some incredibly > sophisticated multimedia capabilities: text, images, video, audio, > animations, 3d graphics, etc.

Maybe I just miss the 90s, but I would _much_ rather have the simple content browser than a "full-fledged programming environment", especially since all of that content is coming from the random untrusted intarwebs. Anyone want to write a browser engine that skips all the modern BS and just does a good job delivering mostly-static webpages?

<comment><USER9> Your best bet is text-based browsers: Lynx, Elinks, or mayve Emacs/W3M. On simple sites like HN, they are more or less usable.

I also sometimes wish the Web were just serving data in an easily processable format, and let the user decide what and how they are presented. Of course this would definitely and completely defeat the ads-supported scheme on which sits Internet. An ads-free Web would probably require the resources (media files, services, storage space, bandwidth, etc.) to be massively distributed among the PCs of the end-user, who are already paying for bandwidth, processing power and storage anyway. But it would also be quite inefficient as it would require equally massive fault tolerance.

<comment><USER10> > I also sometimes wish the Web were just serving data in an easily > processable format, and let the user decide what and how they are presented.

It's really sad that many people feel this is the state of the modern www. The original intention - you serve me stuff with suggestions about presentation, but my client software and OS and hardware can do what it likes with that stuff - appears to be long dead.

> Of course this would definitely and completely defeat the ads-supported > scheme on which sits Internet. An ads-free Web would probably require the > resources (media files, services, storage space, bandwidth, etc.) to be > massively distributed among the PCs of the end-user, who are already paying > for bandwidth, processing power and storage anyway. But it would also be > quite inefficient as it would require equally massive fault tolerance.

I do not use ad blockers. I view ads. If I really like the site and trust their ad network I will click relevant links.

But I loathe the way some websites and apps work. Facebook on iOS opens all links in the facebook app. Apps and websites decide they will not let my zoom or rotate.

Especially hateful are the ads which take me out of a Chrome (iOS) session to open the app store. I contact owners of sites with those ads and politely tell them what happens, and then I cut and padte the URL to a list of sites that I will never ever visit again. This is as bad as the smiley ads that yell " HELLO!! ".

Advertisers seem reluctant to realise that irritating people like me ( ad tolerant) is a rwally bad move and is the reason so many peopke use ad blockers.

<comment><USER11> >Advertisers seem reluctant to realise that irritating people like me ( ad tolerant) is a rwally bad move and is the reason so many peopke use ad blockers.

You're a tiny, tiny percent of users who actively chooses to view ads. Not to be insulting, but advertisers don't care what you think - the money they lose from your custom isn't worth the effort to make the change.

I don't bother blocking ads and I've never felt the need to install anything.

But the day I come across a site which I deem annoying enough, you can bet I won't hesitate for a second, and that'll just blanket block everything. As long as the advertisers play nice, I don't particularly mind. I don't care to differentiate between 'good' and 'bad' advertisers - just like how I'm not worth their time, neither are they worth mine.

</comment></comment></comment></comment></comment></comment><comment><USER12> [http://someonewhocares.org/hosts/zero/](http://someonewhocares.org/hosts/zero/)

<comment><USER13> I switched from ABP to this hosts file a few months ago and I have zero regret. My browser's faster, lighter and ads are blocked just as well as with ABP.

I actually even started splitting my hosts file: the layout is

        /etc/hosts                ('compiled' version)
        /etc/hosts.d/
        /etc/hosts.d/aaa-warning  (warning reminding me to run `update-hosts` instead of modifying /etc/hosts. Appears atop the compiled file)
        /etc/hosts.d/adblock      (that website's hosts file)
        /etc/hosts.d/base         (original system hosts file)
        /etc/hosts.d/dolead       (work-related file for development)

And I have the following functions in my .bashrc file:

        function update-hosts() {
            cat /etc/hosts.d/* > /etc/hosts;
        }

        function update-adblock() {
            curl http://someonewhocares.org/hosts/zero/hosts -o /etc/hosts.d/adblock 2> /dev/null
            update-hosts
        }

So if I want to update "adblock" (it is obviously an improper name) I simply do `sudo update-adblock` and if I change another file (mostly `/etc/hosts.d/dolead`) I'll just run `sudo update-hosts`.

Works wonders.

<comment><USER14> Have you been able to block stuff like Tynt, and other copy/paste triggered JS stuff?

<comment><USER13> I was not aware of Tynt, but I believe it's well blocked.

I just looked at the adblock-hosts file, and 'tynt' appears several times. One of those lines is commented with a link to an article about tynt[0]. I tried copy-pasting from The New Yorker and TechCrunch (who, as claimed by the author of the article, use tynt), and both times there was no crap appended.

0: [http://daringfireball.net/2010/05/tynt_copy_paste_jerks](http://daringfireball.net/2010/05/tynt_copy_paste_jerks)

<comment><USER14> Thanks, I may try this out and see if I can move over my few custom blocked sites that implement this stuff.

</comment></comment></comment></comment></comment><comment><USER15> > _Many people (including me!) will be happy with this trade-off — they will > gladly use extra memory in order to block ads._

Well, for me the whole point of blocking ads is because they are often big flash things that hog cpu and memory. If ABP is no better, then most of the reason is gone. I'd actually like to view ads to support more sites.

<comment><USER16> the point for me is the visual noise, not the memory that ads consume. Actually, normal users are used to the lag, they don't see it as much as we do. You can take a look at consoles that have run games at 30fps for decades and nobody complained.

<comment><USER17> I don't care about the "visual noise" of normal/banner-type ads - the real problem are those fucking layer ads with confusing icons (the X is the left one, the maximize button the right one), so if you want to read the content, first find out which type of layer ad it is, try to spot the 2x2px hotzone for the close button and THEN read the content.

People install adblockers because too many idiots became too fucking greedy and ruined ads for everyone else!

<comment><USER18> Exactly, they had their chance, and they abused the privilege, so now we've taken it away.

<comment><USER19> Tell me about it man; I found that food was getting kind of expensive at some of the restaurants I frequented so now I just dine-and-dash, several times a week. Restaurants as a whole had their chance to charge me for food, they abused it, so I took that right away.

/s

<comment><USER20> I can't figure out if you're making a sarcastic point in rebuttal against orclev, or, because the analogy is so bad, taking the piss out of people who would use that analogy.

</comment></comment></comment></comment></comment></comment><comment><USER21> This is like a commercial for forking Firefox to build highly efficient ad blocking into the browser.

It's sad that the most-demanded feature on every browser, as evidenced by plugin downloads, is ad blocking. However, all the major browsers are produced by companies with their hands in advertising, and this conflict of interest has resulted in this feature request going unfulfilled for a over a decade.

Fork 'em.

<comment><USER22> I don't think we can block ads in mainstream browsers because ad providers will just work around the blocks. Plugins provide defense in numbers against suck workarounds, making ad blocks actually effective.

<comment><USER23> This doesn't make sense to me. Why can't ad providers work around the blocks in adblock? And why could they work around those same blocks if they happened to be integrated into the browser itself?

Take popup blocking as an example. That's integrated into the browser and has almost completely eliminated the annoying popup ad.

<comment><USER24> >Why can't ad providers work around the blocks in adblock? //

It's not really a work _around_ but some sites do block your [full] access and say to turn off your adblocker if you want access to the [additional] content.

That said I don't think it makes much difference to the matter at hand.

</comment></comment></comment></comment><comment><USER25> I would like to see a lighter blocking list—one that _doesn't_ try to be absolutely comprehensive, but just focuses on the 95% of ads that can be fixed at 10% of the cost (actually I think it'd be more like 99% at 0.1% of the cost).

<comment><USER26> I've been using this on my Android phone (but have not audited it, I should really do that some time): [https://addons.mozilla.org/en- US/firefox/addon/bluhell-firew...](https://addons.mozilla.org/en- US/firefox/addon/bluhell-firewall/)

ABP has a huge page-load slowdown on my phone, this is essentially unnoticeable, and still removes the vast majority that I encounter.

</comment></comment><comment><USER27> My primary computer is a laptop from 2008 with a 2.5Ghz Core 2 Duo and other than a 1 second delay in startup I don't notice any performance degradation in general use compared to running without ABP.

Currently this machine has been up for 3 days and 17 hours and Firefox has been running the whole time and it is using 303MB with 4 tabs open one of which is the Daily Mail (don't judge!) which is an extremely busy page. This is perfectly acceptable in my opinion. I only have 4GB RAM which by todays standards in not much either. Obviously reducing the memory footprint is great but I can't say it has ever been a problem I have ever noticed.

On a side note the past few updates to Firefox have improved performance a lot. I am really impressed by how much quicker the browser is, especially with Chrome seeming to just get slower and slower with each update.

<comment><USER28> > I only have 4GB RAM

I've also seen this in some other comment, so I think it's worth pointing out: if you have a _desktop_ computer then yes, it's ok. However, there are also netbooks and notebooks around with _a lot_ less memory than that. Tablets, while not currently one of Firefox markets, are also commonly seen with less than that. Lots of parents with second-hand computers, too, which haven't been touched in a while because it "just works".

The overall attitude towards hardware is apparently "use it for two years, then throw away and get a new one", and yet underpowered computers surround me in a 5:1 ratio. I sometimes have to install plain old versions of software (Office '97 comes to mind) because the new ones provide 5% new features at the cost of half your memory.

Maybe everyone else has techie friends that only care about the latest and shiniest, or maybe the rest of the world is rich enough to throw away perfectly good hardware just because they feel like it. But from _my_ experience (as biased as it is), 4Gb is _not_ an "only" situation.

<comment><USER29> In my experience, Firefox uses less memory on systems with less RAM. My laptop only has 2Gb, and Firefox runs fine, even if on my work laptop it can reach 2.5Gb.

And I'm not shy about using tabs either, I often have many dozens open.

</comment></comment></comment><comment><USER30> Some sites have tried gimmicks to block adblock users. I wonder now if they'll make thousands of empty iframes.

<comment><USER31> Heh, not sure slowing down your own site for a reason unknown to most visitors is going to help your bottom line.

<comment><USER32> At the risk of stating the obvious, if your site is ad-funded then annoying users who don't see your ads so they go away and don't come back is a win. If they bitch about it to their friends who also wouldn't see your ads and those friends don't visit in the first place, it is an even bigger win.

<comment><USER33> I'm not so sure this is "obvious". It presumes that those people will never refer anyone who would watch your ads, and also that search engines won't down rank you in results based on the number of people bailing from your site instantly/avoiding clicking on it.

<comment><USER34> If you've bought into the lexicon of marketing it is. They're stealing revenue from you.

If you haven't, you're an asshole and you're fucking your users for no reason at all (ads are no reason).

</comment></comment></comment></comment></comment><comment><USER35> I'm just gonna say this as a person who uses ABP and has not done any low level memory analysis: browsing using ABP saves me much more time and makes my browsing much quicker:

-ads take so long to load and when ABP is not enabled bogs down my browser hard core

-when watching videos I have to wait 3-20 seconds for them to load, with ABP enabled I do not have to wait at all

It consistently saves me several minutes every day. If it adds a few extra milliseconds to load some style sheets I have never, ever noticed.

</comment><comment><USER36> I would recommend Privoxy rather than adblock. I chose it because it can be used with any browser rather than needing to be a plugin and have had great results with it. As a bonus I have it running on a virtual server and use an ssh tunnel on any system I end up using. This gets me round filters and installing things other than ssh. So if I am using my Android phone on free wifi, I know I'm not being dns hijacked or under HTTP MITM attack.

[http://www.privoxy.org/](http://www.privoxy.org/)

<comment><USER37> A drawback is that a proxy won't be able to filter HTTPS traffic.

<comment><USER32> That depends on the proxy. Systems that effectively MITM your own network's traffic have been around for some years now. All you need for outbound connections is to install an additional certificate in your browser so the proxy can act a trusted partner for HTTPS.

I don't know whether anyone has made such a proxy for use in the kind of situation we're talking about here, however.

<comment><USER38> Adguard does that. Been beta testing it. One adblock to rule them all kinda thing.

</comment></comment></comment></comment><comment><USER39> It's 2014.

My computer has 12 Gigabytes of RAM.

I don't give a shit, as long as i don't have to view those terrible stupid Ads.

Advertisers, fix your practises and i will view your Ads again.

<comment><USER40> One of the best ad-blockers is actually called FlashBlock (not sure this is the name today)

It will remove around 90% of obnoxiousness...

<comment><USER41> Or you just go to Tools > Addons > Plugins and chose to have Firefox ask you before it activates the Flash plugin for a page – same functionality I think?

<comment><USER40> Good, looks like it's a new feature.

Yeah, this would be more or less the same functionality (FlashBlock makes it per item, so you can, for example see a video but not activate the other elements)

<comment><USER19> I think the Firefox plugin option does this too (at least, it works that way in Chrome). You can activate a plugin (and only that plugin) by clicking on it.

</comment></comment></comment></comment></comment><comment><USER42> Wouldn't the solution involve allowing plugins to manipulate the content of a page before it is parsed by the browser?

There used to be a proxy adblocker that did that, but I don't think it works anymore.

The Kindle browser uses a proxy to pre-render pages on the server in order to lighten the load of the device.

Could AaaS (Adblock as a service) be a viable business? I think I'd pay for it.

<comment><USER43> > Could AaaS (Adblock as a service) be a viable business? I think I'd pay for > it.

It probably could, however I'm sure it would be shut down quickly by advertisers and parties showing ads - after all, you're offering a service to remove their source of income. Unless you'd funnel part of your subscriber's income back to the advertisers, based on whose ads you block. But I'm sure it'd end up being too expensive for the consumer and too much of a hassle for the one offering the service.

Not to mention you'd force your users to funnel all of their internet traffic through your servers, and it wouldn't work with encrypted pages (which large parts of the internet is moving towards)

<comment><USER23> > It probably could, however I'm sure it would be shut down quickly by > advertisers and parties showing ads

What legal leg would they have to stand on? There's no law that prevents me ripping out the ads of magazines that get delivered to me…

<comment><USER44> The same one that allows them to sue people for scraping their website.

Tech laws are absurd.

</comment></comment></comment></comment><comment><USER45> Use Bluhell Firewall and NoScript for Firefox instead of ABP. [https://addons.mozilla.org/en-US/firefox/addon/bluhell- firew...](https://addons.mozilla.org/en-US/firefox/addon/bluhell- firewall/?src=ss)

<comment><USER46> also don't forget to set noscript.firstRunRedirection to false after installing NoScript to prevent it from opening its homepage after every update.

</comment></comment><comment><USER47> i would rather have my browser crash and never open again for the rest of my life than not use adblock. take all the memory, CPU, fuck it GPU that you want, you fantastic addon.

</comment><comment><USER48> I think this is the fourth or fifth time, in recent memory, that I've seen someone from Mozilla criticize Adblock Plus and call on its developers to make changes. ABP startup time and memory consumption were subjects I recall, and its general impact on page load times may have been as well.

I can understand Mozilla taking some interest in how addons behave, and constructive feedback on extensions is a good thing. However, ABP is the type of extension that is likely to have issues in those areas because of what it does. Which is very important to users, especially those who rely upon it for its privacy and security enhancing capabilities. It is those users who should decide whether the performance and resource usage trade-offs are acceptable. Mozilla shouldn't make, or try to make, such decisions.

The situation with ABP 2.6 ([https://adblockplus.org/development- builds/faster-firefox-st...](https://adblockplus.org/development- builds/faster-firefox-startup), [https://adblockplus.org/forum/viewtopic.php?t=22906](https://adblockplus.org/forum/viewtopic.php?t=22906)) might not be a case of this, but that along with the wider pattern of platform developers being more controlling, does make me somewhat concerned about Mozilla taking too much interest in extensions. I hope my worries are for naught.

<comment><USER7> I'm the author of the post. I was extremely careful to keep the tone of the post neutral. This paragraph sums it up:

> So, it's clear that ABP greatly increases Firefox's memory usage. Now, this > isn't all bad. Many people (including me!) will be happy with this trade-off > — they will gladly use extra memory in order to block ads. But if you're > using a low-end machine without much memory, you might have different > priorities.

If you think this post is unreasonable, I think your skin is too thin.

<comment><USER48> I noticed that you said that, and expected others to notice as well. I don't really think your post unreasonable. I'm just a little concerned that, even in a case of pure intentions and desire for balance, extension developers may feel pressured to make changes and end up sacrificing features or effectiveness.

Did you notice how some people here, and at your blog, proposed modifications what would trade coverage for memory consumption? Even if that would result in _known_ filter hits being eliminated, and also without qualifying that if such an approach were adopted it should be preference based?

</comment></comment></comment><comment><USER49> For those who do not know, there is an EasyList without element hiding rules.

[https://easylist- downloads.adblockplus.org/easylist_noelemhi...](https://easylist- downloads.adblockplus.org/easylist_noelemhide.txt)

With these rules firefox's memory usage only goes up from 290MB to 412MB, instead of 1.5GB for the website mentioned in the article for me.

The downside is that this list has a more limited coverage than the full version of the list.

</comment><comment><USER50> Another (related) popular extension that I've noticed negatively affecting Firefox's performance is HTTPS Everywhere.

<comment><USER51> HTTPS Everywhere is mostly annoying because it stops random sites from working, and people generally forget to check that it's HTTPS Everywhere that's causing it.

</comment></comment><comment><USER52> Editing hosts files, installing Privoxy or Glimmerblocker, using Ghostery, Bluhell Firewall - I've tried all of these suggestions and unfortunately ABP is the only way to go if blocking all unwanted pop-up's is a priority.

</comment><comment><USER53> Anyone knows if this also affects Chrome? I have Chrome saying Adblock is using 126MB of memory, but if there are giant stylesheets injected elsewhere that might no be reported fully in the Chrome task manager.

<comment><USER54> As a chromebook user (with 2gb of ram) Adblock plus is routinely the chief culprit for slow downs. I've found it using 400mb of ram with sites like youtube and facebook open.

</comment></comment><comment><USER55> If you are on a low-end machine and can't afford a larger memory footprint, you should probably be using a lighter browser in the first place, but if you really want to use Firefox and block ads, one option is to just block them through your hosts file, then the addon becomes largely unnecessary.

[http://someonewhocares.org/hosts/](http://someonewhocares.org/hosts/)

[http://winhelp2002.mvps.org/hosts.htm](http://winhelp2002.mvps.org/hosts.htm)

</comment><comment><USER56> I'd love to hear the side-effects of using Disconnect.

</comment><comment><USER57> I'm surprised AdBlock is so popular. I tried it a few years ago and noticed the sluggishness immediately. I know it's not a feasible alternative in everyone's opinion, but if you're running a low end machine and want to block the most pernicious ads (flash, multiple external javascript, etc.) then Firefox + NoScript is the way to go.

<comment><USER58> The killer feature of ABP is: no Youtube ads. Is there any other way to achieve that?

<comment><USER13> `/etc/hosts`-blocking the ads works fine for youtube. See the list at [http://someonewhocares.org/hosts/zero/](http://someonewhocares.org/hosts/zero/)

<comment><USER59> Doesn't block them here.

</comment></comment></comment></comment><comment><USER60> Same issue appears in chrome as well. Got the site they linked to ~ 2.4GB before the browser stopped responding.

</comment><comment><USER61> Very interesting.

There might be an architecture problem here. Another solution is to use a proxy to block ads, like GlimmerBlocker for OSX. But I didn't investigate memory usage, though I tend to think it will be lower (plus have the added benefit of working simultaneously for all browsers).

<comment><USER62> A proxy cannot dynamically interact with the DOM, so it cannot do everything a plugin can. I think the solution is to use better datastructures in the plugin and improve the integratation of the plugin with the browser.

<comment><USER63> Cloudflare can, somehow...

<comment><USER62> Probably using Javascript, i.e., same mechanism as AdBlock Plus.

</comment></comment></comment></comment><comment><USER64> I use the program Ad Muncher for Windows, and I've found that it sometimes becomes a humongous bandwidth hog, when I'm watching video.

So it's not just memory that can be at risk of hogging.

<comment><USER65> are you sure its Ad Muncher using bandwidth and not, you know, the _video_ you're watching?

<comment><USER64> Sure. Windows's bandwidth monitor tells me as much - and closing Ad Muncher fixes the slog.

</comment></comment></comment><comment><USER66> On the other hand AdBlock (edge of course, not the co-opted plus), saves quite a bit of network traffic. Nice if you're on metered (or slow) internet.

</comment><comment><USER67> I switched from Firefox to Safari , when I found out 900 Mb used by firefox on my machine , now I know the real reason behind that .

<comment><USER7> That's a surprising story from a user named "linux_devil"!

Maybe it's time to try switching back?

</comment></comment><comment><USER68> Did I read that correctly? One website had 400 iframes? FOUR HUNDRED? Not 4, but 4 HUNDRED? Surely there is a better way.

</comment><comment><USER69> Ah, 3 words that always seem to show up together: firefox and memory and usage. I look forward to when I see that 4th word, "minimal", in there as well. Yes, I know original post is about an addin increasing memory usage, but I guess that doesn't surprise me anymore either, sadly, when thinking of firefox.

Even with the memory pain, I still (mostly) love FF.

<comment><USER7> It's much better than it used to be. For example, Firefox 15 made a class of very common leaks caused by add-ons impossible. Firefox 26 massively reduced the amount of memory used on image-heavy pages. And there have been _many_ smaller improvements over the past three years, under the aegis of the MemShrink project ([https://wiki.mozilla.org/Performance/MemShrink](https://wiki.mozilla.org/Performance/MemShrink)).

</comment></comment><comment><USER70> My browser is fast again!

Thank you, really thank you.

</comment><comment><USER71> LastPass is victim of the same fate.

<comment><USER72> LastPass is bearable if you disable all the DOM-modifying options, such as highlighting and adding pretty icons to input fields. Instead I use keyboard shortcuts to select the login info to use.

</comment></comment><comment><USER73> if 19 million people use it, why hasn't it become a feature firefox offers itself ? doesn't this mean people want some option of blocking ads ? I'm guessing this a native-integrated version will require a lot less memory...

</comment><comment><USER74> So is there any insight as to why? My guess, without looking at the code would be the regex engine allocating millions of NFA graphs.

<comment><USER7> Nope. [https://bugzilla.mozilla.org/show_bug.cgi?id=988266#c20](https://bugzilla.mozilla.org/show_bug.cgi?id=988266#c20) has a detailed breakdown of the style-sets memory usage.

</comment></comment><comment><USER75> You guys: you've got to stop using this.

You're missing important messages from sponsors.</comment>


GridGuide: Photoshop grids that don't suck - <AUTHOR> http://guideguide.me

<comment><USER2> This has been out for over a year.</comment>


Apple iPhones Found to Have Violated Chinese Rival's Patent - <AUTHOR> http://www.bloomberg.com/news/articles/2016-06-17/apple-s-iphones-found-to-have-violated-chinese-rival-s-patent <comment><USER2> Chinese brands get constantly harassed by Apple lawyers in the US about patents. Now that China is an important market for Apple, I find it hard to feel sorry for Apple getting a taste of their own medicine.

<comment><USER3> Is it possible that the 100C was based on iPhone 6 mock ups that leaked and the Chinese company copied it to get it to market first?

This would not be the first time this happened:

[http://www.androidauthority.com/goophone-sue-apple- china-112...](http://www.androidauthority.com/goophone-sue-apple- china-112190/)

<comment><USER4> That's how design patents work in the USA, also. If you can get secret designs from a competitor and patent them first, you can then wait for the product to become popular and sue.

And design patents are not considered to require examination as to content in the USA. They're just approved if the forms are filled out correctly.

And if any part of the design of a product (even just one rounded corner on a $700 phone) resembles a patented design, you're entitled to 100% of the profit ever made on that product in the USA. China is nowhere near that shifty.

</comment></comment></comment><comment><USER5> The big picture here is not whether this ruling is just. It's that China has protectionist impulses, and that if Apple is to maintain the kind of volume of smartphone sales that propelled it to its 2015 valuation, it needs China. And China may be inclined to throw up a bunch of nasty speedbumps in its way.

That said, there's plenty of value in Apple selling iPhones at the rate necessary to maintain the mostly saturated markets in the West, so don't get myopically focused on China.

<comment><USER6> > It's that China has protectionist impulses

So do US juries, hence the Apple lawyers continually referring to Samsung as Samsung Korea.

[http://arstechnica.com/tech-policy/2016/03/as-4th-trial- near...](http://arstechnica.com/tech-policy/2016/03/as-4th-trial-nears- samsung-asks-judge-make-apple-stop-talking-about-korea/)

The idea that China is doing anything that the US wouldn't is ridiculous, every country engages in this stuff the only difference how is complex the US, UK and other Western countries do it. China does it simplistically and obviously, but meh... every country does it, and Apple have been wrong to encourage this stuff to their advantage when everything comes around eventually.

<comment><USER7> Exactly, China's massive cheap labor force and emerging markets give it the position of "fuck you". China knows that first world TNCs want a piece of the pie and China is grooming it's domestic (see "state run") corporations to reap the benefits.

</comment></comment></comment><comment><USER8> "Design Patent", aka some look and feel thing that is stupidly vague.

I seem to remember in the Apple v. Samsung case there were several of these on concepts like "a rectangular phone form factor" or similar...

<comment><USER9> Rectangular with curved edges I think was the issue there.

<comment> nv-vn Effectively the same thing considering the fact that a perfect rectangle would be impossible to make.

<comment><USER4> With design patents, you don't have to specify transitions or curve radii. It's enough to draw that the corners are curved. There is no examination of the content of design patents and lack of specificity is generally not considered a problem by the PTO and courts.

</comment></comment></comment></comment><comment><USER10> I don't read Chinese and the patent isn't translated. Anyone have any idea what Apple violated? It's interesting, in a country where you HAVE to give up IP to competing companies to enter the market, that there can be any IP disputes - considering much of what Apple has done is directly copied into Chinese goods.

If that rule didn't exist, China would be a 3rd world economy still stuck making shitty goods.

<comment><USER11> Where did you find the patent? If it's anything like a US design patent, then you should be able to learn a lot just by looking at the pictures.

<comment><USER12> He is perhaps referring to what the court's ruling said - [http://www.bjipo.gov.cn/zlzf/zfjggg/201605/P0201606093729650...](http://www.bjipo.gov.cn/zlzf/zfjggg/201605/P020160609372965002381.pdf)

</comment></comment></comment><comment><USER13> Strange that this only has any effect in Beijing, despite the company being based in Shenzhen. Do China's lowest-level courts only have citywide jurisdiction?

If US patent decisions only applied to the location a suit was tried in, I suppose we'd have a lot fewer filed in East Texas.

<comment><USER14> China has different IP regimes at the city level. Haha.

[http://www.motherjones.com/kevin-drum/2016/06/china-has- whol...](http://www.motherjones.com/kevin-drum/2016/06/china-has-whole-lot- intellectual-property-authorities)

 _Yet another cell phone patent dispute. Except for one thing: "Beijing" is not being used here as a metonym for "the Chinese government." It means Beijing. The city of Beijing, which apparently has its own intellectual property authority. Do other cities also have their own IP authorities? Apparently yes:

{quotes: [http://www.chinabusinessreview.com/enforcing-intellectual- pr...](http://www.chinabusinessreview.com/enforcing-intellectual-property- rights-in-china/)}

Civil enforcement of IPR in China is a two-track system. The first is the administrative track....Set up in the provinces and some cities, these local government offices operate as a quasi-judicial authority and are staffed with people who specialize in their respective areas of IP law. If they are satisfied with an IPR holder's complaint, they investigate. The authorities can issue injunctions to bring a halt to the infringement, and they can even enlist the police to assist in enforcing their orders.

How about that? Cities can't award monetary damages, but they can order your product off the shelves. _

</comment></comment><comment><USER15> Play the patent game and you are bound to lose in the end, with no high tower to go preaching from about how _their_ patents are trivial.

That said, I'm sure apple can afford to pay or lawyer their way out of this.

<comment><USER16> Tough luck you.

Apple wasn't barred after all...

</comment></comment><comment><USER17> When did China start caring about intellectual property?

<comment><USER18> When it started applying to Chinese companies

<comment><USER19> Which seems to add evidence to the case: you care about IP when you have much to lose through copying, you disregard IP when you have much to gain by copying: [https://www.techdirt.com/blog/innovation/articles/20130228/0...](https://www.techdirt.com/blog/innovation/articles/20130228/01324622146/yes- us-industrial-revolution-was-built-piracy-fraud.shtml)

</comment></comment></comment><comment><USER20> Apple will be able to appeal this and continue selling phones in the mean time. Pretty interesting regardless considering their investment in Didi last month to gain favor with Beijing.

Two possible takes are that this is either a low enough court that the judge had autonomy in his ruling and wasn't influenced by the investment, or Beijing is sending a message that the Didi investment will not grant Apple any sort of impunity going forward.

</comment><comment><USER21> [http://g04.a.alicdn.com/kf/HTB1qM3iHFXXXXayaXXXq6xXFXXXn/221...](http://g04.a.alicdn.com/kf/HTB1qM3iHFXXXXayaXXXq6xXFXXXn/221820712/HTB1qM3iHFXXXXayaXXXq6xXFXXXn.jpg)

Anyone else see a resemblance to the 3gs, just a couple years slimmer? "Plastic rectangle with curved edges" is a design that Apple did forever ago (in smartphone time).

</comment><comment><USER22> You planted the trees, now enjoy your fruits!

</comment><comment><USER23> It's all about protectionism.

Apple should threaten to move the manufacturing of the iPhone out of China, laying off 100s of 1000s of people.

<comment><USER7> And lose all that cheap labor? China knows that threat would be empty.

<comment><USER24> The cheap labor is a dead-end under all scenarios.

Robotic manufacturing will eliminate most of those jobs within 10-20 years. China already has half a billion people with no jobs available to them, that are pretending to work as subsistence farmers currently. The labor will always be cheap, it's the politics that will become extremely expensive. Apple should get started on moving off of that labor while they still have the vast financial capabilities to do so.

</comment></comment></comment><comment><USER25> Any evidence that this isn't a state-ran "company" claiming Apple infringed on something it copied from Apple?

<comment><USER26> I think that losing that gigantic Apple manufacturing contract would be undesirable for the state.

<comment><USER27> The infrastructure to make iphones at the scale they do doesn't really exist anywhere else.

<comment><USER26> There's already a shift to robotics in chinese manufacturing, you can put those robots in another country: [http://www.bbc.com/news/technology-36376966](http://www.bbc.com/news/technology-36376966)

<comment><USER27> The robots are already there. You are going to have move the robots setup the infrastructure etc. You need reliable power, transportation, etc.

</comment></comment></comment></comment></comment><comment><USER28> Always good to see 100% completely neutral rulings from local arms of the Chinese government that are unconnected to personal interests and otherwise without blatant conflicts of interest.

</comment><comment><USER29> Given the design diversity that we might see from a large number of small phone producers, it seems inevitable that Apple may have something in common with one of these phones. I wonder if you get to a point where you can't change your design for fear of infringement.

</comment><comment><USER30> Garbage article, doesn't even give details on what they violated.

</comment><comment><USER31> The U.S. should probably restrict companies from complying with Chinese IP laws until they respect ours.

</comment><comment><USER32> Oh the irony.</comment>


Jerry Walker's Low-Level Hardware Channel on YouTube - <AUTHOR> https://www.youtube.com/channel/UCGkakWu37P6CuzIZbTlCmvg/videos <comment><AUTHOR> Related:

Video: TIME3 microprocessor built from discrete transistors

[https://www.youtube.com/watch?v=GXRp7zmWwN8](https://www.youtube.com/watch?v=GXRp7zmWwN8)

Book: Computer Time Travel: How to build a microprocessor from transistors

[https://www.amazon.com/Computer-Time-Travel- microprocessor-t...](https://www.amazon.com/Computer-Time-Travel- microprocessor-transistors/dp/0995707200)</comment>


Announcing B Combinator - <AUTHOR> http://www.brightwurks.com/blog/announcing-b-combinator/

<comment><USER2> Seriously, I think you guys should pick another name.

PG has worked very hard to build his brand with YCombinator. A lot of people benefit from it financially and otherwise. Naming your startup BCombinator, seems to me like naming a startup NewMicrosoft or 2Google.

If you guys have a good idea, come up with unique name for it, and work to build your own brand. Then if you hit it big, your own brand will not be diluted.

<comment><USER3> How ironic. While the Y combinator is a primitive, and necessary for the implementation of recursion. The B Combinator is technically an inessential function that can be derived from the more primitive S and K combinators.

<comment><USER4> True, but almost everyone who is not into combinator calculus is just going to see:

YCombinator. BCombinator. Wait. They are not associated despite just a single letter difference?

It is a similar problem as with ESL, ESL-Radio and ESL-TV. Sounds like they are an esports league, a radio reporting about an esports league, and a video streaming site about that esports-league? well... wrong. ESL-Radio has almost nothing to do with ESl and ESL-TV and is a video streaming site about ESports, while ESL-Tv streams some subset of the Esports league ESL, and the ESL is a big esports league.

So... please value distinct names to save us all a bunch of confusion.</comment></comment></comment>


The Cost of Defying the President - <AUTHOR> http://www.newyorker.com/culture/culture-desk/the-cost-of-defying-the-president?mbid=synd_digg <comment><USER2> Here's some background for the strike: [https://en.wikipedia.org/wiki/Professional_Air_Traffic_Contr...](https://en.wikipedia.org/wiki/Professional_Air_Traffic_Controllers_Organization_\(1968\))

 _The Professional Air Traffic Controllers Organization or PATCO was a United States trade union that operated from 1968 until its decertification in 1981 following an illegal strike that was broken by the Reagan Administration. According to labor historian Joseph A. McCartin, the 1981 strike and defeat of PATCO was "one of the most important events in late twentieth century U.S. labor history"._

</comment><comment><USER3> tldr:

"The moment the strike was called, the President, armed with several contingency plans, replaced striking controllers with a skeleton crew of military personnel, F.A.A. brass, new hires ushered through training, and, of course, controllers who had chosen not to strike. Rumors abounded that the skies were plagued with near-misses and flights rerouted to alternative airports, but no deaths were ever reported. (It was ruled that the crash of Air Florida Flight 90 into the frozen Potomac, on January 13, 1982, which killed seventy-eight, was due to errors by the pilot and crew.) The public suffered an inconvenience on the magnitude of a gas shortage or a natural disaster, and for that inconvenience, by and large, the public blamed patco. Although diehards continued to picket for weeks, the strike officially ended on its third day, August 5, 1981, the day that striking controllers were terminated. The Reagan Administration won an order decertifying patco altogether on October 22, 1981, and rewarded scabs handsomely for their loyalty. Many of their rewards mirrored patco's original demands."

</comment><comment><USER4> Tldr. Long article about the wonders of unions and how Reagan was mean to the federal employee unions.

<comment><USER5> Please don't post unsubstantive comments.

<comment><USER6> The wording hints at bias against the article's own, but I found it to be an accurate, succinct comment nonetheless.

<comment><USER5> I wonder whether accuracy and succinctness are sufficient for substantive discussion.

<comment><USER6> Is substantive discussion the only measure of value on an HN board post? Personally, I find the lack of a synopsis ("why you should click this link") frustrating in HN. It leads to claims of "click bait" because, frankly, if you don't make a click-bait-y title, I'm not as likely to ... click. "Wait, what IS the secret to happiness in silicon valley?"

Point being, most HN discussions offer insight into what the link actually is, since HN itself doesn't provide that with just a gimmicky title. Does a summarizing comment unfairly boil down a long read? Yes. Does it still provide value to those that want it? Yes.

Both are reasonable assessments of value.</comment></comment></comment></comment></comment>


A NeoCon-Backed "Fact Checker" Plans to Wage War on Independent Media - <AUTHOR> https://www.mintpressnews.com/newsguardneocon-backed-fact-checker-plans-to-wage-war-on-independent-media/253687/ <comment><USER2> I haven't seen the word neocon used much in quite a while. Never seen this fact checker thing before. I thought the Bush clan were generally not friends with the trumplicans.</comment>


Pilot Who Survived Space Crash Says Parachute Opened Itself - <AUTHOR> http://www.bloomberg.com/news/2014-11-12/pilot-who-survived-spacecraft-crash-says-parachute-opened-itself.html <comment><USER3> >The subject's last memory before passing out was the realization that the water on his tongue was boiling, according to NASA.

That is not something I would ever want to experience.

I wonder how similar this environment is the the SR71 that disintegrated [1]. Luckily the SR71 pilots wore space suits with this happened. Otherwise I dont think he would have survived.

[1][http://www.916-starfighter.de/SR-71_Waever.htm](http://www.916-starfighter.de/SR-71_Waever.htm)

<comment><USER4> That doesn't mean the water was super hot, though.

<comment><USER3> The next sentence in the article is:

>Water boils at lower temperatures as pressure decreases.

<comment><USER5> So it wouldn't feel boiling-hot, just weird and bubbly?

<comment><USER6> Anyone who's put liquid nitrogen in their mouth (and if you haven't, you've missed out) knows the feeling.

<comment><USER7> Please don't: [http://www.telegraph.co.uk/health/9594000/Warning-over- liqui...](http://www.telegraph.co.uk/health/9594000/Warning-over-liquid- nitrogen-drinks-after-girl-loses-stomach.html)

<comment><USER6> Yeah, you should obviously not actually ingest it.

<comment><USER8> The risk of shattered teeth stopped me from trying that one.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><AUTHOR> Crash investigation (Source - NTSB : [http://www.ntsb.gov/news/2014/141112.html](http://www.ntsb.gov/news/2014/141112.html))

According to the pilot, he was unaware that the feather system had been unlocked early by the copilot. His description of the vehicle motion was consistent with other data sources in the investigation. He stated that he was extracted from the vehicle as a result of the break-up sequence and unbuckled from his seat at some point before the parachute deployed automatically. Recorded information from telemetry, non-volatile memory, and videos are being processed and validated to assist the investigative groups.

... The investigation is ongoing. Any future updates will be issued as events warrant.

<comment><USER9> Yes, that's actually the only source of new info.

<comment><USER10> I was also interested in the fast that they weren't in pressure suits. Apparently the ingress/egress hatch is so small as to preclude them wearing basic safety equipment. I'm becoming less and less sympathetic to Virgin Galactic the more I hear.

<comment><USER11> Cut the company some slack. Space flight is hard. There are physical constraints imposed by the laws of Nature that have to be carefully weighed. It is easy to forget this fact when all you ever do is software design or whatever.

<comment><USER12> Not too much slack. It's true that space flight is hard. But it's also true that Virgin Galactic is a company based entirely around sub-orbital space tourism. The level of risk we should consider acceptable for what's essentially an ultra-high-priced amusement park ride is rather lower than the level of risk we should consider acceptable for space exploration.

<comment><USER13> People who pay to go can make their own decision if the risk is acceptable to them or not. It's not anyone else's business to decide what the acceptable level of risk is.

<comment><USER14> >People who pay to go can make their own decision if the risk is acceptable to them or not. It's not anyone else's business to decide what the acceptable level of risk is.

until they are a MIT trained airspace engineers, i doubt they are able to estimate the risk and thus to make a fully informed decision on their own. This is why it is official government agencies' business to at least establish minimum acceptable risk baselines.

<comment><USER15> And that's how you end up in a society where all risk-taking is banned to the fringes. No thanks, I'd much rather sign the "waiver from hell". High-risk activities CAN be self-regulated by industry, i.e. skydiving.

<comment><USER12> I'm no expert on this subject, but a small amount of Googling suggests that rumors of skydiving's lack of regulation in the US have been greatly exaggerated. For example, you can't just pack your own chute - there's a special FAA certification you have to get before you're allowed to do that.

The rules I'm seeing seem more like the ones that govern recreational sailing, which is a topic I'm more familiar with: If you're just doing it on your own, sailing is fairly lightly regulated. Your boat needs to meet some minimum requirements for safety equipment and the like, but for the most part all the rules for recreational sailing are voluntary and self-imposed by the community.

But all that goes out the window once you start doing it commercially. If you want to take tourists out on a day sail, you need to be a licensed captain and there's a whole host of federally-imposed rules about how you operate your boat that come into play.

Virgin Galactic isn't analogous to some guy day-sailing in his own boat. SpaceShipOne would have been, but SpaceShipTwo is much more analogous to commercial sailing, which _is_ comprehensively regulated for the sake of consumer protection.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER16> To survive this is absolutely incredible, the only pitty is that the article lacks so many interesting details!

Was he wearing the chute on his back? (So,he had to get out of his seat to be able to open)

What kind of AAD was he wearing ? (was it an off the shelf AAD like a Cypress?)

What where it's settings? pass through such altitude at such vertical speed to open..

Any one knows? any links?

<comment><USER9> Good thing: NTSB will release a full report at some point with all these answers.

Bad thing: Until then, they tend to not say much.

<comment><USER17> Some might consider that to be two good things...

</comment></comment></comment><comment><USER18> After all the speculation about engine failure, it sounds like the culprit is a combination of poor design and pilot error.

The "Feather System" was unlocked by a pilot too early in the flight, then air currents caused it to activate in atmosphere instead of near vacuum - <USER2> tearing the ship apart.

<comment><USER19> But part of the flight procedure is to actually unlock the feathers slightly later in the flight - at Mach 1.4.

The article states this is to make sure the feathers are operational before heading upward, but that seems like a really narrow margin of time to execute this test.

<comment><USER20> While speed is a factor, it isn't the only factor. The altitude at which they are unlocked matters as well. Moving at Mach 1.0 at a lower altitude could subject the plane to far greater forces than at Mach 1.4 at a much higher altitude, where the air is thinner.

Furthermore, where the force is coming from probably also plays a role. The angle of the force applied to the feathers may change when the force is not coming from a fall, but is instead the result of the engines provide force from behind the fuselage.

</comment></comment></comment><comment><USER21> This was by design, not magic.

<comment><USER22> Did the copilot's chute also deploy?

<comment><USER23> Apparently yes. He was found in the wreckage, strapped in his seat, with the chute partially deployed. It probably deployed automatically during the fall and shot out between the pilot and the seat.

<comment><USER22> Perhaps NTSB will have some thoughts about how to coordinate seat separation and chute deployment.

<comment><USER23> If you don't have an ejection seat, getting kicked out of your seat inside a cockpit doesn't sound terribly helpful. Inflight breakup situations where the pilot breaks free in their seat are so rare that this would probably would cause more accidents than it would save lives.

Ejection seats do kick you out of the seat automatically sometime after ejection so that the automatic parachute deployment can work.

<comment><USER22> _Inflight breakup situations where the pilot breaks free in their seat are so rare..._

Do intuitions developed about airframe integrity in an aviation context necessarily apply to spaceflight? Normally I wouldn't think automatic chute deployment would have much value without a full ejection seat, although in this case it saved a life. Did the designers of this craft actually have a meeting in which they decided that the likelihood of this exact sort of incident is so much higher than an intact-vehicle incident that an automatic chute is warranted while an ejection seat is not?

For some reason I suspect that a couple of years from now we'll be reading a tell-all about the culture of risk-taking at "The Spaceship Company". (Whether such a book is warranted or not.)

</comment></comment></comment></comment></comment></comment><comment><USER24> Does anybody know if it's common that an aircraft can be structurally compromised like that due to user error?

I can easily imagine the stress on the airframe doing manoeuvres like this, if I were a pilot I'd be absolutely terrified that it were possible for me to flip a switch and just have the vehicle I'm in disintegrate around me.

edit: whoops, commented on a day old thread, what a dingus

</comment><comment><USER25> > _"I can't imagine the forces he must have experienced being thrown out of > the aircraft," Sventek, who spent 31 years in the U.S. Air Force, said in an > interview._

Some initial impulse from the ejecting motion of the craft breakup, and then immediately after losing contact, the only net force should be the one from air drag due to the velocity. There is gravity, of course, but in free-fall, that force is balanced by your acceleration so you don't feel it. As you reach terminal velocity, it rises toward 1g.

That air drag would be a big force, though, when you're thrown into the air at the craft's velocity.

<comment><USER26> Did a little bit of a back of the envelop calculation on the subject, so this maybe completely bogus, be aware.

It would seem like the temperature that the pilot experienced upon ejection at Mach 1 at 15000m (when they broke apart) would be about -13C, which is reasonably survivable[1]. The pressure experienced is probably around 22kPa absolute, which in theory will generate anywhere between 6 - 20g[2]. Not pleasant, but survivable.

Given these, it takes a lot of luck to survive those conditions (1/5th atmosphere, extreme acceleration, low temperature when he falls), but it might be more survivable than we think (this is much better than exploding and ejecting at lower altitudes)

[1]: Calculation via the stagnation temperature at that speed for the standard condition at that altitude (Temperature ~= 217K, P ~= 12kPa)

[2]: Stagnation pressure on him in the front of the body (23kPa), ambient at the back. Average male body surface area is about 2m^2, depending on the geometry you might be able to get down to a quarter of that. Throw in the mass of the pilot (70kg? 90kg?), you should get accelerations in those ranges.

Edit: some more interpretations

<comment><USER27> Your temperature is just plain wrong, the standard atmosphere model states -6.5°C per 1000m. This is means that the temperature was -97.5C below surface temp. So -70C is more likely.

[http://en.wikipedia.org/wiki/International_Standard_Atmosphe...](http://en.wikipedia.org/wiki/International_Standard_Atmosphere)

<comment><USER28> Could the low temperature have helped with regard to thin air?

I'm no expert, but I seem to recall that cold limits the damage from hypoxia.

<comment><USER29> Hypothermia does provide some protection against hypoxia-induced brain damage. However, exposure to air at -13C for only a few minutes is very unlikely affect your core body temperature enough to cause hypothermia. And anyway, the time taken to fall from 15km to a more tolerable altitude would probably not be long enough to cause that type of damage in the first place.

</comment></comment></comment></comment></comment><comment><USER30> Warning: link plays loud video shortly after opening.

</comment><comment><USER31> Are they seriously going to blame the dead pilot for the crash.

Even if he might have caused it, playing the blame game does not feel very professional. I would be very careful before making such a statement.

<comment><USER32> How do you manage to say both of those things at once?

He caused it, but he's not to blame?

I mean if you want to talk about other systemic factors then fine. But otherwise your request is nonsensical.

<comment><USER31> It could be cause they did not train him properly, or other factors out of his control. Who knows....

<comment><USER15> While I agree it's useful to look at the bigger picture to avoid future mistakes. He pulled the switch, the buck stops with him. Could be fatigue, could be bad training, but ultimately for the purpose of the investigation it's human error.</comment></comment></comment></comment>


GlobeTempus – Time Zone Converter - <AUTHOR> https://www.globe.studio/globetempus <comment><AUTHOR> GlobeTempus is a simple and elegant application that converts time zones on the fly and makes worldwide travels more comfortable and enjoyable by letting you explore world landmarks and watch days and nights to pass by.</comment>


Theoretical Limit Of Solar Cell Efficiency Probably Broken - <AUTHOR> http://cleantechnica.com/2013/03/25/solar-cell-efficiency-theoretical-limit-broken-single-nanowire-super-concentrate-sunlight/

<comment><USER2> [0] appears to be the original press release, as linked to from the comments of the OP. If you like annoying pop-ups, I'd suggest going to cleantechnica.com, though :)

[0] [http://www.nbi.ku.dk/english/news/news13/nanowire-solar- cell...](http://www.nbi.ku.dk/english/news/news13/nanowire-solar-cells-raises- efficiency-limit/)</comment>


Game Programming Patterns: Double Buffer (2014) - <AUTHOR> http://gameprogrammingpatterns.com/double-buffer.html <comment><USER2> I thought this would only apply to rendering graphics, but after reading the "When To Use It" section, I realized I've done double buffering on entire game states before (~2 years ago project). At the beginning of my update loop, I'd (deep) copy the current game state into a new object and begin incrementally updating the copy. Then I'd reassign right before Thread.sleeping (or whatever language idiom) until the next game loop "tick".

Wasn't too fond of my C# deep copy solution: var serialized = JsonSerializer.Serialize(this); return JsonSerializer.Deserialize<GameState>(serialized);

I took an interested in functional programming, pure functions, immutability, etc. soon after.

<comment><USER3> "Double buffered" (transactionally updated) game state is basically required if you want to avoid strange nondeterministic glitches as entities update based on partially updated world state. Persistent immutable data structures are great for this purpose as they typically attempt to minimize actual copying. UI logic in regular applications also greatly benefits from immutable state, which is indeed what things like React are based on.

<comment><USER4> Double buffering and determinism are not necessarily related. Determinism requires that everything that could affect the execution of logic is captured as part of the input, and (this is the annoying and error-prone part), that anything that is not captured as part of the input does NOT affect execution of logic.

If execution of logic is always performed in the same order, then the partially updated world state is not a problem for determinism (though it may be for correctness). Double buffering may let you reorder the execution of logic in different ways and still keep it deterministic. This would likely be needed for logic that executes in parallel threads, which is increasingly important for high-performance game engines.

<comment><USER3> Yes, true, "unpredictable" is probably better. Depending on how exactly entity lists are managed, from player/dev point of view it can seem close to nondeterministic in practice even if a theoretical 1:1 replay would give identical results.

</comment></comment></comment></comment><comment><USER5> This is a very nice article on double buffering, and I especially love the extension to game state. I never thought of that at double buffering, but yes I'm frequently keeping "previous frame" state for a lot of different systems including physics, controllers, AI state machines, etc. They are usually ad- hoc buffering. Each system handles it's own. This makes me wonder if it would make any sense to unify previous frame memory, what it would look like, and whether there might be advantages.

> In their hearts, computers are sequential beasts. [...even with several > cores, only a few operations are running concurrently.]

My one small nitpick is that the presentation at the beginning felt very single-core CPU centric, even with the side note on threading. GPUs are both parallel processors, and they're being used in parallel with the CPU; many games are running things like CPU physics in parallel while the GPU is doing rendering. And to really see this point, many games use triple buffering and are doing some amount of overlapped rendering of two frames at the same time, not just one.

</comment><comment><USER6> Interestingly enough, there were many games in the 8 bit era that you could watch the scene render from back to front (golf games were notorious for this), and going back even further, early video game systems lacked a frame buffer at all.

<comment><USER7> The golf games (Leaderboard Golf comes to mind: [https://www.youtube.com/watch?v=4jA5eKk10Wo&t=803](https://www.youtube.com/watch?v=4jA5eKk10Wo&t=803)) had to do this because it took incredibly long time to render a 3D map on the screen. No chance those machines could've rendered the whole scene within a few frames.

The games just made it a visual gimmick for the player to watch the drawing instead of offering a waiting screen, rendering to a backbuffer and then copying the image over.

Frankly, I wouldn't be surprised if the rendering was even made a bit slower so that the player can see the areas fill up in human-scale time. For example, a C64 with 6502 can fill polygons faster than what you see on the screen.

<comment><USER8> I don't know ... I remember using a paint program where something like a flood fill, actually ran before your very eyes... at something like 4-5MHz there isn't a lot of CPU to do your bidding so game logic, music, graphical rendering all takes a slice and you don't even have any kind of preemptive scheduler to make sure everyone stays in time. I'd say with this kind of game the developers were more focused on the game mechanics. The graphics were just "good enough" for what they were trying to do.

<comment><USER9> The C64 ran at 1Mhz. Other contemporary CPUs that were clocked faster tended to take multiple clock cycles per instruction so it came down to the same.

<comment><USER8> Was it the spectrum that ran at 4MHz? Thanks for the correction!

<comment><USER10> Not the poster but yes, the Spectrum was at about 3.5Mhz.

</comment></comment></comment></comment></comment></comment><comment><USER11> If this article tickles your fancy, you should read the whole book. Bob did a great job on it! It's all available on the website for free, or you can pay for a nice copy if you'd like to support his efforts.

He's also writing a new book about creating interpreters: [https://craftinginterpreters.com/](https://craftinginterpreters.com/)

<comment><USER12> Thank you for the compliment! :)

<comment><USER13> Thank you for the book! The chapter on the prototype pattern was the first time that I fully grokked the Factory pattern. And, your's is the only resource I've found that has thoughtfully constructive thoughts on singletons.

</comment></comment></comment><comment><USER14> On games this can be quite expensive in terms of frames per second and smoothness because of how it interacts with the monitors refresh rate. If the next buffer isn't quite ready in 1/60th of a second for the start of the monitors refresh then you basically have to sit there doing nothing until the monitor is ready for you again. Now the user sees the same image for two frames then a jump and your frames per second has fallen off a cliff. You can try to mitigate that with triple buffering but that's starting to take a lot of memory up now that you want to use for other things.

AMD has this standard for interacting with the monitor refresh now called FreeSync. Now the game can communicate with the monitor to tell it when the buffer's ready, to get around the problems caused by a fixed 60hz refresh. A lot of 'gaming' branded screens are supporting it now.

<comment><USER15> (a) this uneven frame-pacing is called "judder"

(b) you only get judder with vsync=on, vsync=off just flips to the new buffer as soon as it's available. The downside is that you tend to have a visible seam or "tear" in the image when the buffer flips.

(c) the memory for triple-buffering is trivial, that's not the problem. The real problem is that you need to be pushing a framerate at least as high your monitor's refresh rate, and ideally 2x your refresh rate. That's undesirable in a world where you don't have infinite money to spend on hardware.

(d) NVIDIA actually pioneered this technology, AMD came in with a copycat implementation after the fact. AMD has the advantage of not needing special hardware in the monitor, but it usually comes with the disadvantage of only being able to sync over a narrow range, such as 40-60 Hz. Some monitors have as narrow as a 10-hz sync range, and many of them tend to flicker once they get down to the lower end of their sync range. There are currently a total of three FreeSync monitors on the market that don't totally suck.

[http://techreport.com/news/25867/amd-could-counter- nvidia-g-...](http://techreport.com/news/25867/amd-could-counter-nvidia-g- sync-with-simpler-free-sync-tech)

[https://gpunerd.com/guides/freesync-monitor- list](https://gpunerd.com/guides/freesync-monitor-list)

<comment><USER16> > with the disadvantage of only being able to sync over a narrow range, such > as 40-60 Hz.

1) This is not the problem of FreeSync itself but of the panels and their support for VRR.

2) I have 2 FreeSync monitors at home which both do 40-144Hz (Acer XF270HUA and Benq XL2730Z). In addition, more than 2 years ago AMD added LFC to help with the classic case of "FPS drops below FreeSync range" issue. I don't notice any issues with judder when my framerate goes below the range for 1 or 2 frames.

Your info is out of date. Nowadays FreeSync is just as good as GSync if you get a monitor of good quality (and you still pay 150-300$ less just because it isn't GSync).

<comment><USER17> Are FreeSync and GSync interchangeable? Can a FreeSync monitor work with an NVIDIA card, or viceversa?

<comment><USER18> No. When NVidia created GSync, they enforced quality far beyond what the specification could manage and used proprietary technology and consultant engineers to accomplish it. AMD copied their efforts with Freesync by getting some of it added to the DisplayPort protocol. NVidia sees it as an inferior copy and won't support it. AMD and many others see GSync as an exclusionary market grab through tie-ins.

Despite many claims to the contrary from Freesync supporters, it's still the case that only a handful of Freesync displays will give near the same experience as nearly all GSync displays.

</comment></comment></comment></comment></comment><comment><USER19> Having grown up with this, I think it's part of the reason why React feels so natural and "right" to me.

Whenever I've used frameworks based on data-binding, my mind tries to rely on an analogy like modular synthesis where elements are connected with wires ([https://modularsynthesis.com/DJB- synth.jpg](https://modularsynthesis.com/DJB-synth.jpg)). That works great for tiny demos but poorly for highly dynamic UI's. Maybe I just need a different analogy to properly grasp it.

<comment><USER20> Weird comparison. The native DOM already performs some kind of buffering. All changes to the DOM tree in one single JS thread are rendered at once. React just has a slightly simplified virtual version of the DOM so it can be smarter about reuse, possibly causing speedups.

<comment><USER19> I just meant that the virtual DOM feels like a backbuffer that you can render "from scratch" with every frame. I am well aware that the technicalities are quite different.

</comment></comment></comment><comment><USER21> Great read! I'm still missing something though...

Is there synchronization between the GPU and the FrameBuffer to tell it that the GPU has finished drawing the current frame? This may be a rare case but I'm getting stuck at the Sample Code.

I'm assuming we're reusing the same FrameBuffer object so it seems like we're using the same two pixel array references. If the GPU can't tell the game it's not done with the current buffer, couldn't the game easily start writing into the buffer the GPU is currently working with if it's just swapping in its own loop? This assumes the game has already drawn the next frame and has swapped back to the former frame.

In the reverse case I guess the game loop could fall behind and we keep writing the same frame and introducing lag.

</comment><comment><USER22> This is also build-in into slower hardware, such as the TI83 calculator. There is a command to copy the buffer to the actual screen memory, so it updates all at once :)

</comment><comment><USER23> What language is the code sample in? Looks very clean.

<comment><USER24> It looks like C++ to me.

<comment><USER12> Yes, I used a subset of C++ for the book. The goal was to be low-enough level to convince die hard game programmers that the examples were valid but clean enough for non-C++ programmers to read.

One of the things I find really interesting about C++ is that idiomatic, modern C++ is _really_ gnarly looking. Lots of `std::` everywhere, tons of templates, etc.

But if you choose to eschew convention and roll your own stuff, you can actually write C++ in a pretty simple, clear style. There are significant downsides to doing that, of course. The prevailing style is prevailing for a reason. But I think it says something interesting about the language itself that it's so accommodating to a wide range of styles and levels of readability.

<comment><USER23> Wow. Very finely crafted. Didn't even recognize it at first.

Lacks all of the clutter I tend to associate with c++.</comment></comment></comment></comment>


Remembering the Murder You Didn't Commit (2017) - <AUTHOR> https://www.newyorker.com/magazine/2017/06/19/remembering-the-murder-you-didnt-commit <comment><USER2> Saw an interesting documentary on the topic lately. They also had an interrogator who got someone to confess to a crime they didnt commit. And not just confess but actually believe it with the brain making up details of something that never happened.

[https://youtu.be/FxOy6z0yq5w?t=1462](https://youtu.be/FxOy6z0yq5w?t=1462)

He was lucky that it turned out he wasnt in the country at the time of the murder and they found the alleged real killer instead.

Cant repeat it often enough, just never talk to cops. No smalltalk no nothing. If it comes to it talk to your attorney and then the judge. The police isnt looking for the truth but for a solid case for a conviction. Finding the truth is the job of a judge or a jury.

<comment><USER3> "Don't talk to the cops" is the surest way to get criminals off and to create ghetto-like conditions.

Yes, definitely 'talk to the cops' unless you're a suspect of something that you didn't do, and then of course get a lawyer.

<comment><USER4> "Anything you say _can and will_ be used against you in the court of law."

Note two things about this statement:

1) _Nothing_ you say will be used _for_ you.

2) Everything you say _will be used against you_.

I forget the lawyer's name, but the above is paraphrased from a former prosecutor turned D.A. Never put forward any statement to the police without at least consulting your lawyer first. Even if you're innocent, even if you're providing a witness statement. Anything.

By all means - give witness statements. Help the police do their job. Just be sure to speak with a lawyer first. There's a very high chance that even though you did nothing wrong you'll incriminate yourself by speaking up.

<comment><USER5> Point 1 doesn't logically follow from the Miranda rights. In fact, that's the whole point of the adversarial court system: everything you say will be used for _and_ against you, by the defense and the prosecution respectively.

<comment><USER4> How do you think your defense would obtain a copy of anything you said to use in your favor? In a situation where you would need it, it won't be presented unless you happen to have been recording yourself. But if you trust the police to _not_ use things you say against you then you're also likely to trust them enough to not be recording your interactions.

The prosecution has no incentive or motivation to present evidence that could be used to the benefit of the defense.

<comment><USER5> >How do you think your defense would obtain a copy of anything you said to use in your favor?

[https://en.wikipedia.org/wiki/Discovery_(law)](https://en.wikipedia.org/wiki/Discovery_\(law\))

Specifically:

>Under the rule set forth in _Brady v. Maryland_ , the prosecutor is obligated to provide to the defendant any information that is exculpatory or potentially exculpatory, without any request by the defense. Further discovery is available if initiated by the defendant. For example, a discovery demand might be for production of the names of witnesses, witness statements, information about evidence, a request for opportunity to inspect tangible evidence, and for any reports prepared by expert witnesses who will testify at trial.

<comment><USER4> You have far more faith in the system than I do and especially that the police wouldn't deny the existence of evidence that you said what you say you said if it suited them. Things are conveniently lost, misfiled or "never existed" in the first place.. They withold your statement from discovery. You claim they have a written report of your statement and knowingly withheld it. They claim they don't have it, have never had one, and it's nowhere to be found. Now what?

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> A long time ago, I was brought in for questioning regarding a murder. I was young and didn't know any better, but "I had nothing to hide".

The DA wanted me to say that I knew something about it and so he walked me through the entire scene, showed me pictures, told me he entire version of where I fit into the picture and so on. Showed me some pretty graphic images of the bodies, etc.

I could see how some people might be traumatized by this sort of "questioning" and simply allowing whoever they are speaking with to paint the picture and end up believing that they are in it.

After all, these were people I had known. I had been friends with the accused. It's not like they were completely unknown to me. I already had memories of these people. What if some of those memories just needed some "help" to come to light?

Coupled with whatever intense emotions + this sort of vivid storytelling... I could definitely buy that people would end up creating memories that don't really exist.

</comment><comment><AUTHOR> Should have retitled this "Not Remember the Story You Previously Submitted" [https://news.ycombinator.com/item?id=14541465](https://news.ycombinator.com/item?id=14541465)

<comment><USER7> Ha! I think it might have been long enough that it's OK to repost this, though I'm not sure if the moderators will agree.

<comment><USER8> It has been long enough. The submission is fine.

</comment></comment></comment><comment><USER9> Memory is a story we tell ourselves about the past, and the memory is recreated every time we tell the story. It's very possible to have real memories of things that never happened. We can make them entirely on our own, or people can put them into our heads. Real memories of things that never happened.

Dr Julia Shaw's "The Memory Illusion" contains a readable account of doing so.

</comment><comment><USER10> Derren Brown's _The Guilt Trip_ , a British TV special in which Derren convinces a young man (by various psychological techniques, using a cast of dozens) to suspect that he has committed murder, and even to confess to the murder, without interrogation or even being aware of any manipulation. Pretty amazing. (As are most of Derren's TV shows)

[https://www.youtube.com/watch?v=-AzTLw0Xwok](https://www.youtube.com/watch?v=-AzTLw0Xwok)

<comment><USER11> That sounds remarkably unethical and like it'd cause a great deal of psychological distress

<comment><USER10> Did you watch it? He is extremely careful, in many ways... And it did seem likely to have a positive effect on the guy's life, from what I could tell.

</comment></comment></comment><comment><USER12> Thanks for this "Down the rabbit hole" article, that led me to the innocence project, the Stockholm syndrome [condition that causes hostages to develop a psychological alliance with their captors as a survival strategy during captivity], Patty Hearst Trial, the SLA and the life of psychiatrist Joel Fort. You have made my day :D

</comment><comment><USER13> Everybody in the U.S. should read "You & the Police" by Boston T. Party.

If you disagree with the author's Libertarian bent then look up one of the "know your rights" things from the ACLU, tho the breadth of scenarios covered there is much lower. For example the ACLU doesn't typically teach you how to avoid having your gun rights trampled by the police using questionable laws that vary from state to state and city to city, or used as faux "probable cause" to escalate your encounter toward arrest. For reasons like that I recommend Boston T. Party's book. The ACLU's stuff is also more sound bitey, for better and worse. Better yet, read both :-)

</comment><comment><USER14> "I intend to fully cooperate but first I'm going to talk to a lawyer to get advice on the best way to do that".

</comment><comment><USER15> I have a recurring dream where I murder someone and bury the body, it's always the same, I'm quite young in the dream too. Wonder if I'm remembering a murder I actually did commit.

<comment><USER16> Unless it's sarcasm, this seems like the sort of thing you should be discussing with a therapist, not posting on the internet.</comment></comment>


Google wants to make your passwords obsolete - <AUTHOR> http://www.forbes.com/sites/amadoudiallo/2013/11/30/google-wants-to-make-your-passwords-obsolete/#!

<comment><USER2> this has been around for ages,what if i lose the YubiKey Neo, i will lose access to all the sites i login and what alternative method will be there to authenticate myself?</comment>


Ask HN: What is difference between multiple containers and multiple accounts - <AUTHOR> An operating system can support multiple accounts. Each account has its own working environment. How does this differ from multiple containers? <comment><USER2> An account shares access to the same file system, but can be restricted as to which files and directory it can see and execute.

An account in a chroot jail gets its own view of the entire file system that is completely isolated. The root folder for the specific account is not the root folder for the system as a whole. But the account still shares RAM and the CPUs.

An account running in a container gets a chroot jail plus its access to system resources, such as RAM and the CPU's are restricted. So you could restrict an account to using a maximum amount of RAM and a maximum number of CPU cores.

<comment><AUTHOR> Applications would be isolated between different accounts. What is the difference between this kind of isolation and the isolation supported by container technology?</comment></comment>


Gmail Tasks: Paper vs. iPhone - <AUTHOR> http://gmailblog.blogspot.com/2009/02/tasks-paper-vs-iphone.html <comment><USER2> I know they were joking, but as a dour paper advocate I felt the need to respond:

 _Limited availability. You don't always have a pad of paper with you to write new things._

So they're saying you always have a phone with you?

 _Not ubiquitous. If you leave a piece of paper in one pair of jeans, you can't access it from the other jeans you're currently wearing._

On the other hand, the entry level for paper is much cheaper than the entry level for a device that uses Gmail.

 _Difficult to organize. Eventually turns into a giant mess on your desk._

I think if you have as many Gmail notes as you have paper notes, you'll get just as big a mess. The fact that Gmail isn't as messy is a testament to the fact that I can't doodle, can't quickly sketch out a melody to a song, or anything similar.

<comment><USER3> > So they're saying you always have a phone with you?

If my phone isn't in my hand, it's in my pants. If I'm not _wearing_ pants, it's on the end-table of my bed, where I assumably am as well. So yes.

<comment><USER2> Similarly, I always carry around a notebook. My point is that for people who need to write, paper is very rarely in short supply.

</comment></comment></comment><comment><USER4> I tried using Gmail Tasks for about two or three weeks. I transferred all my tasks into it.

Ye Olde List o' Annoyances:

#1: I could only view one list at a time. I like having a 'big picture' view. Plus, the default-in-Gmail view was tiny. I could pop it out, but then it was in an orphan browser window -- which would sometimes disappear because it still technically tied into Gmail (e.g. adding a Labs extension to Gmail made Tasks go poof).

#2: They positioned the delete button _between_ the "Add Task" and "Switch List" buttons. I nuked a few tasks accidentally, without evening know what I deleted.

#3: There's no undo and no history. If I wanted to hide completed tasks, I had to delete them, which meant losing them forever. If I accidentally deleted a task thanks to the positioning of the delete button, well, too bad.

#4: I couldn't select multiple tasks and move them around.

I couldn't take the annoyances.

I've since switched to a homebrew todolist solution that lets me see everything at once, switch between contexts, edit multiple items at once, and keep a full history. I complement this with a Moleskine notebook as a collection input. For stuff that has a hard due date, I use Google Calendar.

As for paper vs. iPhone -- I don't have an iPhone so I'm quite happy with paper. My notebook fits comfortably in my pocket and goes with me everywhere, and Moleskine thought through the design so its pages don't wrinkle and it stays nice and neat while remaining easy to write in. I've only used it for two weeks, but I've found it well worth its price compared to el cheapo pocket notebooks (which I used for several months, until I gave up in frustrating at having them wrinkle after living in my pocket).

</comment><comment><USER5> I was sort of holding out hope they would buy out Remember the Milk[1]. They already have Blackberry and iPhone sync in their pro version and a gadgets that plug into Gmail and Google Calendar (and iGoogle and Google Desktop etc.). Their model for tasks is much more advanced than the Gmail one- with due dates, alerts, sharing, multiple lists, nice print outs to carry with you etc.

[1] <http://www.rememberthemilk.com>

</comment><comment><USER6> Now if only they would offer sync of tasks for users of Blackberry and Windows Mobile smart phones they would be on to something.

I've just re-visited Tasks, and it is nice... but to be ubiquitous (and therefore useful enough to displace the paper I carry) it will need to be in my phone.

</comment><comment><USER7> I like the interface. I downloaded several ToDo apps from the iPhone App store when it first went online and many suffered from the problem that they required more than one screen touch to create a new item. For example, you might press "+" and then press again to get the focus of the text entry field. (I'm sure not all were like this, but it seemed that many I tried were.) The gmail tasklist only requires a single touch. I also like that "New Task" is the top row of the task list, as opposed to being a "+" located at the bottom of the screen. YMMV.

</comment><comment><USER8> I've been looking for a simple task app that I can use on my iphone and have in my google homepage. I'll be trying this out.

<comment><USER9> yeah I have as well, since the default iGoogle tasks don't sync / work well on the iphone

</comment></comment><comment><USER10> Great idea! What distinguishes this from the 'Notes' app that comes with the iPhone is that now your tasks are editable in gmail as well.

For those who don't know, go to settings->labs in gmail, and you can activate tasks. Then a tasks link will show up under your regular mail 'folder' links.

</comment><comment><USER9> that is great, I was sad when they shut off iphone iGoolge just cause that is how i kept my task synced... now a truly supported version with a better interface should make keeping my todo list up to date much easier.

</comment><comment> jim-greer Has anyone gotten this to work using the Google Apps version of Gmail?</comment>