(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Picking the right architecture = Picking the right battles + Managing trade-offs
/** | |
* Base contract that all upgradeable contracts should use. | |
* | |
* Contracts implementing this interface are all called using delegatecall from | |
* a dispatcher. As a result, the _sizes and _dest variables are shared with the | |
* dispatcher contract, which allows the called contract to update these at will. | |
* | |
* _sizes is a map of function signatures to return value sizes. Due to EVM | |
* limitations, these need to be populated by the target contract, so the | |
* dispatcher knows how many bytes of data to return from called functions. |
``` | |
// This code snippet shows how an external function can use a pattern like | |
// python's `try..except..else` with `.call`, `throw`, and reentry | |
contract TryExceptElsePatternUser { | |
address _sender; | |
function tryExceptElsePatternExample() | |
external // must be external | |
{ | |
if( msg.sender == address(this) ) { |
Whisper is a pure identity-based messaging system. Whisper provides a low-level (non-application-specific) but easily-accessible API without being based upon or influenced by the low-level hardware attributes and characteristics. Peer-to-peer communication between nodes running Whisper clients uses the underlying ÐΞVp2p Wire Protocol. Whisper is not designed to provide a connection oriented system, nor for simply delivering data between a pair of particular network endpoints. Whisper is a new protocol designed expressly for a new paradigm of application development. It is designed from the ground up for easy and efficient multi-casting and broadcasting, and also for low-level partially-asynchronous communications. It is designed to be a building block in next generation ÐApps which require large-scale many-to-many data-discovery, signal negotiation and modest transmissions with an absolute minimum of fuss and the expectation that one has a very reasonable assurance of complete privacy. At its
/** | |
* Author: Nick Johnson <arachnid at notdot.net> | |
* | |
* WARNING: This contract is new and thus-far only lightly tested. I'm fairly | |
* confident it operates as described, but you may want to assure yourself of | |
* its correctness - or wait for others to do so for you - before you trust your | |
* ether to it. No guarantees, express or implied, are provided - use at your | |
* own risk. | |
* | |
* @dev Ether vault contract. Stores ether with a 'time lock' on withdrawals, |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.