5 ms·
It abstracts away underlying hardware, leaving you with a convenient set of abstractions for deploying containerized networked services. Sort of an OS for a clu
by doteka 5y ago
It abstracts away underlying hardware, leaving you with a convenient set of abstractions for deploying containerized networked services. Sort of an OS for a cluster of distributed machines. Unfortunately this involves lots of YAML.
How’d I do?
- noitpmeder 5y agoBetter than all the crypto nonsense.
- saboot 5y agoExcept for the very last part because I don't know what YAML is, but the rest was understandable. Which I think drives the point of all this crypto talk in acronyms contributes to it being incomprehensible.
- drdeca 5y agoYAML stands for “YAML Ain’t Markup Language”, (originally “Yet Another Markup Language”). It it a way of storing the same kind of thing that JSON can store. Though, unlike JSON, it supports comments, uses a python-like significant indentation, and has a few uh, things not in quotes sometimes being taken as strings, but if it is `NO` then instead, if there are no quotes, it will be interpreted as the constant false .
- iqanq 5y agoOne could write a sentence like that about smart contracts. One I pulled from Google: Smart contracts are simply programs stored on a blockchain that run when predetermined conditions are met. They typically are used to automate the execution of an agreement so that all participants can be immediately certain of the outcome, without any intermediary’s involvement or time loss. They can also automate a workflow, triggering the next action when conditions are met.
- erikbye 5y agoAnd here's the "oh so complex" contract in question, all 60 lines. contract WETH9 { string public name = "Wrapped Ether"; string public symbol = "WETH"; uint8 public decimals = 18; event Approval(address indexed src, address indexed guy, uint wad); event Transfer(address indexed src, address indexed dst, uint wad); event Deposit(address indexed dst, uint wad); event Withdrawal(address indexed src, uint wad); mapping (address => uint) public balanceOf; mapping (address => mapping (address => uint)) public allowance; function() public payable { deposit(); } function deposit() public payable { balanceOf[msg.sender] += msg.value; Deposit(msg.sender, msg.value); } function withdraw(uint wad) public { require(balanceOf[msg.sender] >= wad); balanceOf[msg.sender] -= wad; msg.sender.transfer(wad); Withdrawal(msg.sender, wad); } function totalSupply() public view returns (uint) { return this.balance; } function approve(address guy, uint wad) public returns (bool) { allowance[msg.sender][guy] = wad; Approval(msg.sender, guy, wad); return true; } function transfer(address dst, uint wad) public returns (bool) { return transferFrom(msg.sender, dst, wad); } function transferFrom(address src, address dst, uint wad) public returns (bool) { require(balanceOf[src] >= wad); if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) { require(allowance[src][msg.sender] >= wad); allowance[src][msg.sender] -= wad; } balanceOf[src] -= wad; balanceOf[dst] += wad; Transfer(src, dst, wad); return true; } }
- somewhereoutth 5y agoand this will be the 500k trap: function() public payable { deposit(); } If it didn't have this no-arg behavior, then the mistake wouldn't have been made.
- radford-neal 5y agoWhy does anyone want to use this? Knowing nothing about it, this is the question that remains unanswered to me after reading through dozens of comments on this debacle. What was the person who lost half a million trying to accomplish? For what benefit? I assume that if you just want to use ETH to buy and sell stuff, you don't have to get involved with any of these smart contracts.