4,235 karma · joined Sep 10, 2015 (11y ago) · 1,525 submissions
comment 11y ago · link · parent
For example, if you display photos in a table, there is no state, but if you display photos with a carousel, then you have state as the current page, but these two components should otherwise have the same interface and implementation. Also in general the current selection and scroll position is state, albeit stored in the browser, so any UI component can potentially have state, even if it is only stored implicitly in the DOM objects.
What really matters is whether the component holds any state with "semantic" meaning or that needs to be persisted (like a date the user selected in a date picker) or whether all the state is "presentational" (like the month a date picker is showing).
What you should do in React is not hold any "semantic" state in components, unless it's a component that is solely designed for holding and managing such state (e.g. Relay container components, or a root App component).
EDIT: slightly reworded to be clearer and more correct, since having the same API interface regardless of statefulness is implicit in React
comment 11y ago · link · parent
According to multiple sources, Internet transit in the US now costs less than 1$ for a 1 Mbps line for large deals, which translates to 1$ for 324GB, which translates to 0.003$ / GB.
Amazon charges 15-30 times that.
(it appears that traffic can be much more expensive in places other than the US and presumably Europe)
comment 11y ago · link · parent
While you can send in 50TB for $200, taking the same 50TB out costs an additional $1500 charge (50000 * 0.03).
[assuming they are not transferring the data over the Internet, the cost to AWS should be the same or cheaper for reading]
comment 11y ago · link · parent
Reddit used to be loved and trusted as a place that cared about its community and free speech, but now most users probably stay on Reddit only because it's popular, and would jump ship as soon as a more popular alternative, even in just a niche, shows up.
But of course, thanks to funding, possible good management and inertia, Reddit might just be able to out-innovate and out-compete anyone else and keep its current position.
comment 11y ago · link · parent
Also, there is usually no NAT, meaning IP addresses are more likely to uniquely identify the user even without the MAC-based addressing.
But of course setting a cookie allows better tracking, and Tor defeats tracking anyway for those wishing to intentionally defeat it, so in practice it probably doesn't make much of a difference.
comment 11y ago · link · parent
Really?
> Limits:
> Web ACLs per AWS account: 10
> Rules per AWS account: 50
> Conditions per AWS account: 50
> IP address ranges (in CIDR notation) per IP match condition: 1000
Huh? Is this really intended for production, with such low arbitrary limits?
comment 11y ago · link · parent
That means forcing the manufacturers to release the source of any component not behind a stable ABI, and release at least the binaries of any component behind them such as apps (with a suitable license).
They have two ways of doing this:
1. Make it a condition for bundling Google Apps
2. Relicense Android with GPLv3
The phone manufacturers aren't really in a position to negotiate (can't lose apps), so they should go along.
Once this is done, they can just have the Play Store offer or even require updates to the OS.
Not sure what Google gains from not doing this, it seems they are just gifting users to Apple.
comment 11y ago · link · parent
Since it provides up to 10 accounts for free, it looks like that end-users (for whom 10 accounts are more then enough) are not supposed to be the paying customers, but rather other companies that want to integrate with Gmail, etc.
But... does this mean that these companies are supposed to encourage the user to connect their e-mail accounts to the company's Nylas platform account, thus giving Nylas all the user's e-mails and weakening e-mail privacy even more?
Or is the business model something else...?
comment 11y ago · link · parent
That said, I agree that it's problematic to try to enforce anything not regarding code, since the enforcer (or who succeeds them) can then abuse the enforcement itself as an harassing and exclusion tool (the so-called "Nazi moderator" problem).
comment 11y ago · link · parent
Obviously, the enemy may know more about the owner of Microsoft account XYZ: for example, they may know the name you typed when registering it or, if you login to the same account from your home internet connection, they may know that it is the same person that had assigned IP I at time T and may thus know that it is the same person that the ISP who was assigned the IP address block containing IP I claimed presented ID stating he was Mr X to the ISP as part of subscribing to the ISP.
This means that between accessing the Microsoft account XYZ and doing other things that you don't want to be associated to the owner of Microsoft account XYZ, you should use the "New Identity" button in Tor Browser, or use a separate machine or Tor Browser instance. Of course you cannot know which services reveal your user id to your enemies, so you should always do that regardless of whether the service is known to send it in plain text or not.
comment 11y ago · link · parent
When you change the public encryption key, you decrypt all messages received under the old key, re-encrypt with a local key, and destroy the private decryption key.
This way, someone getting your private encryption key cannot decrypt intercepted ciphertext he got before your last key change.
Obviously it requires to change PGP to get a new signed encryption key every time (unless there's some extension that already does it?)
comment 11y ago · link · parent
If you say no, it should clearly delineate how an attack could take place and advise you on how likely it is.
comment 11y ago · link · parent
Whatever place TextSecure is getting the key from could have replaced your girlfriend key with something else and be MITMing all the traffic.
The proper way to do this would be to have your girlfriend's phone display a QR code with her public key and have you scan it with your phone camera, or using NFC to transfer the public key if available.
comment 11y ago · link · parent
comment 11y ago · link · parent
- The hardware you are emulating is usually undocumented
- For recent systems, you must use a JIT for CPU emulation or it will be too slow
- For pretty much anything with 3D, you need to use GPU acceleration or it will be too slow (and the host and emulated GPUs might work very differently)
- Users want to run 3D games at arbitrary resolutions higher than the ones intended for the emulated targets, so you need to add trickery to handle that (like transparently resizing framebuffer-sized internal textures and so on)
- For recent systems, you may need to emulate a memory access with a single memory access, which means you need to setup the host virtual space to be the same as the emulated system, which requires lots of tricks to handle MMIO regions, memory mapped in multiple places, and finding a place to put the emulator code
- Sometimes you need to emulate one or more software APIs instead of the hardware, because emulating the hardware would be too hard or too slow or not allow to replace functionality (this is called "HLE" - high level emulation)
- You need to map keyboard+mouse and optional 360 controller to whatever input system the emulated target uses, as well as supporting plugging in the actual emulated controllers with some kind of adapter
- There may be a copyrighted BIOS or OS that you need to reimplement or support extracting from the machine