To Control Its Destiny, Facebook Bets Big on Hardware - <AUTHOR> https://www.theinformation.com/articles/to-control-its-destiny-facebook-bets-big-on-hardware?pu=hackernewshmb8vq&utm_source=hackernews&utm_medium=unlock <comment><USER2> As with previous articles, The Information has unlocked this one for HN readers. Thanks!

[https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...](https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=by%3Adang%20%22the%20information%22%20unlock&sort=byDate&type=comment)

There's a related thread at [https://news.ycombinator.com/item?id=21836862](https://news.ycombinator.com/item?id=21836862).

</comment><comment><USER3> VR is neat, but I'm absolutely inspired by the idea of improved human-computer interfaces like those described and their more mundane uses. We have eye tracking, the ability to read electrical signals and positioning from hands or head, the ability to feedback to the body through vibration (or sound), and existing high quality peripherals like keyboards for high precision entry and correction. There has to be a way to combine all of this into a better vim.

A couple binary inputs for CTRL and SHIFT from reading brainwaves seems doable. Feedback on whether they're active from different high frequency vibrations on the hands, neck, or ears.

There are lots of easy wins here if I can just push a couple mental buttons with my brain. Trigger scrolling or text selection based on eye movement. Select a buffer or macro based the mental buttons I'm pushing. You basically get a binary digit for every mental button you're capable of simultaneously tracking.

I'm home sick, and maybe it's the fever talking, but I think I'm going to do some basic research and start hacking something together. Very small chance of success, but I want mental modifier keys with vibrational feedback!

<comment><USER4> Summary: BCIs are still bad, use foot pedals as suggested in the sibling comment.

I don't want to rain on the parade but BCI (brain computer interfaces here EEG that is interpreted as input for something) is far from being usable for everday things. The technology sort of works but it is slow and unreliable. Most reliable method was P300 [0] which requires several repetitions of a signal someone decided to select. Entering letters for example can be done by flashing rows and columns of a matrix of these letters and concentrating on the one to choose. It's reactive in the sense as it will only trigger when an expected stimulus is detected. A lot less reliable was a system trained to recognize imagined motions (raising the left or right leg or arm as different categories) and worst method I saw was a simple feedback loop between EEG for moving something on the screen in one of two directions. This rarely worked even though it was a simple binary choice. Any switch will be better than this for now.

[0] [https://en.wikipedia.org/wiki/P300_(neuroscience)](https://en.wikipedia.org/wiki/P300_\(neuroscience\))

<comment><USER3> Totally fair. There's a few things I'd like to point out:

      * I get to push the EEG button with just my brain, which is neat and fun.
      * I get to build multiple high resolution EEGs into something that doesn't look terrible like a pair of headphones or a hat, which is fun (yet flammable).
      * I play a few instruments (most recently bought a violin, which I'm still terrible with). It took years to become good at each instrument. I assume that it would take years to become good at using a BCI and properly adjust it to my brain.
      * I'm working on this with the initial assumption that I'm most likely going to fail, but I'm going to have a good time.

Edit: * It also gives me an excuse to work on this: [https://news.ycombinator.com/item?id=21661567](https://news.ycombinator.com/item?id=21661567)

<comment><USER4> I'm neither a doctor not a psychologist but here is a wild guess: I would assume that it takes about as long to train yourself to work with a BCI as it takes to e.g. learn to reliably wiggle one ear, raise an eyebrow, just any voluntary movement that you do not control yet. Reasoning: in both cases you would have a feedback loop and would need to learn to reliably create the appropriate output and that it does not matter a lot whether the output goes to actual muscles or via EEG to trigger a response.

</comment></comment></comment></comment><comment><USER5> FB is kinda badly positioned when it comes to man-machine interfaces, not because of their technical capability, but the lack of trust that is needed for societal acceptance in that space. People who initially supported Oculus wouldn't have done so if it came out being from FB, they wouldn't have gotten over the initial hump.

I think that this is one of the reasons why Apple bets so heavily on privacy, they had a much better long term vision when it comes to wearables and man- machine interfaces in general. If Cook distances Apple from China they have such a big advantage there, if not FB will use Apples connection with China to their advantage.

</comment><comment><USER6> This is the age of vertical integration in technology. Truly astounding to see, and not something we've witnessed much of historically.

Personally I think a lot of it is being driven by the comoditization of advanced chip fabrication. Now with TSMC you can actually have better manufacturing capabilities than Intel. A situation we've not been in for over 30 years.

<comment><USER7> > Personally I think a lot of it is being driven by the commoditization of > advanced chip fabrication.

That's an interesting perspective. With mobile device chip manufacturing being modularized, Facebook is able to integrate forward with the end user by combining software (i.e. their portfolio of apps) with consumer electronics.

Aggregation theory at work: [https://stratechery.com/2015/aggregation- theory/](https://stratechery.com/2015/aggregation-theory/)

</comment></comment><comment><USER7> There's no getting around the fact that developing AR technology requires substantial investment in R&D. Only companies such as Facebook, ones that employ some of the best engineers and also have a strong incentive to make that investment, are able to pull it off.

Whatever product comes out of Facebook under its current business model will be optimized for serving ads. Not necessarily serving the user.

This in itself is not bad, as it will still stimulate the growth of an ecosystem where developers can create products with different business models.

<comment><USER8> And as such they will not do it because people don't use such devices currently. It needs to be the other way around: have the devices, people start using them more and more, and only then come Google and Facebook to destroy the system with ads.

</comment></comment><comment><USER9> I don't want to sound mean spirited, but I don't really like or trust FB. I would check my feed briefly once or twice a month and post something whenever I finished a book and wanted to announce that.

My attitude changed when I bought an Oculus Go and a week later when I bought an Oculus Quest. These devices use the FB platform, and all the videos that I now upload to FB can now be watched in the VR theater on the Oculus devices.

So basically, the Oculus products are so good that I decided to give FB another chance and I use FB a bit more often now.

EDIT: and the Star Wars Vader Immortal trilogy on the Oculus Quest is my favorite entertainment experience ever, including the industrial strength VR experiences I used to work on. My respect to the teams that did the Vader Immortal material.

</comment><comment><USER10> So you all have a subscription to theinformation.com? Wow. I can't just buy a subscription for every random "news" site that appears on hacker news.

<comment><USER11> I don't get why news sites don't have a "coin slot" where I can insert a few quarters if I like an article and get a pass to read that day's edition.

<comment><USER12> I've encountered exactly that feature multiple times and I've never used it because god knows I'm not creating an account to give a site 0.99 and read an article. Friction.

Maybe if someone did it as a layer on top of news sites (like Google/FB login)... _Maybe_ ...

<comment><USER11> > god knows I'm not creating an account to give a site 0.99

Who says you have to create a new account on every site? A cookie set after the payment processor has completed is all you need.

<comment><USER13> That will create a ton of angry customers who had their cookies auto-deleted e.g. because of Incognito. Support costs will outweigh the few pennies earned.

Especially with a tech-ninded crowd, relying on the persistence of cookies is completely unworkable because of the large percentage of users with extensions that block or wipe cookies eagerly.

</comment></comment></comment></comment></comment><comment><USER14> It's interesting how a number of Facebook engineers are willing to comment on what they work on, while the company itself refuses to provide any official statements.

<comment><USER15> You can assume anyone named and quoted in an article like this is speaking officially on behalf of the company they are working for, with some level of preparation and filtering by their Comms team.

</comment></comment><comment><USER16> Where are we standing with open XR? Especially equipment, including controllers?

I love XR (=VR/AR/MR), but I still didn't manage a good easy open source way to do that.

<comment><USER17> What is MR?

<comment><USER16> Mixed reality

<comment><USER18> Doesn't AR also mean Mixed since it's augmented?

<comment><USER19> I think that's a _really_ fair question! xD

I've heard "mixed reality" being used to refer to the continuum between reality - augmented reality - virtual reality. In the above question I'd read it as asking about the state of problems particularly pertaining to the transitions along this continuum. (Made up example: of you solve locomotion in VR by putting people on moving belts, a problem in MR would be how to transition someone from walking around in unobstructed reality to walking in VR. I don't know if that's a real problem—please take it just to illustrate what I mean.)

Edit: Wikipedia's article on MR includes a whole section on "differences in terminology"! \o/ [https://en.wikipedia.org/wiki/Mixed_reality](https://en.wikipedia.org/wiki/Mixed_reality) They also use the word "continuum", but don't seem to directly back up my further claims about using the word to refer to problems arising specifically at the interface of AR/VR.

<comment><USER20> I believe Mixed Reality was a term coined by Microsoft to differentiate their products, basically a marketing term.[1]

[1][https://www.vox.com/2015/7/27/11615046/whats-the- difference-...](https://www.vox.com/2015/7/27/11615046/whats-the-difference- between-virtual-augmented-and-mixed-reality)

</comment></comment></comment></comment></comment></comment><comment><USER21> Does anyone think AR has the potential to do in the next decade what phones did in this last one?

<comment><USER22> I think it has the ability to do more once it is sufficiently miniaturized. Small to the point that it's not much different than wearing eye glasses.

Glasses can make a viral and sticky form factor that we already have centuries of experience with. If we can build an AR glasses product people want to wear then we have the potential to greatly increase the amount of digital information a human sees and processes. This information can be addictive, like smartphones, and of high utility, like smartphones.</comment></comment>


Introducing Netflix Stethoscope - <AUTHOR> http://techblog.netflix.com/2017/02/introducing-netflix-stethoscope.html <comment><USER3> So, 'jailed' is a reason to mark it as 'requires attention'? Well played, well played..

Honestly, I won't run a non-rooted device (although I admit that the current way to root a device is questionable in parts). But here's a real, honest question: Why would services stop working because of root access?

Why can't Android Pay work on a rooted device. Samsung's crappy equivalent (I use neither, but I think those are often considered examples for 'stops working if rooted' issues)?

I also own my credit card. Just like my mobile. What is the danger that these services try to protect against, why is root a problem in these cases?

<comment><USER4> As another reply to your post says, paraphrased, allowing applications to escalate privileges is absolutely less secure than not allowing applications to escalate privileges.

This really has nothing to do with services not working because root is enabled, instead it has everything to do with companies (Netflix in this case, or Google for Android Pay in your example) preventing widespread theft of employee/customer data.

Even the most cautious users can accidentally click "allow" by mistake. Here's a example of how that might happen:

Build an app that some user wants - maybe a game. Make the user click a "Start" button to play. Time how long between presenting the button and receiving the click, after a few rounds of this, wait a fraction of a second less than the average time and trigger the sudo call which in turn usually triggers an allow/deny popup.

Did it register with you in time, or did you click allow? Did you even notice it if the game starts anyway? Probably not! Netflix just gave an attacker an entry point, and Google just lost the confidence of their banking partners, who are likely looking for any excuse to avoid working with Google (and Apple etc) anyway.

A good IT department has to protect the company from risks like this, and nothing the company requires you to do will require root (There are obviously exceptions, but the number of employees worldwide who fit this bill, outside of phone OS development, is likely less than a 5 or 6 figure number).

If you need root for personal tasks, and the company isn't happy with root, then they are entirely within their right to deny that device access to company systems.

<comment><USER3> Listen, I'm with you. Root is special and granting root to ~stuff~ should be something you don't do on a whim.

That said: I question that services should stop working if I have the ability to grant root. Reasons:

1) Maybe I know what I'm doing (honestly .. I consider myself capable and still have cringe while writing this)

2) Your software isn't immediately compromised in its core functionality if _I_ own my _own_ device.

For Netflix, this feels like another failed attempt to close the analog hole. Android Pay and whatever else might try to be your wallet (I'm a huge fan, as you might notice in this thread) should be able to withstand that. Otherwise it's just a crappy payment system.

I can pay stuff from my PC (various operating systems) and I do have root (or the equivalent permissions). I also own - as I stated in my original post - <USER2> CC that allows me to spend money freely. I don't know how hard it would be to copy it physically, but you'd be able to strip the core details (name, number, CSC) in a couple seconds/with two pictures.

Why is the CC secure, but a rooted phone isn't. Ignore Netflix, they're brain- dead and content related DRM isn't what I'm going for. I'm asking why random legitimate services refuse to work on a phone, because .. the owner actually seems to own the device?

<comment><USER4> > 1) Maybe I know what I'm doing (honestly .. I consider myself capable and > still have cringe while writing this)

My example kinda covers this, phones really are getting faster... It's no longer a case of "I know what I'm doing" when it now comes down to human recognition and reaction time. In other words, you clicked allow before your brain had time to stop you. How do you prevent this?

> 2) Your software isn't immediately compromised in its core functionality if > _I_ own my _own_ device.

100% agreed. For the Google Pay example, fair enough. It's your credit cards, and it's harder to come up with a counter point.. For the OP / Netfix example, it's not your data, and likely not your device - or - by connecting to company services, you've basically agreed it's not yours (This could be a whole sidetrack on it's own! :))

> Android Pay and whatever else might try to be your wallet (I'm a huge fan, > as you might notice in this thread) should be able to withstand that. > Otherwise it's just a crappy payment system.

Credit card companies are generally responsible for theft of money where you remained in possession of your card at all times. Sure, they really hate admitting it, and gathering the proof is hard, many times impossible. But that doesn't change the responsible party when the proof is found.. Given this, it's easier for them to accept less secure alternatives (e.g. the US's reliance on signatures).

The rise of NFC credit cards has changed this somewhat, if a credit card hands out all the details needed to make a purchase to anyone who bumps into you on the street, possession is now not the only factor, and banks have built safeguards around this (e.g. max transaction size, max NFC transactions before being required to enter your PIN).

Google with Android Pay must prevent that same bump on the street from stealing their customers money. The cell phone payment version of this comes in the form of other apps on the device, hackers breaking into the phone remotely, etc. With a rooted device, or a device using unknown firmware[1], all bets are off.

> I can pay stuff from my PC (various operating systems) and I do have root > (or the equivalent permissions).

And this is a security hole, granted it's one I wouldn't want to see shutdown, but it's still security hole. I don't have any good answers here, but I do look forward to seeing a solution that works while letting me keep root access on my Linux box!

> Why is the CC secure, but a rooted phone isn't.

I'm think I've mostly covered this, but you're looking at two totally different landscapes. They just cant be compared in the same way.

> Ignore Netflix, they're brain-dead and content related DRM isn't what I'm > going for.

While I'm no DRM fan, this entire article is about Netflix's corporate employee device security, it's nothing to do with DRM or content..

[1]: Unknown firmware in this case means firmware google doesn't trust - unrooted AOSP built from a unknown manufacturer can't be trusted any more than rooted firmware from Google itself.

<comment><USER5> I don't see how protection from hostile NFC and protection from rogue applications are related. You want both, ideally, but the increased difficulty of solving problem 1 on a phone vs. desktop does not make it harder to solve problem 2 on a phone vs. desktop. So I think you're wrong to say that it's "two totally different landscapes".

<comment><USER4> Ah, I was suggesting that comparing "I have a CC in my wallet and can do stupid things with it" to "I have a CC on my phone now others (hackers, bad apps) do can evil things with it" are two totally different things.

I was drawing parallels between hostile NFC readers and hostile apps/hackers :)

<comment><USER5> But the more important comparison in those posts is not CC in wallet. It's that CC on desktop computer has no restrictions.

"hackers/hostile apps can do evil things on desktop" is nearly identical to "hackers/hostile apps can do evil things on phone"

So while in a vacuum you could argue that you need to protect against hostile apps the same way you protect against hostile NFC, it's a weak comparison. While the treatment of hostile apps on your heavier home computing device is a super strong comparison.

<comment><USER4> I'm not sure I agree it's a weak comparison, mostly because I think we've made a whole bunch of bad decisions in how we handle things on a PC.. The PC was born in a different era to the smartphone, and it's treated as such.

Example: CVV numbers, these are needed for "Card not present" transactions are must not be saved (e.g. no browser will save them). Using your phone for an NFC payment on the other hand does not need this number.

Yes, this is a tiny detail. But this detail entirely changes the share of responsibility between the consumer/merchant/payment processor/bank.. This is usually reflected in the different fees that are charged for different types of transactions, card swipe vs card not present vs Chip+PIN vs NFC.

Assuming that just because a CC number + errata stored on a PC can be stolen an abused, that the banks etc should just let me do that on e.g. Android Pay is just wrong..

Nobody is stopping you from creating a text file on your phone with the card and CVV numbers, but don't expect to be able to use that text file as a NFC payment method!

Edit: in case I wasn't clear (I know I wasn't, because I kinda forgot to say it ;)), once your phone is untrusted - as in untrusted by the bank etc - everything stored on it may as well be that plain text file as far as they are concerned.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER6> If anyone from Netflix reads this can you fix pinch to zoom on iOS on your blog please? I kept trying to read the article, but the text is small and every time I tried to make it bigger the swipe to navigate articles gesture was triggered. Not very accessibility friendly.

<comment><USER7> Same here. Only way I could read this on mobile was using iOS Safari's text formatter thing that shows up in the URL bar.

</comment></comment><comment><USER8> This is related to employees only right? I would have thought a large company like Netflix is using something like G Suite and therefore can just use Google Apps Device Policy to simply enforce the best security settings (6 digit code, software updates and so on) on Android devices. And I bet there is something comparable for iOS devices isn't it?

[https://play.google.com/store/apps/details?id=com.google.and...](https://play.google.com/store/apps/details?id=com.google.android.apps.enterprise.dmagent&hl=en)

<comment><USER9> While this is related to employees, it seems to be focused on other devices which are not under any group/device policy.

> By providing personalized, actionable information–and not relying on > automatic enforcement–Stethoscope respects people's time, attention, and > autonomy, while improving our company's security outcomes.

</comment></comment><comment><USER4> I have to admit, the screenshot they picked seems like a really bad example :)

Most Android devices can't just be updated to the latest version, which is counter to the proposed goal of being user actionable.. Won't this particular check just result in alert fatigue? Once any single alert comes in that the user has no control over, they HAVE to ignore it, and once they ignore one, it's easier to choose to ignore more..

</comment><comment><USER10> There was a startup that addressed this issue of personal devices potentially leaking personal or business sensitive information. The idea was the device is protected all the time, not just while on the office network.

They were Mojave Networks but looks like their website is no more. Acquired by Sophos... I guess their called Cloud Web Gateway now. See links.

[https://www.crunchbase.com/organization/mojave- networks](https://www.crunchbase.com/organization/mojave-networks) [https://www.sophos.com/en-us/press-office/press- releases/201...](https://www.sophos.com/en-us/press-office/press- releases/2014/10/sophos-acquisition-of-mojave-networks.aspx) [https://www.sophos.com/en-us/products/cloud-web- gateway.aspx](https://www.sophos.com/en-us/products/cloud-web-gateway.aspx)

<comment><USER11> Mojave was a great idea. I've tried and failed to recruit the founder and engineering leader for Mojave at least three times. :-)

</comment></comment><comment><USER12> How do you detect whether a device is Jailbroken/rooted ?

[Edit] : Found this - [https://github.com/scottyab/rootbeer](https://github.com/scottyab/rootbeer)

I think this will be useful for applications that want to know if the execution environment is safe or not - Banking / Payments etc.

<comment><USER13> You can try lots of things, detecting su binaries, UI applications, checksumming the entire filesystem, etc. But ultimately if the user doesn't want you to know, you won't know.

Rooting or jail breaking your device is taking control of your device into your own hands, if you use something like Magisk, you can fully bypass root detection, even via the nastiest methods on Android.

Detecting it as a security problem is moronic. In fact, I'd argue it's actually a security improvement due to things like XPrivacy.

<comment><USER14> > Detecting it as a security problem is moronic

That's an interesting stance, you don't care about rootkits? What about malware, which has been found in the wild, which abuses root privileges to steal account information? That malware is extremely difficult to detect directly.

<comment><USER13> On Android, the standard root system most people apply to their device prompts you when you launch an application if you want to allow it root access. This makes it trivial to block malicious applications - that new game you downloaded probably doesn't need root for any good reason. Just hit deny. The sandbox is still fully in place, just now you can poke holes in it for certain applications of your choosing.

What you're thinking of are things which use exploits to gain root - this may be done by some users, but most often Android devices are rooted via bootloader unlocking these days, which does _not_ use an exploit.

Exploits however are used by malware - and not having your device rooted won't prevent them. They gain root via exploitation, whether you want them to or not.

Not to mention that the kind of root detection done is by looking for things that only the legitimate sort of root leaves behind, like a su binary which prompts the user if they want to permit root or not.

Often times, rooting your device legitimately may allow you to flash a custom ROM and get updates that your original vendor hasn't released for your device, allowing you to actually _prevent_ exploitation by malware, even after your vendor has long abandoned the device.

<comment><USER14> My experience has been that Android malware authors tend to be kind of sloppy, and frequently leave a modified su binary hanging around. YMMV.

<comment><USER13> In the same place that you'd install it as a user?

That'd be some very stupid malware - anyone who was actually rooted would notice immediately when their root tool told them their support binary needs to be updated.

</comment></comment></comment></comment></comment></comment><comment><USER15> Really glad they're thinking about osquery support in the future. Of the data sources they support, osquery would be the most functional free and open- source one which might help get Stethoscope more widely deployed.

</comment><comment><USER16> My current policy is to keep work and personal devices completely separate. Call if you need me urgently, otherwise it can wait until the next work day.

I used to have my work email and Slack on my phone. Eventually we started to implement stricter security, which I found disagreeable, so I purged everything work-related.

</comment><comment><USER17> The page is down for me as of 13:20 EST.

Cached version:

        http://webcache.googleusercontent.com/search?q=cache:xcxywckCegkJ:techblog.netflix.com/2017/02/introducing-netflix-stethoscope.html+&cd=1&hl=en&ct=clnk&gl=us

<comment><USER18> Are you trying https instead of http? It's only hosted on http (because they use Google Blogger with a custom domain name)

<comment><USER19> I had the same problem, and it does indeed to be caused by the extension HTTPS Everywhere that I imagine a lot of HNers use.

<comment><USER20> I'm not using the extension, it is the remote server that is redirecting to https, not the local browser.

</comment></comment></comment></comment><comment><USER21> Is there a place one can actually use this tool? My daughter uses my account, and I'd actually like to see the results of her setup.

<comment><USER22> I believe this is tailored towards employees rather than end-users

</comment></comment><comment><USER23> > Stethoscope is powered by a Python backend and a React front end. The web > application doesn't have its own data store, but directly queries various > data sources for device information, then merges that data for display.

I thought the "various data sources" scenario was exactly what Falcor was for - interesting that they used React.

<comment><USER24> React is a UI library and Falcor is a library for data fetching. They solve different problems

<comment><USER23> Yes, you're totally right, I should have remembered that.

</comment></comment></comment><comment><USER25> _We also want people to be comfortable making these changes themselves, on their own time, without having to go to the help desk._

The part of that that I don't agree with, is "on their own time". What if the change that needs to be made an urgent security fix?

<comment><USER26> It means that you don't have to bother with IT if you want to install an App, for example.

Many company provided phones are locked down completely, you can't install or upgrade anything yourself.

</comment></comment><comment><USER27> That logo reminded me of those rubber toys for babies : [http://www.sophielagirafe.fr/en/](http://www.sophielagirafe.fr/en/)

This is so close, it has to be intentional !

<comment><USER28> Sophie never had that creepy smile!

</comment></comment><comment><USER29> Very interesting tool. Tried to build something like this awhile ago but it became a bit messy. Glad to see Netflix have done it. I can see myself using this for a number of groups we work with.

</comment><comment><USER30> Isn't Netflix motivated to see if you changed your network (such as using a VPM)? I don't see why this wouldn't call home and report you

</comment><comment><USER31> Is anybody else using firefox having crashes caused by this webpage?

</comment><comment><USER32> How would this protect against phishing?

<comment><USER33> It's not super clear from the writeup, but a big part of it is providing security notifications to users. So when a backend system detects what looks like a suspicious account access, it can notify the user and ask them to confirm their action. If they say, "I didn't do this" than their account can be immediately locked down until the issue is resolved by talking to a person.

</comment></comment><comment><USER34> "Give us data."

</comment><comment><USER35> Wow that site hijacks the edge swipe to go to another blog post instead of letting the browser go back. Gross.

<comment><USER36> That's because it is, for some reason, hosted on Blogger (which even Google themselves have abandoned for their corporate blog).

<comment><USER37> I'll be glad to see Blogger die. Such terrible UX.

Still today, its editing interface is awful and reminiscent of the early 2000s WYSIWYG editors.

Still today, some Blogger blogs I visit (including one of my own old ones) simply DO NOT LOAD, they are stuck at an infinite loading Javascript spinner.

Even still today, it insists on serving me _all its content_ in the language of the country I'm currently visiting, even though I have my language set to en-us in my Google account _and_ on my browser _and_ I consistently change its language settings back to English.

<comment><USER38> Their new entirely-JS based layout only happened after Google bought them.

Before that, Blogger's sites were completely degradable and perfectly functional without Javascript enabled. Then Google decided to remake all the templates to be fully JS driven and added a ton of page weight to the site.

</comment></comment></comment></comment><comment><USER39> Lol looks liek some bootstrap CRUD crap. People are getting 375k for this?

</comment><comment><USER40> not installing corporate spyware on my personal phone thx bai

</comment><comment><USER41> >7 admirer married

>7 admires sidearm

"That's an awful purty wife you got there; shame if something happened to you"

<comment><USER42> This was probably supposed to be a comment on the Anagram article: [https://news.ycombinator.com/item?id=13696196](https://news.ycombinator.com/item?id=13696196)

</comment></comment><comment><USER43> I deleted Netflix from my phone when the lastst update demanded access to my media files and photos, microphone, and call information.

<comment><USER44> It doesn't demand it, and in fact those are just basic defaults when using the new permission model/build APIs, though they default to off. In my 7.1.1 permissions Netflix lists those three, and none of them are granted nor have they ever been requested by the app.

<comment><USER43> They were presented when I tried to install the lastest update, and there was no option other than "Accept".

They don't need that stuff so I deleted the app.

<comment><USER45> You are not on Android 7 yet. Prior to "Nougat" the fine grain permissions control was not available so permissions were an all or nothing thing at install time. Starting with version 7 you only enable a specific permission the first time the application needs it. And you can change them later if you wish on the permissions section of the application in app manager.

[https://goo.gl/photos/2rvYmX6WNgGVfEsJ7](https://goo.gl/photos/2rvYmX6WNgGVfEsJ7)

<comment><USER46> You're off by one version: it was Android 6 (Marshmallow) that introduced the fine grained permissions.

<comment><USER45> I stand corrected.

</comment></comment></comment></comment></comment></comment><comment><USER47> "As we say in the Netflix Culture Deck, responsible people thrive on freedom, and are worthy of freedom."

But you arbitrarily can't watch stuff in Incognito Mode?

<comment><USER48> Can't have people watching two streams on the same computer. Common sense or something.

</comment></comment><comment><USER49> Interesting. Trying to find some sort of correlation between this and the core business of Netflix. Not sure they relate with each other. What does that means? Netflix devs are "tired" hehe. :)

</comment><comment><USER50> Aside, I've been looking into writing some basic browser extensions for Netflix, like allowing a hotkey to toggle between English <-> Spanish subtitles so I could quickly lookup words I don't know. Or increase playback to 1.25x speed since I primarily use Netflix for language learning.

But I've been having a hard time figuring it out. Inspect the playback bar to see what I'm talking about. Anyone have any luck extending the playback UI or hooking into it?

<comment><USER51> How do you use Netflix for language learning? I'm curious.

<comment><USER52> It helps a lot with understanding spoken language in a variety of settings, pronunciation, idioms, and all the other little things that make language appear natural. Watching movies and TV shows in a foreign language that you already know somewhat but aren't comfortable with yet is tremendously helpful, and it's also fun. Great way to help become fluent.

<comment><USER53> Even if you barely know the language, I've found it beneficial to listen to foreign language audio with subtitles (YMMV). It mean that when I actually try to learn parts of the language, I already have somewhat of a feel for it, so what I'm learning solidifies into something usable more quickly, and I don't spend as much time stumbling with pronunciations/verb conjugations etc.

<comment><USER50> My problem with foreign audio + English subtitles (if that's what you meant) is that my brain just reads the subtitles and tunes out the audio for the most part.

I think anything is better than nothing, though. I personally watch movies/shows now always with foreign subtitles.

<comment><USER52> I hate subtitles that aren't in the same language as the audio, that's just incredibly confusing. Having both in the foreign language requires a higher level of proficiency, sure, but I find it a lot more rewarding.

</comment></comment></comment></comment></comment></comment><comment><USER54> Although the focus is mainly on the Stethoscope security feature and what it has to offer, but does anyone else find the giraffe with the stethoscope a bit odd, creepy and out of place?

I think they were going for a "friendly" approach but it just doesn't do it for me. Now, you may argue that the logo isn't important but some users will utilize a tool purely based on aesthetics...why a creepy giraffe? Am I missing something in American pop culture..? (I'm Canadian...)

<comment><USER55> [https://en.m.wikipedia.org/wiki/Uncanny_valley](https://en.m.wikipedia.org/wiki/Uncanny_valley)

This explains some of what you are describing

<comment><USER54> Thanks for the link! I've actually never thought about this concept and it actually does describe a bit the way I feel about the giraffe.

The designer did a great job drawing it...but something just doesn't feel right...

<comment><USER56> The giraffe feels like it's asking you to lie down on the table and relax, in the same way that Hannibal Lecter might.

</comment></comment></comment></comment><comment><USER57> Wow. "Jailed" is a compliment, now. You shouldn't own your devices, it's a security risk. Please keep your phones nice and safe and locked-down in our hands.

Totally backwards. As Mr Trump would put it, SAD!

<comment><USER58> This is focused toward companies to ensure employee security. It's no secret that jailbroken phones are less secure, and if an employer is giving phones to employees for work use, it's perfectly reasonable for them to enforce a rule that phones are not jailbroken or out of date.

<comment><USER13> > It's no secret that jailbroken phones are less secure

There is no evidence that jailbroken or rooted users have resulted in any significant compromises.

At least in the Android world, you must still approve any application which wants root access and rooting your phone allow you to gain access to some pretty impressive security tools you otherwise wouldn't have available to you. Generally speaking, users who are rooted or jailbroken are sophisticated enough to handle this on their own - and often use it to improve their security, not damage it.</comment></comment></comment>


What python framework can be used to build a REST api? - <AUTHOR>

I know of Flask, Django and Pyramid. I don't want anything that has those in it, i all i want is a pure Rest Framework (not Web framework with REST extensions). Something that is used for just RESTful ApI.
Just Models and Controllers no views. Thanks in advance. <comment><USER2> Just because a framework offers views doesn't mean that it's too heavy for you. If no views are being processed, they're adding a negligible amount of overhead just from loading the code.

You don't necessarily even need a framework. You could use some libraries. You only need: routing, HTTP request processing, and HTTP response preparation.

<comment><AUTHOR> links please ?

<comment><USER2> I've actually only used Django, Flask, and CherryPy for Python projects, so I haven't researched that stuff.

In general, I strongly support the idea of tying together tiny libraries, rather than using a framework. It takes months to learn every line of code in an end-to-end framework, but if you're pulling in just the 2-3 libraries you need, you can understand every line of your code. That's really important for efficiency/bugfixing/maintenance.

You might want to check out Bobo: [http://bobo.digicool.com/en/latest/index.html](http://bobo.digicool.com/en/latest/index.html)

</comment></comment></comment><comment><USER3> If you're still looking for something, I've hacked a wrapper over Bottle to ease the implementation of a REST service, it's small (2 python files including Bottle) and might fit your needs: [https://github.com/fclaerho/rest](https://github.com/fclaerho/rest)

</comment><comment><USER4> Werkzeug is the Flask HTTP handler. It can be useful for you. I know restpy [0], based on werkzeug.

[0] [https://restpy.readthedocs.org/en/latest/](https://restpy.readthedocs.org/en/latest/)

</comment><comment><USER5> you said that you don't want any flask, but have you looked at Flask-Restless ?

Flask just gives you the routing part maybe you can even strip flask out of it and just use wsgi.

You can try [http://python-eve.org/](http://python-eve.org/) too

</comment><comment><USER6> have you looked into Tornado?

<comment><AUTHOR> yes i just did, its a web framework, not pure REST framework</comment></comment>


Building Serverless Apps with Webtask.io - <AUTHOR> https://auth0.com/blog/2016/06/28/building-serverless-apps-with-webtask/ <comment><USER2> Thing I find odd with Auth0's Webtask.io is... -30 days webtask lifetime- for the free to play plan.

I've had a webtask running since February when I made it to interview for Auth0 (ironic). It's still running, firing off events and contactable via HTTP. So when exactly does it get turned off since it's obviously past its _lifetime_?

I still prefer not to trust a blackbox such as Webtask to run my code. Luckily this webtask I'm referencing does nothing more than fire off push notifications. However, I'm waiting for the code that relies on it to fail when Auth0 does end its life.

</comment><comment><USER3> I'm still trying to figure out the benefit that "serverless" architecture offers over a simple Apache + PHP + Sqlite setup. PHP isn't my favorite language, but it's deployment story seems as good as a lot of these "serverless" solutions once set up (which takes 5-10 minutes on Ubuntu).

Unless you _need_ the scaling potential of the "serverless" platform, or are completely unwilling to setup/maintain a simple $5 a month VPS, I don't see much benefit to the platform lockin of a specialized service, when there is a boring but predictable way to achieve the same thing, with the same (or possibly less effort).

Once PHP is set up the process seems like it would be:

1\. write your page to accept the query parameters or post data and return the results (the page is the function essentially).

2\. Use SQLite for storage (either per user or per "function" maybe?). Other storage options are also fine, but SQLite is pretty simple and flexible.

3\. Deploy the .php file using scp or sftp to your /var/www/whatever directory.

At this point you're done and can call your "function" via http.

<comment><USER4> The draw is another buzzword: "NoOps" \-- in that you spend no time managing the actual environment.

Instead, there is just code and nothing but the code.

<comment><USER3> Maybe I'm stuck in the "sunk costs" fallacy (that is, I've already invested the time to learn how to do this, so it seems trivial to me), but to me once I've done the 15 minutes "setup", I can basically ignore the server, and at that point basically the code is the only thing to deal with.

I don't spend much time "maintaining" my server for this kind of setup. Once it's setup I basically ignore it, accept for uploading new code.

I suppose I do _occassionally_ run the system update command. I don't run any other kinds of PHP applications (WordPress, Drupal, etc) on an environment that I use this way, so I don't feel the constant need to check for security vulnerabilities.

<comment><USER4> You can basically ignore that server, until your basically ignored server goes down or breaks for some silly reason unknown to you in advance.

At that point, you have to intervene, troubleshoot, and fix the problem.

But if you had gone the Functions-as-a-Service route, you'd avoid such occurrences altogether. For some people, that's an appealing trade-off.

<comment><USER3> Ok, that's a fair point.

I feel like I have the skills to handle that, or to create redundancy if necessary for reliability, so that doesn't bother me, but I can see the appeal of ignoring all of that.

I still like the idea that I'm not trusting a "black box" to run my code. I know how it's set up and what it's doing. And if I add replication or load balancing, I also understand what's actually happening there. But you're right, once you get to that level, you're out of the realm of "simple".

Maybe I can still hide behind my earlier comment "unless you _need_ the scalability..." to say that covered your caveats, but I'll admit I wasn't explicit about the considerations that guide the optimal use cases.

</comment></comment></comment></comment></comment><comment><USER5> Pro/con vs Lambda?

<comment><USER6> Ease of use is a big one. You can write your Webtask, run wt create and you'll get an endpoint to access your function vs Lambda's fairly complex system - especially if you just want to expose an endpoint to handle a particular use case.

The authentication/authorization is another big one. Auth0 is a lot easier to work with compared to Amazon IAM and Cognito.

Lambda does have it's strengths in the AWS ecosystem though and also supports multiple languages while Webtasks are mainly written in Node (and C# if you use a wrapper).

Disclaimer: I work at Auth0 as a Tech Writer and wrote the above article.</comment></comment>


A 19th-Century Teenager Sparked a Battle over Who Owns Our Faces - <AUTHOR> https://gizmodo.com/how-a-19th-century-teenager-sparked-a-battle-over-who-o-1829572319 <comment><AUTHOR> As I'd noted on an earlier story of FB using users' likenesses in advertising, the practice of social mediavcompanies is prcisely and literally what lit off the right to privacy movement:

[https://news.ycombinator.com/item?id=19645531](https://news.ycombinator.com/item?id=19645531)

I also strongly recommend the linked story of the subsequent discovery by the judge writing the majoriy opinion in Robeson discovering a right to be freed of concern of being "snapped by some fellow with a camera".

[http://www.nycourts.gov/history/programs- events/images/Judic...](http://www.nycourts.gov/history/programs- events/images/Judicial-Notice-Newsletter-04.pdf)

</comment><comment><USER2> The irony (if that's the word) of reading this story on a web site literally covered in advertising using stock shots of people who of course got paid for their face to be used. In ways which stem from this girls legal experience.

<comment><USER3> aptness? appropriateness? apropos [0]?

[0] [https://en.oxforddictionaries.com/definition/apropos](https://en.oxforddictionaries.com/definition/apropos)</comment></comment>


How Randomness Can Arise from Determinism - <AUTHOR> https://www.quantamagazine.org/how-randomness-can-arise-from-determinism-20191014/ <comment><USER2> Excerpt:

"For a Galton board with any given number of rows, the number of different paths a marble can take to reach a bin placed at a given row is exactly equal to the corresponding number in Pascal's triangle"

</comment><comment><USER3> Because there's no such thing as random or chaos; Everything follows a pattern, a protocol, a law; We may perceive it as random or chaos but it is not; Everything we call random, is in fact pseudo-random; If there's a Law, an algorithm behind everything, then who or what coded it ? That's the rabbit hole;

</comment><comment><USER4> This article seems to be starting from a conclusion and then working its way up to an explanation. That's not how science works. There is lots of experimental evidence that on a quantum scale there is inherent randomness.

[https://en.wikipedia.org/wiki/Quantum_fluctuation](https://en.wikipedia.org/wiki/Quantum_fluctuation)

Anyone can claim that there are deterministic causal factors leading to what appears to be randomness. What are those factors? I could claim that invisible unicorns are the underlying factor for deciding which slit the photon goes through and this explanation wouldn't be any less supported than the reasoning presented in this article.

> it might come from subtle factors, including, perhaps, the exact initial > location of the marble, its angle of motion, or the manner in which the > marble bounces off the subtle imperfections of the peg's surface. These are > all deterministic factors with a clear causal chain that decides which way > the marble goes. The path selected seems random to us only because of our > ignorance of these details.

One thought experiment that comes to mind is, imagine a perfect Galton board where all the pegs are perfectly identical in a closed perfectly isometric system. Without subtle factors like air currents or imperfections in the pegs or the marbles, where does the marble land? I think personally if all other factors are ruled out the thought experiment reduces to the double slit experiment.

<comment><USER5> > This article seems to be starting from a conclusion and then working its way > up to an explanation. That's not how science works.

No, it's starting from a phenomena and providing a possible hypothesis for why that phenomena is occurring. This is explaining an existing, untested hypothesis.

> There is lots of experimental evidence that on a quantum scale there is > inherent randomness.

No, there isn't, at least not as far as I know. The experimental evidence I'm aware of shows that we cannot, with current measurements, model the phenomena on a quantum scale, except probablistically. It _does not_ show that there isn't any determinism, it only shows that, with current techniques, we don't have access to the determinism (if it exists).

In short, this is explaining the "Team E" position:

 _> [W]e debated whether randomness or determinism lies at the heart of quantum mechanics, which I characterized as team B (Niels Bohr) versus team E (Albert Einstein). Team B sees the unpredictability of particle behavior as evidence that at the fundamental level of the universe, determinism is replaced by intrinsic, objective randomness. Team E contends that this randomness is merely a sign of our ignorance of a deeper level of deterministic causation._

To be clear, I'm not saying that quanta are deterministic. I don't know.

> One thought experiment that comes to mind is, imagine a perfect Galton board > where all the pegs are perfectly identical in a closed perfectly isometric > system. Without subtle factors like air currents or imperfections in the > pegs or the marbles, where does the marble land? I think personally if all > other factors are ruled out the thought experiment reduces to the double > slit experiment.

Assuming a perfectly drop as well, my hypothesis is that the ball would land on the top peg and balance there, perhaps after bouncing if we're assuming some elasticity in the components of the system. A "perfect drop" being in this case, one where the ball is perfectly centered, with no spin or side-to- side motion.

But I think this is getting into why analogies aren't a very good way to talk about science--analogies don't prove anything, and always fall apart on some details.

<comment><USER4> Also: [https://en.wikipedia.org/wiki/Bell%27s_theorem](https://en.wikipedia.org/wiki/Bell%27s_theorem)

In conjunction with [https://en.wikipedia.org/wiki/Lorentz_covariance](https://en.wikipedia.org/wiki/Lorentz_covariance)

Lorentz invariance has not shown to be violated despite many tries experimentally and from observation.

<comment><USER6> Bell's Theorem is really about locality rather than randomness. It's possible to define quantum theory in terms of deterministic but non-local random variables. In fact, this is a pretty apt description of the de Broglie-Bohm interpretation.

<comment><USER4> You are right, but any non-local variable theory cannot be lorentz invariant.

<comment><USER6> I don't think it's that simple. A fair amount of work has been done on relativistic extensions of de Broglie-Bohm type theories, e.g. [https://arxiv.org/pdf/quant-ph/0406173.pdf](https://arxiv.org/pdf/quant- ph/0406173.pdf)

</comment></comment></comment></comment></comment></comment><comment><USER7> Is this really any different than the exhaustive investigation of automata by Stephen Wolfram?

</comment><comment><USER8> Wonderfully informative! Love this author since his days writing about puzzles for the New York Times!</comment>


Cheerleaders and the NFL - <AUTHOR> https://www.theguardian.com/sport/2018/may/18/nfl-nba-cheerleaders-lawsuits-sports <comment><USER2> Another good reason to enjoy sports from local school teams. I still watch the super bowl and a few World Series games, but for me watching professional sports is not interesting.</comment>


Flash-Free Clipboard for the Web - <AUTHOR> https://hacks.mozilla.org/2015/09/flash-free-clipboard-for-the-web/ <comment><USER2> I really appreciate this, as I had to jump through a lot of loops to do so a few years ago. But I think that the browser should display a small alert when this API is called (like the webcam, or microphone).

<comment><USER3>
      > Google Chrome and Internet Explorer both also support this API. Chrome uses
      > the same restriction as Firefox (that it must be run in a user-initiated
      > callback). Internet Explorer allows it to be called at any time, except it
      > first prompts the user with a dialog, asking for permission to access the
      > clipboard.

Seems like IE does what you want.

<comment><USER4> > Seems like IE does what you want.

It makes me feel very confused that this is actually true.

</comment></comment></comment><comment><USER5> I was so disappointed that every color picker website nowadays uses flash/zeroclipboard to only copy HEX color value (6 letters!). It's so slow and inefficient. I ended up making my own one using this clipboard API - [http://0xrgb.com](http://0xrgb.com)

Glad to see that FF now supports this API, too!

<comment><USER6> Yup it wipes out whatever important info I was saving in my clipboard without warning me what-so-ever

I guess I could put a megabytes into anyone's clipboard now when they click on any link on a website.

<comment><USER7> No, you can't do that. from the mozilla link, "Google Chrome and Internet Explorer both also support this API. Chrome uses the same restriction as Firefox (that it must be run in a user-initiated callback). Internet Explorer allows it to be called at any time, except it first prompts the user with a dialog, asking for permission to access the clipboard."

<comment><USER8> Clicking a link is a user-initiated callback. So yes, he can do exactly that. I wonder if mouse move is also user-initiated.

</comment></comment></comment></comment><comment><USER9> I prefer

        window.prompt("Press Ctrl-C then Enter", text);

I don't want sites to be able to randomly clear my clipboard.

<comment><USER10> I consider it an OS-level deficiency that clipboard copy is destructive by default. The fact that no major OS has multi-clipboard out of the box in 2015 is shameful.

<comment><USER11> Even with multiple registers in Vim, I still can't get my mind to think that way. I just link everything with the system clipboard because it's easier to deal with. How do you comprehend all of that hidden information in memory? To me, it seems like a useful feature if you do or can use it, but for most users it's just extra complexity.

<comment><USER9> Even worse with vim is there are operations like delete which push to the register stack without you intending it, it makes it really difficult to keep track of where your stuff is without looking.

</comment></comment></comment></comment><comment><USER12> I make a text editor that runs in a texture on a 3D object in the browser. I have a text area hidden in the background that technically holds focus and all clipboard operations go through it.

I was hoping this would let me get rid of that crufty text area. It's a serious quality and performance liability, and in certain special cases even ruins the UX. But it looks like that is not the case. Le sigh.

</comment><comment><USER13> _The execCommand( "cut"/"copy") API is only available during a user-triggered callback, such as a click. If you try to call it at a different time, execCommand will return false, meaning that the command failed to execute._

Couldn't you bypass this by creating an invisible button, and then simulating a click event?

<comment><USER14> The engine can walk up the call stack and detect if the command was triggered by a click event.

<comment><USER15> There will always be a way to hide / obfuscate the action, making it seem to the browser that it was user-initiated.

I guess Mozilla have weighed up the convenience/security balance of browser control of the clipboard, and have put in a minimal protection scheme to make it clear that code _should not_ play with it behind the user's back, but Mozilla knows that they can't really stop it.

<comment><USER16> > There will always be a way to hide / obfuscate the action, making it seem to > the browser that it was user-initiated.

How? This security mechanism has been used for (among other things) popups for years now, and the only way it's been worked around is by attaching click handlers to links the user is likely to click.

<comment><USER15> Pop ups still occur, even on legitimate sites. Tripadvisor creates a pop-under when you click on a search result, for instance.

Basically, the user will click something at some point, the page can then unexpectedly put malicious stuff into the clipboard. No amount of protecting will stop this.

<comment><USER17> That's exactly what he just said.

</comment></comment></comment></comment></comment></comment><comment><USER6> Can't this be used to poison the clipboard with bad code that once pasted in the wrong place will execute?

<comment><USER18> Just as much as the existing flash-based methods can.

<comment><USER6> Well I haven't used flash in years.

But Mozilla just re-enabled this exploit and I don't think it can be turned off.

<comment><USER19> There is a preference to disable the feature: dom.allow_cut_copy

</comment></comment></comment></comment><comment><USER20> Thank you developers and all, but I don't think I had much trouble copying text before. On the contrary, when I click on a field and it force select everything for me I get frustrated.

Trust me, selecting text is not a problem. I haven't seen a place where click to select was a life savior.</comment>


Internet of Elephants invites test gamers - <AUTHOR> http://www.internetofelephants.com/humanswanted <comment><AUTHOR> We're on a mission to engage millions of people across the world with real wildlife using tech</comment>


Learn the main takeaways from KubeCon and CloudNativeCon EU 2020 - <AUTHOR> https://elastisys.com/kubecon-cloudnativecon-eu-2020-summary/ <comment><AUTHOR> This year's KubeCon + CloudNativeCon EU is a wrap! The conference was virtual but still packed with 4 days of updates, trends and use cases from all the different projects, sponsors, vendors and end users that make up the cloud native ecosystem.

Read this blog post for a summary of the main topics and trends: How the virtual event worked out The top news and the most interesting projects that are gaining traction The increased focus on CNCF end users Diversity in the open source community ClusterAPI GitOps Telco grade Kubernetes networking / edge native (K3s, Longhorn) Storage (Vitess, TiKV, Longhorn, Rook, OpenEBS, NATS) Security (Trivy, OPA, Falco, SOPS, SPIFFE, SPIRE)

We also did a video summary with more details if you like that format: [https://elastisys.com/summary-kubecon-cloudnativecon-eu- the-...](https://elastisys.com/summary-kubecon-cloudnativecon-eu-the-top- trends-and-news-from-the-worlds-hottest-cloud-conference/)

If you just want to skim the slides to the video they are available here: [https://elastisys.com/wp-content/uploads/2020/08/KubeCon- Clo...](https://elastisys.com/wp-content/uploads/2020/08/KubeCon- CloudNativeCon-EU-2020-summary.pdf)

</comment><comment><USER2> I especially like the security parts. SOPS integration that lets you store encrypted credentials and the like in YAML files seems like such a cool way to get the benefits of GitOps without sacrificing security.

Edited to add link to [https://github.com/mozilla/sops](https://github.com/mozilla/sops) and to also mention my surprise at that Mozilla is behind SOPS. :)</comment>


Money laundering in virtual worlds - <AUTHOR> http://www.itnews.com.au/News/252573,aussie-police-probe-virtual-worlds-for-money-trail.aspx

<comment><USER2> This, of course, made me think of Cory Doctorow's "For The Win" (<http://craphound.com/ftw/>). I'm sure it has been going on for quite a while.

Interesting book, I found myself equally good at seeing both sides of the story which is always nice.</comment>


ClojureScript Core.async Todos - <AUTHOR> http://rigsomelight.com/2013/07/18/clojurescript-core-async-todos.html

<comment><USER2> I dunno... the new async stuff is cool but I'm worried it's being oversold a bit...

First of all, it is by nature a very "imperative" solution... it goes (to some degree at least) counter to the whole idea that state changes need to be limited as much as possible and isolated from the bulk of the "functional" code.

Also, it seems people are using this idea to create little localized event handlers, whereas before you'd solve this in a functional approach by having a single global event handler.

Sure, having a global event handler can be derided by saying "this global handler is spaghetti code because it doesn't isolate concerns."

But in the same way, this type of channel-driven programming can be called spaghetti code because the many different goroutines can step on each other as they manipulate the DOM.

For instance, if OP creates another channel-driven system for "editing todos" he would have to do some hard thinking to make sure the "add todos" system and the "edit todos" system don't interfere with each other and cause undefined behavior.

I should point out I haven't built a system yet that is channel-based (I plan to do this soon) so my knowledge of this approach is as of yet limited and it's possible I will like channels better once I've used them more heavily.

<comment><AUTHOR> Thanks for the thoughtful response.

It is interesting. In normal Js applications there is tremendous gravity towards having mutable application state because the callbacks need a handle of some sort (normally some instance of something). So I am wondering what you mean by saying that the callback pattern is more functional?

In addition to mutable application state we have another global mutable state, one that's even harder to opt out of: The Dom. Regardless wether we use channels or callbacks this is going to be a problem whenever we have more than one actor changing it, whether that is done at the same time or sequentially.

To me the place for core.async or the newish yield operator is that blocking will allow us to wire together complex event behavior in some fairly sophisticated ways. How long does it take to get a slideshow to really work well in callback land? Or responsive autocomplete with correct lower and upper bound timeout thresholds?

So we can handle the wiring of events and when we get to the right state we do our functional application state transition.

Then as long as we are driving the Dom off of our application state then we should be good right? * waiving my hands a bunch _

<comment><USER2> > what you mean by saying that the callback pattern is more functional?

I agree that the callback approach is not functional, and that the channel approach is certainly much better than this status quo approach.

I'm comparing instead against an approach where you break down all relevant events into JSON, and then push those into a global fully-functional "event handler" function that translates events (along the "world state") into a set of DOM manipulation primitives.

With that type of approach, no channels are necessary. I agree this approach has difficulties with time-sensitive operations (such as responsive autocomplete, etc) and that channels offer advantages for this.

I'm not yet sure which approach leads to the least tradeoffs or whether there is a third approach that combines the best of both worlds that I don't quite comprehend yet.

> another global mutable state, one that's even harder to opt out of: The Dom

Well, I think the success of angular.js shows that it's possible (and probably desirable) to completely isolate DOM state changes from other program code... though the OP program doesn't do this, this is clearly just a simplified example, so I want to see what is possible once someone builds a client-side framework that is built on channels...

<comment><USER3> _I 'm comparing instead against an approach where you break down all relevant events into JSON, and then push those into a global fully-functional "event handler" function that translates events (along the "world state") into a set of DOM manipulation primitives_

How common is this approach? I'd be very interested to hear people's experiences with it. It's what we do, except we run the global event processor on a JS timer so that it works like a game loop picking items off a queue. Our DOM event handlers (the things you call addEventListener with) are all trivial stubs that simply create JSON descriptions of events as they happen and append them to that queue. We tried many different approaches before we hit on this, and it works surprisingly well in the two hardest areas: managing complexity and keeping the UI snappy.

You can also create perceived concurrency this way: you do a little work on an item in the queue and then, if it's not done, put it back at the back of the line. That's how we do the "time-sensitive operations" you mention.

I'm not sure what to call this design. I think of it as a state machine, but that's a metaphor rather than a precise description.

<comment><USER4> Are you familiar with E? It basically works like this, plus built-in, transparent promises. [http://www.erights.org/elib/concurrency/event- loop.html](http://www.erights.org/elib/concurrency/event-loop.html) outlines why you might settle on this model. The messages about coroutines linked at the bottom argue against things like core.async. (This all long precedes core.async, but Concurrent ML had that kind of design.)

I've only done simple things in JS and don't understand what advantage you're getting by queueing events yourself, since JS already runs an event loop. Is it that you can inspect the queue and drop/modify events superseded by subsequent ones? I tried to do that once and it didn't help, but I've gotta admit I'm the opposite of an expert on JS UIs.

<comment><USER3> Thanks for the link! I shall read it.

I wrote a reply that is perhaps a bit too long to put here, so I put it at [http://pastebin.com/4nN04Hj3](http://pastebin.com/4nN04Hj3) instead.

The short answers are: (1) this event loop is different from the browser's event loop because it's app-specific. Having a single interception point where you translate the browser event stream (mousedown, keypress etc.) into higher- level app-specific terms, and then write the rest of the UI in the latter, is a strategy for reducing complexity—an application of bottom-up programming to web UIs, really; and (2) emphatically yes, making the "official" event loop trivial and running all the complex stuff off your own app-specific loop allows you to control how much processing to do and when, which can be a way out of some thorny performance problems (such as sluggish scrolling) as well as an easy path to simulated concurrency.

It's interesting that you should have said "drop/modify events superseded by subsequent ones" because that's precisely what led us to this design originally—we were desperate, in fact, for a way to do that. The bottom-up programming aspect and the concurrency aspect only became clear later.

<comment><USER4> I think I read that E's promises came out of experience with UI programming too -- that they invented [http://erights.org/elib/distrib/pipeline.html](http://erights.org/elib/distrib/pipeline.html) for the sake of sanely programming snappy UIs for Xanadu.

Sounds like I gave up too easily on queuing and pruning events, or it was the particular platform (touch tracking on Nexus 7 and first-gen iPad).

Thanks for the experience report. :-) It might help me remember this when I get back to [http://wry.me/hacking/lissajous.html](http://wry.me/hacking/lissajous.html) to finish & polish -- I let it get all cut-and-pastey in doing drag-controls for the first time.

<comment><USER3> I've now read those pages. I knew about E for its capability model but not at all for its concurrency model, which is indeed very interesting (more interesting, to me) and close to home. There's a presentation mentioned there that I found slightly clearer than the page itself; the link is dead but it can be read here:

[http://web.archive.org/web/20070626045558/http://www.drjava....](http://web.archive.org/web/20070626045558/http://www.drjava.de/e-presentation/html- english/img0.html)

This model deserves to better known, especially since all this stuff is in play again nowadays. Are there other implementations of it? (Node.js might be a natural platform, given its event loop and the popularity of promises there.) I also wonder what the biggest differences are between it and Erlang.

In your pipelining example (t3 := (x <\- a()) <\- c(y <\- b())), what happens if the messages arrive out of order? (Or does the system prevent that and if so how?) I suppose if an expression can't be evaluated because a promise hasn't resolved yet, it could just go back to the end of the queue and eventually everything will bubble up?

Also: _that_ Xanadu? Wow, no idea.

Edit: I forgot another thing I wanted to include in this omnibus comment. The paper "On the Development of Reactive Systems" that's mentioned at your first link and which can be found at [1], starts off with a very interesting and exciting distinction between "transformational" systems (which take inputs and transform them into outputs) and "reactive" systems that "are repeatedly prompted by the outside world and [whose] role is to continuously respond to external inputs. A reactive system, in general, does not compute or perform a function, but is supposed to maintain a certain ongoing relationship, so to speak, with its environment". I think this is extraordinarily lucid and that the authors are right to talk about concurrency—and probably complexity in general—in the latter sort of system as being a different challenge than in the former. Unfortunately, the paper quickly sinks into a pit of software process goo and never returns. A little Googling gives me the impression that important technical work did come out of it, though, and if anyone knows what the high points are I would like to see them.

[1] [http://www.wisdom.weizmann.ac.il/~dharel/SCANNED.PAPERS/Reac...](http://www.wisdom.weizmann.ac.il/~dharel/SCANNED.PAPERS/ReactiveSystems.pdf)

<comment><USER4> Yes, that Xanadu!

The VatTP protocol is meant to guarantee 'just enough' ordering as at [http://www.erights.org/elib/concurrency/partial- order.html](http://www.erights.org/elib/concurrency/partial-order.html) \-- there was a talk about VatTP, with slides, but I haven't seen a proper write- up and never learned it.

I think [http://ai.eecs.umich.edu/~tpkelly/Ken/](http://ai.eecs.umich.edu/~tpkelly/Ken/) is the most active descendant (and V8Ken linked from there which they intend to hook up with node.js). Daira Hopwood's new language Noether sounds promising: [https://thestrangeloop.com/sessions/noether-a-concurrent- sec...](https://thestrangeloop.com/sessions/noether-a-concurrent-security- oriented-language)

About Erlang, besides capabilities and mutable data I think the biggest difference comes from blocking receive. This gives it more of a CSP flavor. My own experience is limited -- my exposure to Erlang was mostly helping other hackers. (I also made an Erlang-influenced Scheme dialect I was unsatisfied with for boring reasons, but it was kind of in between: immutable data, channels as capabilities, synchronous messages.)

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER5> I've been slowly migrating my JavaScript code to clojurescript and I haven't wanted to touch JS since. Apart from requiring a build step to generate JS, clijurescript is the browser language I always wanted. JS seems like such a hack.

<comment><USER6> Have you settled on a good workflow for ClojureScript projects? cljsbuild at least lets you amortize JVM startup time with the _auto_ mode, but the Write- Compile-Test loop (as Joel Spolsky calls it) still feels a little more sluggish than what I'm used to in other contexts.

<comment><USER7> They need more work but I use browser REPL or Bodil Stokke's Node REPL [http://github.com/bodil/cljs-noderepl](http://github.com/bodil/cljs-noderepl) if I need to do an intensive session of interactive coding without refreshing or waiting for recompiles. I contribute a bit to core.async now and it's definitely a goal to make sure that core.async works transparently whether you're coding against the browser or Node.

</comment></comment></comment><comment><USER8> Two first impressions:

        - whoa, this is cool!
        - this is harder to read than the callback approach right now

Makes me want to dig deeper, fully grok and reevaluate whether or not I'd really prefer this approach to callbacks. I have similar mixed feelings to using twisted vs tornado in python.

There's no doubt channel support in clojure is awesome, just a personal matter of whether I'll end up preferring this paradigm for UI development.

<comment><USER7> I would liken it to the Game of Go (pun intended). You have a very small number of elements: chan, go, >!, <!, alts!. The learning curve is a bit steep because you have invest some time _unlearning_ patterns you've picked up from traditional UI programming. But once you cross over the hump and you realize what is possible with just these few tools a whole vista of possibilities opens up. I'm sure the fans of go-lang would agree.

Another analogy - Alan Kay compares software engineering to architecture and how so much engineering is brute force (think pyramids). core.async (really CSP) is like an arch (think gothic cathedral). Common UI patterns no longer seem arduous - and UI patterns which once seemed far out reach can be accomplished with a reasonable amount of engineering effort.

<comment><USER8> Thanks - I like those analogies. I want to invest some time to see if the unlearning works for me. Most times when converting to a higher level way of doing something it eventually does.

Also - thanks for all the awesome core.async gists - I feel like I want to take a geek sabbatical just so I can study them :)

</comment></comment></comment><comment><USER9> When it comes to UI programming, I tend towards declarative solutions to problems over imperative ones.

That said, this feels like an imperative solution to something that a state machine could handle equally well.

<comment><USER7> ... core.async compiles down to _efficient_ state machines that I have absolutely no desire to write by hand.

</comment></comment><comment><USER10> Can this be used for node.js development? If so, any example projects out there?

<comment><USER11> In regards to Clojure, why bother with node.js when one has the full power of the JVM and CLR at disposal?!

<comment><USER12> Because you want to use a library that was written for Node and not speed time finding (or writing) something similar for the JVM? If you know Node better than the JVM, Clojurescript on Node is very likely more valuable to you when starting out than Clojure on the JVM.

<comment><USER11> Given JVM and CLR's age, I doubt there is any library for node that doesn't already exist in a similar way for the other platforms.

<comment><USER12> Just because a library exists for the JVM or CLR doesn't mean a person familiar with Node knows that it exists or the advantages/disadvantages of the 15 libraries that will show up for any given thing they are trying to do. The libraries, profiling tools, performance tuning details. These are the things that make up a platform. Knowing the syntax of Clojure and nothing about the JVM ecosystem isn't going to help you ship any faster. Should a developer in this situation bite the bullet and learn a better supported platform? Maybe. Does everyone have time to do so? Probably not.

<comment><USER11> Since Clojure was born in the JVM, I doubt anyone learning Clojure will be more at home in node.</comment></comment></comment></comment></comment></comment>


Mashable crushed us - here's how we bounced back - <AUTHOR> http://blog.appstorehq.com/post/1212703421/mashable-crushed-us-heres-how-we-bounced-back <comment><USER2> Erm, that solution is a little extreme, unless there are a few steps missing.

The first things I'd do: 1\. Aggregate those inserts into a single SQL command. You never want to be issuing O(n) SQL queries per request.

2\. Use InnoDB, not MyISAM, for the database engine. I assume it's MyISAM because he's talking about table locking. InnoDB has row-level locking, so you'll be able to INSERT and SELECT from a table concurrently.

I had a Facebook app with 20MM MAUs, and it worked fine with two machines. A component of the app was voting in polls, and I was processing ~10k votes per second. Each "vote" is an insert into a votes table.

Soo...not really sure how you go from "We're running too many INSERT queries and locking the tables!" to "Async queues and MongoDB!"

<comment><USER3> Yes, yes, yes.

0\. Make the right kind of table. create table user_apps (user_id integer, app_id integer, primary key (user_id, app_id)); -- this does the validation for you, and (should) index the table on both user_id and (user_id,app_id).

1\. Make the right kind of insert statement! insert into user_apps select 5, 6 union all select 5, 7 union all select 5, 8; -- etc

2\. How do you do recommendations? That sounds like it'd be tough to do well, especially within a web request.

<comment><USER2> I didn't read the part about validations. That's silly.

Even if you have to do it in the application layer, why would you need more than one SELECT? Just get the installed apps from the DB in a single query and do a set difference operation to only get the apps not already installed.

But I agree that putting the constraint in the DB layer is the correct solution. With MySQL you can just do INSERT IGNORE to only add apps not yet marked as being installed.

</comment></comment></comment><comment><USER4> It seems that a lot of the INSERT and SELECT issues could be addressed via a stored function/procedure in a database such as PostgreSQL, MySQL's stored functions/procedures aren't there yet. You would be able to do the validation within the stored procedure, or even in a trigger, which would likely be even more efficient. I always find it odd when the solution is to use something such as Mongo DB, and continue to write more of your database logic in your app, rather than in your database, where it can run fastest without any unnecessary round-trips.

</comment><comment><USER5> You really gave us no information at all to justify your decision. For all we know you were running a 5.0 build on a 7200rpm disk with the default my.cnf settings.

</comment><comment><USER6> My take away from this is to plan for traffic spikes from the start. You just never know when (if) you will suddenly get mentioned on a big blog or something.

</comment><comment><USER7> Maybe write the many to many relations in a background job/queue, and push the result back to the user when they're synced. Granted, long polling will take a number of connections, but the socket server won't take down your front facing service.

Great to see that MongoDB turned out to be a quick solution, but it seems that the writes could have just been timed more effectively.

Thanks for the insight!

</comment><comment><USER8> Here is the link to the page from google cache: [http://webcache.googleusercontent.com/search?sourceid=navcli...](http://webcache.googleusercontent.com/search?sourceid=navclient- ff&ie=UTF-8&q=cache%3Ahttp%3A%2F%2Fblog.appstorehq.com%2Fpost%2F1212703421%2Fmashable- crushed-us-heres-how-we-bounced-back)

</comment><comment><USER9> Seems like this could have been solved without mongodb by:

1\. Moving the inserts to a adync background job

2\. Use raw SQL instead of activerecord for the inserts.

I'm used to postgres though, I know it can handle heavy writes at the same time as heavy reads just fine without replication.

<comment><USER10> We might have been able to get away with raw SQL, but because of some of the complexities and dependencies on this same code, I felt like it wasn't the prudent choice during a fire. I wouldn't have had time to properly test it.

As for moving the inserts to an async job, that was one of our thoughts, too. Really it's what we did, but we just have the intermediary step of MongoDB. We wanted that step (rather than just immediately returning to the user and having the client not know when the inserts actually occur) because we wanted to keep the user experience great. Our app immediately sends you to personalized recs. We didn't want the initial experience to be: open the app => sent to a blank page of "recommendations."

An async job that didn't wait for any sort of confirmation would have left us in this position (or we would have had to implement a poller to check if the inserts were complete, which seemed wasteful and would need a push to Android Market which seemed less feasible.)

<comment><USER7> Good call!

</comment></comment></comment><comment><USER11> Poor timing?

"We'll be back shortly!

We're making some changes to our infrastructure and certain pages may be unavailable for a few minutes.

We're very sorry for the inconvenience.

Please check back shortly."

I'm honestly not sure if this is a joke, or if the post made it before the commit or something, or if their new launch had technical difficulties?

Anybody know?

<comment><USER12> That's tumblr error page... they've been having some performance issues.

<comment><USER13> Indeed it is Tumblr's erorr page (<http://tumblr.com/>). It's interesting (re: shady) that they don't put their name or logo anywhere on the page. Most people visitors will never know it's Tumblr's fault when they attempt to visit a Tumblr-hosted site and run into this page.</comment></comment></comment>


Mapping Immigrant America - <AUTHOR> http://personal.tcu.edu/kylewalker/immigrant-america/

<comment><USER2> One problem with many of these dot representations is that the dots occlude other dots. This is particularly a problem when zoomed out. This visually overrepresents the dots drawn last.

For example, look at a blown up version of this area:

[http://i.imgur.com/XA9IDqy.png](http://i.imgur.com/XA9IDqy.png)

Blue and red might be equal in numbers in this area, but because blue occludes red, unless you zoom in, all you see is a predominately blue region.

A quick solution is to put all dots in a list, shuffle the list, then draw each dot -- instead of drawing all of one color at a time.

</comment><comment><USER3> Really cool, but this would be much improved if general regions (e.g., all of Asia or all of Americas) were in the same color range. As it is, it's somewhat difficult to identify trends.

</comment><comment><USER4> Pretty neat. I wish the dots could be bigger. I find it difficult to tell their colour.

</comment><comment><USER5> Creepy. It like that scene from x-men where the kid is asked to find all the mutants.</comment>


What would be the business implications to consider for going open-source? - <AUTHOR> What would be the business implications if a company like for example bubble.io converted their offering to an open-source project, where companies could host / run an app themselves or pay for a hosted option by bubble.io?<p>I'm asking because we have built something similar and we are contemplating the roadmap for us as a open-source project with a paid hosting service, vs just the paid hosting service. We also want to consider this from a technical and investor perspective. <comment><USER2> You want to be deliberate in the license you choose. Some strong copyleft licenses are just not allowed in corporations and the newer common clause and similar, while meant to protect the company from the likes of Amazon, are actually hurting their business in the way strong copyleft do.

The other thing to consider is that mostly developers will use open source, so consider your audience.

One company doing really well is Astronomer.io with Apache Airflow</comment>


Every October, Write a Lisp Interpreter In C - <AUTHOR> https://twitter.com/#!/haikoschol/status/128741308985643008 <comment><USER2> I would have thought that writing a C compiler in Lisp would be more interesting... Every time I read a book on compiler design in C, the book passes an inordinate amount of time setting up the infrastructure for creating an AST, yet surely this would be a very natural thing in Lisp?

</comment><comment><USER3> Do you think they would want us to spend our 'Octobers' reinventing things they built or for us to take their works in computing to greater heights?</comment>


What's new in CPUs since the 80s and how does it affect programmers? - <AUTHOR> http://danluu.com/new-cpu-features/ <comment><USER2> It's strange the extent to which programming interview questions reflect an 80s view of the cost of operations, particularly the overabundance of linked list and binary tree questions. Cache misses ain't free and memory scans are relatively cheap after you do the initial lookup.

<comment><USER3> Yep! The big thing people don't realize that it is memory operations that are the biggest cost in terms of both time and energy.

While it takes ~100 picojoules to do a double precision floating point operation on a Ivy Bridge Intel processor, it takes 4200 picojoules to move the 64 bits from DRAM to your registers. Most people assume that the huge power usage is because you need to move data from off the chip, but the reality (and surprising fact to most people) is that over 60% (~2500 picojoules) of the energy usage of moving the data is consumed by the on chip cache hierarchy. That doesn't mean the SRAM caches themselves, but all the additional logic that makes it hardware managed (TLBs, etc) that give you functionality like virtual memory translations, cache coherency, etc.

Getting rid of all of that cruft that has been added since the 80s to make programmers lives easier would actually reduce power consumption and latency significantly... My startup is working on that problem by removing all of that additional logic from the hardware and instead having it managed at compile time. The best thing though would be having programmers really think about locality when writing their programs though.

<comment><USER4> I hope you realize that managing memory latency has been the most fundamental motivation throughout Intel for 25 years. It isn't a problem that is a matter of a revelation about the problem itself.

I speed up programs all the time by reorganizing how memory is layed out and accessed. Many time by factors of 12x or more.

I would think that making SIMD, parallelism, and multiple simple loops instead of one bigger loop much easier to program around would be much more realistic. Something like a fusion of ISPC, Rust, C++11, and Julia.

<comment><USER3> First off, I was referring primarily to memory latency between L1 cache, which has improved over the past 2.5 decades only through the combination of Moore's law getting the wires shorter (which is going to end soon, at least for silicon) and increasing clockspeed (which really ended with the breakdown of Dennard scaling a little over 10 years ago). Intel's L1 cache latency has not improved in almost 10 years, with it still at 4 cycle latency (at best). The improvement has only been that there is more data you can access at L1, but the time to data hitting your registers has not improved at all.

Our scratchpad (the analogous term for software managed memory, in comparison to a traditional hardware managed L1/L2/L3 cache system) for instance has single cycle latency along with zero bus turnaround. Along with our ability to guarantee memory latencies between any locations in memory, our whole goal is to try to never have a wasted cycle.

</comment></comment></comment></comment><comment><USER5> What interested me in the design of the Mill CPU is how it throws out the usual design of machine language.

I'm not talking about assembly language, and I know the difference, BTW.

In the name of software compatibility, we're still trying to program CPUs using machine language that wouldn't be so strange to a programmer from the 1980's. Sure, there's more registers, and some fun new stuff, but it isn't all that different.

Except that in the 1980's, the CPU actually implemented those instructions. These days, it is all a lie, especially with regards to things like register sets and aliasing. Yes, of course, logically, what the programmer wanted to happen does, but today even programming at assembly level, you are far, far removed from what the CPU is actually doing.

Edit: Here's the website: [http://millcomputing.com/docs/](http://millcomputing.com/docs/)

<comment><USER6> It is worth noting that many of the Mill features are also a "lie" (for example, the belt is still just registers and register renaming). Its just that the Mill uses lies designed for modern processor technology.

<comment><USER7> False. Mill does not do register renaming. ( Or use "lies". I failed to comprehend you second sentence. )

Here is a talk from one of the designers explaining how it is done: [https://www.youtube.com/watch?v=QGw- cy0ylCc&feature=youtu.be...](https://www.youtube.com/watch?v=QGw- cy0ylCc&feature=youtu.be&t=24m38s)

<comment><USER8> "Lie" in this context means something like "abstraction or metaphor that doesn't present itself as such."

</comment></comment></comment></comment><comment><USER9> This is a wonderful post that no-one will care about. This may be the only post.

Today, programmers are more interested in the rate they can turn out "Just Works" code. These kinds of details are fare fare to down in the weeds for a continuous development artists.

<comment><USER10> > _This is a wonderful post that no-one will care about. This may be the only > post._

I think you are underestimating the crowd here. Last time it was posted it got quite a few responses: [https://news.ycombinator.com/item?id=8873250](https://news.ycombinator.com/item?id=8873250) (already a while back, but might be interesting for reference/to bring topics up again)

<comment><USER11> There also seems to be a constant barrage of assembly/CPU posts (I counted 4 posts including this one earlier on the front page) , I'm not sure where GP gets the idea that no one here cares.

</comment></comment></comment><comment><USER12> > A few years back, I used a Pentium 4 system...

I hate it when blog posts don't include the date. Judging by the linked question this blog post must be at most a few months old, but there was nothing on the page that would tell me that. One of the most important questions is whether the information in the article is still applicable... In this case it is, but it would be nice if readers knew it. Not to mention 10 years from now when somebody stumbles across this writeup. </rant>

EDIT: Nice article though. :)

<comment><USER13> It's from January 11 2015, according to this page: [http://danluu.com/blog/archives/](http://danluu.com/blog/archives/)

</comment></comment><comment><USER14> "However, loads can be reordered with earlier stores. For example, if you write

        mov 1, [%esp]
        mov [%ebx], %eax

it can be executed as if you wrote

        mov [%ebx], %eax
        mov 1, [%esp]"

The confusing mix of Intel and GAS/AT&T syntax aside, this is not possible since it would give different results when ebx == esp.

<comment><USER15> It's not a static decision though - the memory accesses can still be reordered when %ebx != %esp, though of course this only ends up visible where there are multiple CPUs involved.

For example, consider the case above and assume that the initial conditions are:

      (%esp) == 0
      (%ebx) == 0

Now imagine we have a second CPU executing simultaneously, with the same %ebx and %esp as the first CPU, but executing this:

      mov $1, (%ebx)
      mov (%esp), %eax

Now if there was no reordering, either one or both CPUs must end with %eax == 1. However, the hoisting of loads before earlier stores means that you can actually end up with both CPUs have %eax == 0 after this executes.

<comment><USER14> You're correct about it being possible for other CPUs to see "crossed" loads/stores, but _within one CPU /stream of instructions the programmer- visible ordering is absolutely preserved_, because if it wasn't, a lot of existing software would break. In your example, if ebx == esp, and both CPUs executed those two instructions, then they must both see eax == 1. I think you had this scenario in mind instead (where A and B are _different_ memory locations):

CPU 1:

      mov $1, (A)
      mov (B), %eax

CPU 2:

      mov $1, (B)
      mov (A), %eax

Where eax == 0 on both CPUs is definitely possible.

<comment><USER15> We are of course in violent agreement.

The point to note is that the decision on whether or not the reordering can occur, based on whether or not A and B are the same or not, is made dynamically at the point of execution.

</comment></comment></comment></comment><comment><USER16> It's nice but let's be clear on the best feature: application-accelerators. I brought up the Cavium Octeon 3 in a discussion on game systems:

[http://www.cavium.com/OCTEON-III_CN7XXX.html](http://www.cavium.com/OCTEON- III_CN7XXX.html)

Intel, IBM, mainframes, and embedded SOC's are all taking the same approach to a degree of combining 1-N general-purpose cores with dedicated hardware for performance-critical stuff or just stuff that shouldn't add overhead. The Octeon line is an extreme example with them adding accelerators till they hit around 500. Most modern variant being the "semi-custom" business of Intel and AMD that is making more of it happen for those with the money.

This is peripheral to an improvement in computers known as network on a chip. This plus extra layers of functionality in silicon lets the companies easily do stuff like that. The next step is incorporating FPGA logic in the processors. We already see it in embedded scene. Just wait till Intel uses Altera technology in Xeons. SGI's Altix machines with FPGA's using NUMA were already quite powerful. Imagine the same benefit of no, remote-memory access for the FPGA logic working side-by-side with CPU software. Will be badass.

</comment><comment><USER17> This is a question from someone rather ignorant, so please don't hit me: Why didn't the Bulldozer affect the programmers? It (or Piledriver) seems to be doing quite well in applications with good threading.

<comment><USER18> In general all x86 chips are carefully designed to fulfill the abstraction that is the x86 ISA so to the programmer it shouldn't matter whether their code runs on an Atom or a Bulldozer or an i7.

</comment></comment><comment><USER19> I don't think "good at executing bad code" applies for embedded CPUs. Of course, good code is still more the province of the compiler (with PGO for example).

</comment><comment><USER20> Who is Dan Luu? Does he have expertise in this area? Is he a leading expert? (No offense to Dan if he is reading this; I just don't know.)

<comment><USER21> You can start by looking at [http://danluu.com/about/](http://danluu.com/about/). Assuming his CV is accurate he presumably has a reasonable amount of knowledge in the area.

</comment></comment><comment><USER22> It's a great article but this drove me nuts:

DON'T USE FUCKING AT&T ASSEMBLY SYNTAX.

Literally everyone uses Intel syntax, except in those situations where they are forced to use AT&T syntax (inline assembly in C on Unix, somehow your box doesn't have NASM). Using AT&T syntax for examples just confuses people. Write assembler the right way. Destination, source. Come on.

<comment><USER23> The default output format of HotSpot is AT&T. The default output format of GCC is AT&T. The default output format of Clang is AT&T. Tools like the universal compiler output viewer [https://gcc.godbolt.org](https://gcc.godbolt.org) use AT&T by default.

Intel isn't the universally accepted format you think it is. I'm a professional VM researcher and I use AT&T more often than Intel. In fact I most often see Intel when reading Intel documentation.

You're shouting about nothing more than empirical than tabs vs spaces, and even then I think your side is actually in a minority.</comment></comment>