What is Ethereum? - <AUTHOR> http://etherscripter.com/what_is_ethereum.html <comment> vezzy-fnord Isn't fuzziness a _feature_ of most legal codes? Treating the law like an absolute immutable contract sounds anathema to a healthy judicial system.

I'm not sure why some technologists have such a fascination with legalism.

I'm not against the idea of digital government and having laws be distributed under a free documentation license with the ability for citizens to discuss and amend laws. A standard version control and issue tracker model sounds much more appropriate, however. Perhaps even just email and diffs, so as to have a barrier to entry.

<comment><USER3> Ethereum is a currency and enforcement system built for computers. Initially, ambiguity isn't a feature because it's meant for contracts and things which are meant to be precise. Room for ambiguity in ethereum can be added later, once computers are intelligent enough to negotiate ambiguity.

The main feature of this system is removing the need for enforcement. Think about how much goes into maintaining police, bounty hunters, debt collection services, reposession services, prisons. In many people's opinions, if enforcing a contract is possible through software rather than physical force, software is always preferable. It brings its own issues of course and isn't instantly perfect, but the possibility of a world with much less need for violence to enforce the law is worth pursuing.

The biggest advantage of this is that it can be completely automated. Corporations can be programmed to run themselves and negotiate enforcable contracts with each other without any human intervention. You could have a personal digital assistant which interacts with other digital assistants to manage your finances and investments, and everything can be enforced by software. As long as enough people are running free software, everyone can share mutually beneficial enhancements to the algorithms which govern their behavior.

You might not want this kind of thing today instead of a trained financial advisor, but 30 years from now, it's likely that software will be better able to make financial decisions than any unaugmented human. Even more important would be movement of commodities around the world between people who need them. Instead of relying on profit-motivated markets to distribute goods, we could have optimal algorithms for moving resources where they're most needed, and enforcement of these agreements will not depend on the strength of a nation's military or economic power but rather smart contracts which are perfectly enforcable whether they belong to a first or third-world nation.

None of this comes free, and there are real challenges to overcome. People will try to exploit them for personal profit. Software will have bugs and make bad decisions. Those are some of the growing pains we'll need to work through to get to a more fair, less violent world.

<comment><USER4> You misunderstand why contract enforcement leads to violence. In the real world, contracts among equals are always fungable and rarely enforced with violence. It is different when the contracts are between powerful and the not so powerful. Violence propagates down.

Ethereum, by automating contract enforcement is going to end up being a tool for the powerful against the weak. A tool which brings the cost of lowering contract enforcement will lead to powerful organizations using Contracts more often against the weak.

<comment><USER3> You're right in general, but if two groups use a common software platform and write the rules of the contract into it, there's less need to build up an enforcement regime.

I'm not sure exactly how you're interpreting contract enforcement leading to violence, so I'll try to explain a little more. Two people make a financial agreement, hire lawyers, and depend on a powerful police force and and penal system to enforce the terms of their contract. This increases the need for armed police, prisons, etc. As more people and institutions are given the right to enact violence to enforce these contracts, people become more desensitized to violence and arrest and more opportunities for abuse present themselves. Abstracting this enforcement into software also distances the enforcement from the culture and removes some of the negative psychological effects on people of carrying out that enforcement.

That's on the smaller scale. On the larger scale, nations feel pressure into increasingly more arms races to keep themselves on an even level. Abstracting enforcement of agreements into software can have the same effect as the introduction of diplomacy into international trade. While it didn't eliminate war, it offered an alternative to straight-out aggression between tribes. Groups that used to stay to themselves and interact with each other only on disputed borders were able to cooperate on a much higher level by establishing representatives inside each others borders.

A smart contract system is a neutral, diplomatic ground for the Internet. Today, the Internet resembles in many ways the world before diplomacy. There is a persistent, escalating cyber-war between nations. People can move in between nations, but there's no real neutral territory that every nation would consider fair. By having a mutually-agreed and verifiably trustworthy software platform to enact contracts, there can be opportunities for new types of deals that are more mutually beneficial.

Will this suddenly eliminate war and hostility? Of course not. Neither did diplomacy. But almost nobody thinks we should go back to a world without any diplomacy, and once we have neutral and fair systems to conduct electronic business, few will want to give it up.

<comment><USER4> Contracts that are mutually beneficial typically don't need to be enforced because they are not often broken. People who consider themselves equals give each other slack in contracts. The only use case this software fits with is is handling contracts where one party does not trust the other. Typically the more powerful party is at an advantage.

There are two scenarios I see. This software is useful to powerful groups to make contract enforcement cheaper in which case they will essentially force the weaker party into compliance. Or this gives the weaker party an advantage, in which case this software never takes off. Because let's face it, I would never use this with people I like.

<comment><USER5>
        Contracts that are mutually beneficial typically
        don't need to be enforced because they are not
        often broken.

This is a fundamental misunderstanding the purpose of contracts. Contracts are almost by definition mutually beneficial, at least nominally. Otherwise the only reason parties would enter into them is under duress or out of ignorance. And in fact, contracts backed by a legal system are routinely struck down if either of those cases occur.

What you are describing is a situation where neither party has an incentive to defect or default on the contract. And if that is the case then there was no need for a contract in the first place. For example, you and I agree to meet Friday night for dinner. This is a beneficial arrangement for both of us, neither of us need sign anything.

The purpose of contracts is to solve a game-theoretic problem: it is to our mutual benefit to cooperate in some way. But if we cooperate, then one of us can do even better by defecting. For example, it might be mutually beneficial for me to give you $1,000 today, and for you to give me 100 widgets on Thursday. But if I give you $1,000 today, you can do better than the original agreement by keeping the money _and_ the widgets. So the only reason I would ever give you $1,000 is if there was some way to _enforce_ that you give me 100 widgets. That can be by legal means, or technological means. The threat of punishment under a legal system is one traditionally effective way to incentivize you to hold your end of the bargain, and in many ways is at the very heart of what makes modern society work. A technological solution, that avoided law enforcement and judiciary systems, has the potential to be even better because there are obvious negative effects to having a large and over- reaching police force, for example.

TL;DR The enforceability of the contract is the whole point. The only reason you need a contract in the first place is because someone has an incentive to defect.

<comment><USER3> Thanks. That's exactly it. People might try to counter by saying that specific cases don't work that way, but that's not what game theory predicts. It won't tell you the outcome of a specific instance of a conflict, but it will predict the overall trend when a winning strategy exists. Traditionally, the counter to exploitable strategies was the honor system. You trusted the people you interacted with not to take advantage of you because you believed in their character. While that can work in specific cases, it's not an overall good system for running a large-scale system of social interactions because it invites exploitation. We tend to think of corruption as inevitable, but the degree of corruption in a system is actually somewhat predictable by the incentives for it built into the rules of the system when that system runs at a large scale.

<comment><USER6> Thanks for some fascinating contributions to this thread.

I see both sides of the debate, and lean toward your side. But I also think both sides are probably wrong to speak as if we will have either one system or the other in the foreseeable future. I think it is more likely that government resources and law enforcement will exist alongside any trustless contract system, acting as a failsafe (or guarantor of exploitation, depending on your POV I suppose). Few contracts would be irreversible, and few holders of contracts would resist reversal, if physical violence from the state were brought to be bear, even if the issue had already been "settled" by software. I believe the reality is that Ethereum-style contracts would increase efficiencies in more routine, less controversial contracts and the state would remain the final recourse in more extreme cases. As some have said, 30 years down the road when machines are more intelligent, all bets are off. But for the foreseeable future, the state isn't going to wither away just yet.

As far as people obfuscating with complex contracts, yes, of course they will do that. But the obvious implication is that a class of techno-jurists will have to arise to help advise users. Again, that's not much different than the current system of clueless folk consulting attorneys, and I imagine both systems would coexist for some time to come.

<comment><USER3> I definitely agree that smart contracts are going to be implemented as another layer. They'll erode the need for traditional enforcement slowly. And while there's a need for resolution when there's a bad contract, that resolution system doesn't always have to be a person.

Here's a simple theoretical example. People operate under a common, universal law system that defines the most basic rights. The rules of this system are only those which everyone who participates can agree to. For example, everyone agrees not to kill each other. People who do not accept these rules can form alternative societies, but they will not be able to access areas under common law through the use of smart locks and the like which restrict access to public spaces only to those who accept basic terms of behavior.

These rules can be under constant revision because the code that runs the base social platform is publicly audited, and anyone can submit a request to edit it. These revisions can be tested at smaller scales just by running the rules in private spaces. In your home, you can set whatever rules you want, but anyone running software with conflicting preferences will be alerted to the changes when they enter. If your home rules become popular with your friends, they may choose to implement them in their home. If enough people adopt them, the community may choose to implement them in certain spaces, and they can propagate outward.

The basis of this type of system would be mutual consent, and what a person consents to do can be adjusted at any time by their own software. It would be important that a person's personal platform was entirely under their control and only interacted with the outside world through approved protocols. Likely this would require a direct brain connection that could not be hacked because of physical safeguards.

Business could be conducted between communities that operated under entirely different rules through automatic contract negotiation. New ideas could spread from private to public spaces automatically through smart social contracts.

This is just one, very basic example of a society run by smart contracts. There's plenty of ways for these types of systems to be exploited, but that's part of the design process of any system. Particularly difficult is the problem of letting a machine which can be manipulated dictate so much of life.

But people's brains can be hacked already. Look at advertising, religious cults, mob mentality. People have always been vulnerable to manipulation, and we have developed an interconnected financial system where almost anything can be bought, especially power. We can learn from existing flaws as we develop new systems to fix the bugs in our biology and political systems that have made us vulnerable. We will definitely introduce new vulnerabilities. We just have to make sure we have a robust plan for continued development to respond to them.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> This is a terrible description of Ethereum and trivializes what it is.

The interesting parts of a contract are not the deadline and the transfer of funds. Even an escrow service can provide those functions.

The interesting parts of the contract are the conditions of the transfer of funds, and how those are evaluated prior to effectuating the transfer, and how the obligations are enforced after the transfer.

What makes Ethereum interesting is that it creates a public, decentralized infrastructure for standardized outsourcing of third-party verifiers for each conditional precursor of a contract, and each subsequent obligation.

A contract can specify a set of payments and deadlines, as in OPs example, but it can also specify Boolean inputs from trusted third-party institutions that provide various named state inputs into the contract.

For example, you could have an input that is Boolean, which says, "Website transferred from Seller to Buyer: Verified by Verisign: True/False", etc. Those conditions can be part of the verification process. AND even more excitingly, small micro payments can be made part of the contract, to the third-party verifiers, as part of the contract itself.

I am kind of sick of people who don't understand what the value of smart contracts is, messing up other people's perception of what it is. I award OP zero points, and may god have mercy on his soul.

<comment><USER8> > outsourcing of third-party verifiers

Since people using the network will be in control of constructing their own contracts, they will have an incentive to draft the contract in such a way as to make sure they'll have control over this "outside verifier"; it could even be same company which it chooses to be the "verifier".

> trusted third-party institutions

The defeats the previous attempt at decentralization, by re-centralizing the information the network needs to do it's job.

This is what the network hinges on to gain information about the outside world (and remember, companies will have an incentive to build the contract in such a way to control these trusted third-party institutions as mentioned above).

(I'm aware of schelling coin/contracts; I'm don't think it will work unless it's made a mandatory part of all contracts for all third-party verifiers. For applications that need data that is publicity verifiable, such as the weather or sports outcomes, it could work, but if the information is not is publicity verifiable, e.g. a transaction amongst private parties, I don't see it. And that's only if you force the use of Schelling coin/contracts, which is usually never the first thing Ethereum folks talk about when pitching this; I'm not sure if there are actually plans to implement that.)

<comment><USER7> Your counterparty will not agree to an arbitrator that is not neutral, so there is market for third-party verifiers who have a reputation for trustworthiness.

<comment><USER8> In some cases yes, but if your counterparty is Facebook (or commercial svc) you don't have any negotiating power. Either you accept their terms or don't use their Service

<comment><USER7> That problem is orthogonal to the discussion and not absent in real contracts either.

</comment></comment></comment></comment></comment><comment><USER9> Bitcoin transactions are scripts that execute sequentially and are very restrictive. Ethereum instead took bitcoin and replaced that scripting language with a turing-complete language.

Now, consider the conditional operator in the given example.

"If a transaction occurs.." is the condition. ONLY the conditional of transaction types can be verified by the program because it is inherent in the network. For every other conditional, for example, "if team A wins.." the program has to consult a third-party. These are known as 'oracles' in ethereum lingo.

Now since we are trusting a third-party, why can't we simply use bitcoin and even let the decision script be hosted on the third party?

For the program to be able to take decision on a real-life event, only the occurring of a transaction is the type of event it does not need a third-party for. And trusting is all the problem there is.

 __*

Bitcoin's script not being turing-complete is a feature because it specializes the use-case. Theoretically, if ethereum allows a turing-complete language to be executed, a code could be written to hack the system itself. Ethereum handles this by executing in a virtual environment.

Thus ethereum is essentially a abstraction on bitcoin and introduction of a new currency token (ether) is unnecessary.

 __*

The vision of ethereum is very desirable. Although Ethereum does not make it possible I want such a system to exist. My limited understanding is that for a system to exist, we need an algorithm to be able exchange private keys between two parties without trusting each other.

We need a homomorphic secret sharing but without a dealer. In a Blakley scheme, both parties chose their own planes; we need the intersection of planes, the line, to be our private key and for everyone to be able to know the public key for the same without the private key being known to anyone.

Does anyone know of such an algorithm, because solving this problem will also truly decentralise cryptocurrencies like email.

<comment><USER10> > Now since we are trusting a third-party, why can't we simply use bitcoin and > even let the decision script be hosted on the third party?

One reason which springs to mind immediately: the entity running the script always has complete control, whilst we may choose to grant limited control to third parties. For example, we might define a set of separate, potentially independent, verification conditions, and perform some action when 2/3 of those conditions are met. Manipulating such a contract would require collusion by many of those third-parties; and it would also make contracts more robust against technical problems.

<comment><USER9> The bits of a cryptocurrency transaction cannot be changed. Its like a signed cheque, can only be read. So since the flag from third party is being used to decide which transaction is relayed, it is as good as handing over the transactions to the third party to relay them. Majority consensus can still be done by using multiple third-parties.

</comment></comment></comment><comment><USER11> The example contract is very vague and seemingly pointless. The stated problem is 'if the buyer pays before 1st April, then they own the website'. Fair enough, but usually you'd just deal with this without any kind of contract in place. We don't need contracts for simple cases of 'buyer pays money, gets purchase.'

A contract would only be interesting in the example if it was structured as an option: The buyer has promised to pay for the item by 1st April, and in return, you have promised that you won't sell the item to someone else before then.

How would this be handled? How would be example contract react if you set 'WEBSITE_ADMIN' to someone else prior to the purchase? Does the example contract mean that WEBSITE_ADMIN cannot be altered by anyone else? What are the access controls to this storage slot WEBSITE_ADMIN? Does the seller lose write-access to it after the deal completes? Does the buyer gain read access? If not, what's to stop anyone changing this value and breaking the deal?

<comment><USER12> The data for WEBSITE_ADMIN is set _inside the Ethereum network_. I think the term 'website' is tripping people up here. It's actually better defined as 'site with data' which can be accessed via the Ethereum APIs. If you are interested in playing around with the API calls, there is a Docker image for it. I put together a hosted version of this as well, so you don't have install anything to play with it: [https://github.com/giantswarm/swarm- ethereum](https://github.com/giantswarm/swarm-ethereum)

<comment><USER11> Are you saying that Ethereum is a web hosting platform?

<comment><USER13> Ethereum is not a web hosting platform. It is not similar to Amazon's EC2 or anything like that. Conceptually, it is a single global computer that anyone can access. It's not the same kind of computer you're familiar with, though.

Programs on this computer can't be changed, and nothing can write to the program's storage except for the program itself. You don't have to trust a service provider to maintain their guarantees: it is impossible to break a guarantee.

These characteristics are useful for writing programs that coordinate interactions between humans. They're also useful for letting devices publish and access information about the world long after their manufacturers go out of business.

Entirely new kinds of software can be built to coordinate social and financial systems.

</comment></comment></comment></comment><comment><USER14> "You might even imagine a nation defined not by geography but by the rules and benefits of citizenship. Imagine that people of the future could opt-in to the virtual nation that suits them best." . I wonder if we will ever get there . But its eye opening just to think about it.

<comment><USER15> I am sure I have brought it up here before, but I will again. Here it goes.

My father is an intellectual property attorney. Among colorful clients was a very active entrepeneur/inventor.

One year he insisted the future was a digital nation. You see how people drool or get excited even with 1/4-of-the-way-there e-Estonia system? He was talking about this years ago, when I was finishing high school and starting college.

My father even drafted letters to the UN on his behalf pitching the notion of offciail recognition, and he was laughed off completely.

Mark my words, if govts still antagonize their people and an alternative of this form exists, a vocal minority will popularize the notion.

As an American, I cannot wait.

<comment><USER16> How would a distributed "digital nation" (which is, rather conveniently, very poorly defined) exercise force to enforce its "rules" on the physical world?

<comment><USER13> You'd probably have to limit the use of force to things almost everyone agrees on, like detaining people to prevent imminent harm. For other things, sanctions are probably effective enough. Given universal, stable, cryptographic identities, you as an individual would "enforce" your rules and desired contributions to public goods by consulting your chosen sanction list before trading with someone.

<comment><USER16> Ah the slippery slope of imminent harm.

I'm not sure I understand why I need a cryptographic identity to boycott certain vendors? I can already do that today.

<comment><USER13> You need cryptographic identities for automated boycotts. Boycotts aren't very effective today because they're hard to organize, and some vendors have relative monopolies. I think Ethereum enables both effective boycott coordination and monopoly elimination.

Also, these sanctions apply to both sellers and buyers. I think economic isolation will be an effective deterrent to undesirable behavior. It's basically prison, just without force.

Imminent harm may be a slippery slope, but it's really all up to the individuals who support the enforcers. If someone detains someone who shouldn't have been detained, stop funding their activities and sanction them. Fund a different enforcement organization instead.

<comment><USER16> I can see the boycott coordination angle (except, the offensive vendor can just change its identity).

By what mechanism does Ethereum enable monopoly elimination? (sorry, I don't know too much about Ethereum)

The problem with detainment, collective detainment, sanctions, etc. is that the local conditions when a detainment occurs may be far from the theoretical situation. What if everyone around you believes that you should be detained, but you actually shouldn't (according to the theoretical 'rule')? You just threaten to "stop funding" them and they let you go? What is to stop them from escalating the violence? Nothing.

<comment><USER13> _" I can see the boycott coordination angle (except, the offensive vendor can just change its identity)."_

If the vendor changes its identity but the public is still aware of the connection, the new identity goes on the sanction list. If the new identity can't be linked, then it has absolutely no reputation and has to start from scratch to convince people to buy from them. That is an effective deterrent.

 _" What if everyone around you believes that you should be detained, but you actually shouldn't (according to the theoretical 'rule')?_"

There are no "rules". What I'm describing is a society organized via voluntary actions, but by following prescribed rules. If everyone around you thinks you should be detained, you get detained. That's how society works.

Sanctions don't prevent bad behavior, they punish bad behavior as a deterrent. Separately, a police force exists only as long as people fund it, and as long as people approve of their uses of force.

I'm not saying this is all bulletproof, but I think it's going to be fun to explore as we build the foundations for these sorts of systems.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER17> This is one of the clearest and understandable-without-prior-knowledge descriptions of the project I've seen so far, can anyone familiar with the details weigh in on how accurate it is?

EDIT: not-so-happy sibling comment: [https://news.ycombinator.com/item?id=9987351](https://news.ycombinator.com/item?id=9987351)

</comment><comment><USER18> Presumably smart contracts would very often depend on input external to the system - for example, imagine a will that says if Person A dies, Person B inherits the millions of dollars worth of Ether at a particular address that Person A owns.

Somebody (or some other system) has to be in charge of the input to the Ethereum system to tell it that Person A has died. This seems like a huge single point of failure that doesn't exist with current contracts, if it gets hacked then the money gets transferred irreversibly and that's that.

Trying to build a smart contract with any kind of "real world" dependency like this seems equivalent to using a crypto system with an extra key that the government controls, there's a single point of failure that could compromise the whole system.

<comment><USER19> While I generally agree with your point, it seems to me like that specific scenario could be solved with a dead man's switch contract. Not ideal, but still better than other cases.

I got the impression that the answer you'd get from the Ethereum team is: at the _worst case_ , this is just as bad/good as the current system - i.e. real world effects have to be mediated by an executing authority, same as a real world contract. They would add (and I agree) that smart contracts still have advantages, even in this case.

<comment><USER18> You're right, the dead man's switch is interesting here. I wasn't thinking about the ability to reference a fairly precise point in the future via block number instead of an external input to the system.

Don't get me wrong, I'm pretty excited about smart contracts. It just seems like there are a lot of things that we don't think much about currently because our current system is generally pretty forgiving in its fuzziness, but that could have big consequences (and introduce new incentives to act badly) in the world of script-controlled, irreversible contracts.

</comment></comment></comment><comment><USER20> So it's a currency, a contract system, a new form of law, a distributed computing system... I think I need to lie down.

These explainers I keep reading are not helping.

Can anyone tell me whether this is some giant boondoggle circlejerk, or something that is really going to be used widely and perhaps lead to things changing?

<comment><USER21> Is this going to be widely used? No. It's early technology.

Will a successor of this idea change things? Yes.

</comment></comment><comment><USER22> Ether is law, but the example contract says nothing about websites, nor has any provisions to enforce the transfer of said site.

I think it's more appropriate to say that ethereum is naive

<comment><USER23> If we are being fair here neither does a traditional contract. The enforcement of a that contract falls to person (i.e Policeperson, Bailiff).

The benefit of etherscript in theory at least is that the wording of the contract is unambiguous, with the caveat that there may still be some areas where ambiguity is unavoidable. Which means that in the case of a website a digital bailiff _could_ enforce the transfer. This _is_ a clear benefit in some sense at least. How many times have you read about a court case and been bewildered about how someone could possibly be arguing over something that should be clear cut.

For contracts like a website domain transfer this sounds at least initially doable. What etherscript will have trouble handling is establishing what actually happened. It will undoubtedly be very good at specifying what the outcome of a sequence of events should be but as soon as it hits the real world the problem of establishing what that sequence of events was will still require some form of investigation and enforcement mechanism composed of people and thus there will still be an unavoidable amount of ambiguity there.

<comment><USER22> The debate in law is usually about what the words mean rather than what words appear in the contract. (Of course there are always issues where contracts have been lost, etc)

</comment></comment></comment><comment><USER24> I have not seen any clear explanation of how these networks of interacting contracts will be verified, so you know they will work the way you intend. Anyone with any knowledge of the formal verification of software written in Turing-complete languages knows that it is difficult, and it is something that not even many programmers know how to do. Until I see a plausible answer to this question, I have to regard the sort of future presented here as a flight of fantasy.

</comment><comment><USER25> In the samples there is an unbreakable marriage contract where divorce is only possible if both parties agree. Scary.

</comment><comment><USER26> This will never be unbreakable because no complex system is unbreakable.

The reason contracts are messy is because they're a system that has vulnerabilities. Lawyers are just hackers with different tools and training.

So moving to another system, equally complex or dynamic, will not solve anything in the long run.

A system that must support contracts between humans would be dynamic enough to allow for vulnerabilities that will eventually be discovered.

In fact I find it laughable that these guys are trying to replace a legal system with a computer system. When computer systems get hacked all the time.

<comment><USER27> Skilled programmers will be hired to write these contracts in a complex and verbose way such that the other party is unable to understand it and may not be able to afford to hire programmers to analyze it. They will then be taken advantage of.

So pretty much the same as the current legal and financial system.

<comment><USER28> Maybe. Nobody is going to sign a contract he can't understand if he get the same goods and services from somebody else with a contract he can understand.

<comment><USER27> People do exactly that all the time.

</comment></comment></comment></comment><comment><USER29> It's very cool that you know exactly what is going to happen. Or, at least, you could simulate exactly what should happen. And, if there was some repository of contracts, you could simulate the effects of the system. Such higher-order possibilities are so opaque most of the time.

But, I'm not sure ambiguity is a bad thing. Or, at least, there is a dose- specific effect. A lot of ambiguity is bad, but so is none. The flexible Goldilocks Zone is the least fragile -- _to society_ that is, not to law.

</comment><comment><USER30> I'd be a lot more interested to see statistics on adoption, and actual use cases by real people.

<comment><USER31> Stats: [https://stats.ethdev.com/](https://stats.ethdev.com/)

Transactions go live on Monday, if I remember correctly.

</comment></comment><comment><USER32> Smart contracts are one of the worst ideas ever conceived.

Nobody actually wants smart contracts, for excellent and obvious reasons. Nerds think they're a good idea because they'll sort out all the annoying grey areas in social human interaction.

Dr. Strangelove is literally about an unstoppable smart contract going wrong.

No business actually wants smart contracts - they always, always want the option of lawyering out of a bad deal. Or stopping it if the government gets pissed off and says it will penalise you to a crisp if you proceed with that smart-arse contract you just put on the blockchain.

No consumer wants smart contracts, for the same reason "no chargebacks" is a loser. You always want a human to be able to fix the problem.

The only use I can think of for smart contracts is for businesses to screw over customers who have no other option, c.f. mandatory arbitration clauses. Note how the standard example of a smart contract is a car that stops working if your payment fails. Or the Internet fails. Unstoppably. Immune to human intercession, circumstances, etc. (Such locked cars already exist, only bought by people who have no other choice.)

</comment><comment><USER33> This explanation subtly forgets to explain which agent is responsible for executing the contract-programs. Obviously you don't want the contract to be processed (and the money spent) two or more times at its deadline. Who is doing the processing and ensuring the execution only occurs once?

<comment><USER10> As far as I understand, it's a distributed consensus system. Scripts don't perform their effects in the "real world"; instead, they append values to a blockchain. External systems can inspect the most recent values in the blockchain and act accordingly. This is how bank accounts work, conceptually.

Many programming courses use bank accounts as examples of race conditions in concurrent systems, eg.

        User withdraws £10 from ATM           User receives £1000 salary           Balance
        </comment></comment><comment></comment><comment></comment><comment></comment><comment>---           </comment><comment></comment><comment></comment><comment></comment><comment>--           </comment><comment>-
        ATM looks up balance (£100)           Bank looks up balance (£100)         £100
        ATM subtracts £10 from value (£90)    Bank adds £1000 to value (£1100)     £100
        ATM dispenses £10 note                Bank sets balance to value (£1100)   £1100
        ATM sets balance to value (£90)                                            £90

This race condition has blown away the user's salary! However, this is a _terrible_ example, since it is nothing like the actual operation of a bank account!

An account is exactly that: an _account_ (log) of what has happened:

        Debits              Credits
        </comment><comment>              </comment><comment>-
        ATM withdraws £10   Salary adds £1000

The _balance_ is exactly that: the balance of (difference between) the credits and debits. The balance is _derived_ from the account as needed, taking new entries into account as they get added.

Blockchains are a way to keep such accounts, in a consistent way without giving any one entity control over updates.

For example, the article's Web site ownership system might keep an account with entries like this:

        User A transfers example.com to User B
        User B sets example.com IP to 220.127.116.11

When contracts are executed, they can inspect the latest values on the blockchain and append alterations. For example, if user B sets up a contract to transfer ownership of example.com to user C, one of the pre-conditions is that user B owns the domain. Hence after execution we get:

        User A transfers example.com to User B
        User B sets example.com IP to 18.104.22.168
        User B transfers example.com to User C

Anyone can execute the same contract on their local copy of the blockchain to get the same result, hence everyone can reach a consensus about what the new blockchain should contain. The contract also can't be run twice in a row, because the resulting blockchain says that User C owns the domain, and hence user B doesn't have permission to transfer it. The same thing happens to any currency which B and C might transfer in exchange for the domain.

To actually _use_ such a value, we can imagine a DNS-like system which resolves names by looking up the latest IP address from the blockchain; in the same way that an ATM displays our current balance by looking at the credits/debits in the account. All of this can also be cached, of course; provided we either trust the cache to provide the right value, or that we don't care enough about the value to verify it ourselves (eg. transactions between third parties which do not affect us).

</comment><comment><USER34> Looks like someone is trying to bring about the Diamond Age.

</comment><comment><USER35> Perhaps I'm wrong, but the simplest explanation of Ethereum appears to be that it's a way of specifying and sharing contracts.

I think the whole digital currency thing muddies the waters. People, myself included, hear the word currency and think of something we earn and spend, but then you hear about all the other uses of Ethereum and wonder what that has to do with money.

What I've just realised by reading this article is that contracts are what Ethereum is all about, the currency aspect is just one of the many use cases. Laws are another example of a contract. The base class is contracts, everything else is a subclass on top of that.

<comment><USER36> What's a contract? (Playing devil's advocate a little)

(edit: for the sake of pedantry, assume I did indeed mean contract)

<comment><USER35> Assuming you meant contract, I'd say it was a formal agreement between two or more parties. Will that do?

<comment><USER36> Not really, no.

I actually have a decent understanding of what's involved regarding Ethereum, but assume for a moment that I don't.

Statements like "a formal agreement between two or more parties" are of little use to someone starting from ground zero.

<comment><USER35> I can try to put it in plain English if you think it'll be confusing to a newcomer.

Before I try, let's explore how Ethereum is described by those who develop it. The home page seems as good a place as any.

[https://www.ethereum.org/](https://www.ethereum.org/)

Here's what the first paragraph on the homepage describes Ethereum as...

"Ethereum is a decentralized platform that runs smart contracts: applications that run exactly as programmed without any possibility of downtime, censorship, fraud or third party interference."

So even the Ethereum developers describe the core use as contracts. It doesn't strike me as a controversial idea.

How would you describe Ethereum?

</comment></comment></comment></comment></comment><comment><USER37> It comes down to prior restraint.

With most laws, there is the possibility of breaking them and maybe you have to face the consequences.

With this stuff, you won't be able to use the stuff for what it wasn't designed for. Stronger guarantees. It's like a car that slows down in a construction zone, and is unable to go any faster, instead of cops giving tickets. Like the 90 year old engineer guy behind the Venus project says in his interviews.

That can be useful. Not for everything, but for a whole lot. The current DRM stuff works like this.

</comment><comment><USER38> For a less instrumental account, my article with Bill Maurer might be of interest: [http://kingsreview.co.uk/magazine/blog/2015/06/23/ledgers- an...](http://kingsreview.co.uk/magazine/blog/2015/06/23/ledgers-and-law-in- the-blockchain/#top)

It interrogates the intersections between law and contracts as it pertains to the shift from Bitcoin to Ethereum.

</comment><comment><USER39> Such a system needs integration with subjective variable sources. For example let's say the website also needs to meet some basic code quality level. They could agree to give a third party exclusive access to set some "quality check" variable.

If that's implemented it can be a great way to codify all sorts of legal docs and laws since a lot of legal stuff requires human interpretation at the time of execution.

<comment><USER40> The event calculus could be used to specify the behavior of the agents instantiated by ethereum smart contracts. This formalized description of the smart contract (e.g. a legal system) could then be used to verify its actual behavior in the wild.

</comment></comment><comment><USER41> I wonder if it is possible to pass an actual law which would render digital 'contracts' illegal. So all lawyers become coders/analysts? I find the idea interesting, but in reality this is never going to go further than an academic or research project ...

</comment><comment><USER42> This seems like a neat idea and seems quite ambitious. I guess I'm jaded from all the other crypto-currency and I just can't get excited about this. I fear that this will be the only time I ever hear of Ethereum again, this moment when I read this article.

</comment><comment><USER43> I wonder how such things as "the tyranny of the majority" will be handled, because if you make a poll at a gang rape, 9 out of ten will vote to continue the rape.

</comment><comment><USER44> Who is behind this? I'm interested in talking to them.

<comment><USER31> [https://angel.co/ethereum-1](https://angel.co/ethereum-1)

</comment></comment><comment><USER45> Might work in some areas, but not the ones mentioned.

</comment><comment><USER46> The author falls into many traps of the law vs code debate. There is a big difference between wet and dry code, as Nick Szabo, the original inventor of 'smart contracts' put it.

Admittedly, it is very stimulating to entertain thoughts in the direction the author takes his description. But in the end it is not a fruitful approach to understand ethereum and other smart contract systems.

Law has an open texture. It is deliberately broad and ambiguous to allow specific real life events to be subsumed under the conditions of a given regulation. Legal provisions do not have to be formulated in a natural language. They can be expressed in pictures or even in (pseudo) programming code. What is important is who (or what) parses and interprets the code. Wet code, i.e. legal provisions, are interpreted by humans. Nothing else can (currently) understand the "actual meaning" of a legal provision. Dry code is the opposite in that it is not interpreted by humans but by machines. Smart contracts - the official (but historically inaccurate) name of those programms that are hosted and executed on the ethereum distributed virtual machine - <USER2> written in dry code.

Ethereum is a 'rich and trusted' execution environment for software. 'Rich' because the ethereum virtual machine has access to a whole bunch of data that carries deep meaning to specific individuals and human society in general (or rather might some day). Trusted because the code execution is performed in a way that is extremely reliable. Whatever the competing interests behind the outcome of a specific computation may be, influence over the network may only be gained through computational resources (and at a later point probably stake/ether) which - in the real world - means economic resources. The achilles heel of a network such as ethereum (and bitcoin) is that "the crypto- economy" needs to stay causally disconnected from the other economy, that uses blockchains as a tool to run trusted fiduciary code (currency, insurance, identity, reputation).

"Law vs Code" is a very interesting talk to be had but there is no room for a "doomsday argument". Both are separate but intertwined domains. A fruitful approach to understanding the relationship between code and law may be Luhmann's system theory.

[further reading] [https://en.wikipedia.org/wiki/Niklas_Luhmann](https://en.wikipedia.org/wiki/Niklas_Luhmann) [https://medium.com/@heckerhut/smart-contracts-platforms- and-...](https://medium.com/@heckerhut/smart-contracts-platforms-and- intermediaries-c3d30f5182a6)

</comment><comment><USER47> What is really interesting is when parties sue each other in court over Ethereum contracts. Courts will always be involved.

</comment><comment><USER48> Definitely interesting, but how does it help with this?

> even if you "win", you have the problem of collecting.

<comment><USER49> I think because the actual procedure is included in the script, so "collection" takes place automatically in the code when it's processed.

</comment></comment><comment><USER50> [http://intheoreum.org](http://intheoreum.org)

</comment><comment><USER51> It will be hard enough to get widespread social adoption of either blockchain currency or contracts written in programming languages without making them tied to each other.

A better choice for an initial compile target for EtherScript would simply be English.

<comment><USER52> English is ridiculously colonized by obfuscators already. Think about the Clinton I debates on what the meaning of 'is' is.

I think those same obfuscators will be happy to emigrate to any new linguistic country in which their skills can be put to use, but I think the Etherium folks are fantasizing that they can make contracts non-ambiguous. Good luck trying.

I think the problem comes in that the contracts must eventually have impact in human minds. However you slice it, there's still an interpretation step. Efforts to make those interpretations unambiguous will be opposed.

</comment></comment><comment><USER53> This convinced me to not waste another second on Ethereum. It serves a self- defeating purpose, and I think it's diametric to the hacker ethos. Bitcoin is neat because it can't be controlled, nobody can tax it or pose fees on it. It's free market at it's very best. The bitcoin protocol is weak, but luckily developers are strengthening it all the time.

Laws as a general concept are diametric to human nature, and they should be avoided whenever possible, especially in regards to social realms like bartering and contracting and the like.</comment>


Another Travel Ban: IRS Moves to Revoke Passports for Unpaid Taxes - <AUTHOR> http://www.forbes.com/sites/robertwood/2017/02/02/another-travel-ban-irs-moves-to-revoke-passports-for-unpaid-taxes/#ce2fdc17df64 <comment><USER2> so the president could be evicted from his own country</comment>


The Power of Saying "I Don't Know" - <AUTHOR> http://www.verticalresponse.com/education-support/articles-reports/the-power-of-saying-i-dont-know/ <comment><USER2> I've always found that it demonstrates security with one's intelligence to be able to admit ignorance. People that feel like they know a lot, but don't happen to know what you're talking about will freely admit to it. OTOH it's people that feel like they don't know enough and that think they _should_ know something that will pretend they do.

<comment><USER3> It demonstrates confidence in the person admitting to not know something. NOBODY is comfortable sitting there admitting to not knowing one thing after another after another. People are a lot more comfortable admitting ignorance when they don't expect to have to do it often.

</comment></comment><comment><USER4> Beware of the other extreme.

I've seen organizations where this is the only "safe" answer and nothing gets done. Sometimes people say "I don't know" when they actually know enough to make a decision.

<comment><USER5> Sometimes they know enough to make a decision, but you have meeting after meeting with people who know nothing because the person who knows something couldn't make the meeting.

I also hate nailing down a definitive plan with one person, and then a week later somebody else takes over for them and schedules a meeting to start from scratch. So you send them the plan, and they say, "This is the first time I've seen this. Let me postpone the meeting for a week so I can review it."

</comment></comment><comment><USER6> The Truth really doesn't hurt! well said. I am an intern at an organization where everyone is about two decades older than me, and there is a lot I don't know. They don't know what they can expect me to know, and I don't know what they know. I send piles of questions out to anyone who has some spare time and have not once been chastised in return.

<comment><USER7> I remember one place where one guy - who was _very_ experienced and a generally awesome developer had a rather unpleasant (i.e. plain rude) manner when asked worked questions even though he was generally quite pleasant about non-work topics.

He eventually admitted he did it on purpose so that people would explore _every_ other solution to a problem before giving up and asking him (inevitably he would almost instantly know the answer - he was that kind of guy).

</comment></comment><comment><USER8> It sometimes sounds better to phrase "I don't know" along the lines of, "Let me check on that and get back to you."

In Navy ROTC 'boot camp,' it was _verboten_ to respond "I don't know"; the only acceptable phrasing was "I'll find out, sir." (And the cadre followed up to make sure we _did_ find out.)

</comment><comment><USER9> This really depends. All you need is a manager that doesn't accept that as an answer and you start lying. I have one like that. If I say "I don't know" he just keeps asking me the question over and over. It's surreal for sure, but I learned to nod my head and agree so he can finally leave my office and stop eating an banana with his mouth open _.

_ while talking as well</comment>


Ask HN: What is the most upvoted story ever on HN? - <AUTHOR>

You can see the best <i>recent</i> story, but I'm curious about most upvotes of all time. <comment><USER2> Behold: [https://www.hnsearch.com/search#request/submissions&sortby=p...](https://www.hnsearch.com/search#request/submissions&sortby=points+desc&q=+&start=0)

<comment><AUTHOR> How did I know it would be the Steve Jobs article

<comment><USER3> I wonder how the Dennis Ritchie obituary article fared in comparison? I can guess, though :(

Edited to add: [https://news.ycombinator.com/item?id=3105526](https://news.ycombinator.com/item?id=3105526) ... 1924 points. Sad, but says a lot about the fanboys.</comment></comment></comment>


Vynchronize – A fun realtime video sync platform for friends - <AUTHOR> https://github.com/kyle8998/Vynchronize <comment><USER2> I set this up in the most hacky way 10 years ago with my girlfriend. We would watch dvds together and I wanted to synchronize them (especially important for comedies)

My setup? An app that would monitor DVD Player for events while listening to events over iChat using AppleScript.

If someone paused or played the DVD, the moitoring process would notice the event, make a JSON payload representing the action including the local timestamp, and use AppleScript to post an iChat message. Then, the process on the other side, would see the special iChat message (forwarded via AppleScript), and apply the action to the local DVD player process, taking into account the difference between the sent timestamp and the local timestamp.

It worked like a charm and made watching movies so much more fun. We always had iChat open anyway so it seemed like an easy win to piggy back on that, no server needed.

An inelegant hack, but it worked.

<comment><USER3> This is pretty clever, I like it!

</comment></comment><comment><USER4> My cousin and I used to do this manually all the time via IM when we were younger. We watched whole shows together that way. Also we used the IM for live commentary.

      3
      2
      1
      play!
      ...
      omg, he did not just do that!
      ...
      whaaaaat?!
      ...
      pause, brb
      back, where are you?
      23:51
      okay, ready.
      3
      2
      1
      play!
      ...
      omg, i can't believe that just happened. next ep?
      yea. hold on..
      ready
      3
      2
      1
      play!

Good times.

</comment><comment><USER5> If anyone is looking for this, but for offline videos (where every person has a local copy of the video), that exists and is called "syncplay". Very convenient when you want to watch and comment on movies with distant friends in real time.

</comment><comment><USER6> I've always wished Netflix had this built in. If it didn't support syncing between the same account it would even voluntarily cut down on account sharing.

<comment><USER7> Netflix actually had a feature on the original Xbox that allowed you to create a group with your friends and watch videos together. Unfortunately, they removed this feature a while ago.

<comment><USER8> On the Xbox 360 you mean? I recall it there, not on the original Xbox.

<comment><USER9> Yes it was on the 360. The original Xbox never got Netflix.

</comment></comment></comment></comment><comment><USER10> I've worked on this for a personal project (that never shipped), specially for music videos so the synchronization needed to be very precise. In the end, I implemented a basic NTP server via websockets to synchronize all clients on the same clock and then just send them the start timestamp of the YouTube video. I achieved sub 50ms sync 75% of the time, making it work for the last 25% was much harder than I expected.

</comment><comment><USER11> Sort of self-hosted version of what [https://rabb.it](https://rabb.it) does. I have used Rabbit a couple times successfully for watching movies with Internet friends.

<comment><USER12> Rabbit allows VNC-ing into a VM instead of just synchronizing the events though - I'd be interested to see a good platform for multi-user VNC though!

</comment></comment><comment><USER13> [https://github.com/hammadfauz/syncPlay](https://github.com/hammadfauz/syncPlay)

<comment><USER14> Does this work with netflix, for example?

<comment><USER15> Seems like this is for playing local files only. From what I can tell, both parties need the same file on their computer to play.

<comment><USER14> Ah, because it talks about HTML5 I figured it was used on different online sources through a browsers.

</comment></comment></comment></comment><comment><USER16> Yeah, same here built a tool for Youtube about 12 years back as an experiment using XMPP as the messaging layer for syncing and group chat.

We would buffer/pause video based on the video player state of the slowest connection, and still allow users to manually control playback.

Fun app, and a great example of the versatility of XMPP.

</comment><comment><USER17> cytube ([https://github.com/calzoneman/sync](https://github.com/calzoneman/sync)) is pretty close to this.</comment>


Feds Say That Banned Researcher Commandeered a Plane - <AUTHOR> http://www.wired.com/2015/05/feds-say-banned-researcher-commandeered-plane/

<comment><USER2> >used default IDs and passwords to gain access to the inflight entertainment system. Once on that network, he was able to gain access to other systems through the network.

This is pretty disgraceful. We put billions of dollars into stopping terrorism and keeping people from hijacking planes and it turns out they can't even secure the systems that control the plane. All they had to do was change the default passwords! Stories like this sound like something made up by the ministry of truth. Unbelievable.

</comment><comment><USER3> The avionics should be isolated through hardware, through wiring, from other systems on the plane. If this is not the case, then the FAA should issue an order to change the plane wiring to make this the case. Also, if the avionics system is not isolated, it should call into question the FAA's approval process for aircraft.

</comment><comment><USER4> It's one thing to demonstrate a PoC live on life/safety critical systems, it's another to brag about sources & methods on social media, leave your machine powered-on and blab contents to anyone and everyone whom can be called as a witness (whether hostile, material or voluntary).

0\. NEVER TALK TO THE COPS. [0]

1\. NEVER LEAVE ENCRYPTED MACHINES HOT (decryption keys or filesystem cache in memory). FireVault 2 optionally leaves keys in memory [1, 2]

2\. NEVER REUSE PASSWORDS OR PREVIOUSLY CONFISCATED GEAR (start fresh, beware of firmware and other hard-to-detect hw mods)

Presume mil/gov vuln shops have high cost USB, FireWire and Thunderbolt DMA memory cloning capabilities. If a machine has gone out of your possession, good luck finding which injection-molded part now contains a keylogger which will allow them to unlock your cloned disk images and RAM image after-the-fact (to get your password to get your fv key). (It's not tinfoil far-fetched if you go out of your way to get on one of the various govts department's radar.)

BTW, laptop was a MacBook Pro (Retina, 15-inch, Late 2013)

Valid Purchase Date A validated purchase date lets Apple quickly find your product and provide the help you need.

Telephone Technical Support: Expired You are eligible to purchase telephone technical support from an Apple Advisor. Contact Apple Support

Repairs and Service Coverage: Expired Our records indicate that your product is not covered under Apple's 1-year limited warranty or AppleCare Protection Plan for hardware repairs and service based on the estimated expiration date.

References:

0: [https://youtu.be/6wXkI4t7nuc](https://youtu.be/6wXkI4t7nuc)

1: destroyfvkeyonstandby [https://developer.apple.com/library/mac/documentation/Darwin...](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/pmset.1.html)

2: [https://security.stackexchange.com/questions/18720/how- secur...](https://security.stackexchange.com/questions/18720/how-secure-is- filevault-2-while-the-computer-is-in-sleep-mode)

</comment><comment><USER5> I would rather fly an airline that has bug bounties for critical systems.

</comment><comment><USER6> At least it was a researcher and not someone from ISIS.

<comment><USER7> Still an incredibly stupid thing to do. He increased power in one engine causing it to fly sideways which could easily trigger a pilot confusion/error to crash the plane.

Just what kind of an asshole would risk so many lives to make a point?

<comment><USER8> This is very stupid and dangerous if real, but it smell like a misunderstanding.

He probably told the FBI (and Wired) about modifying the trust in the simulation and about some peeping into an actual plane system, and the information probably got mixed.

Perhaps the FBI exaggerated to male him look more dangerous, perhaps he was confusing to gain some street credit, or perhaps it's true. Until the airline release an official plane log dump, I won't be sure.

<comment><USER6> I know from experience that prosecutors feel quite free to tell blatant lies. If you don't believe me, go watch a criminal arraignment sometime.

Defense attorneys do to.

For the most part judges are clued into this. It's not testimony unless it's under oath - and even then, sometimes witnesses commit perjury.

<comment><USER9> Why don't judges call lying lawyers in contempt of court?</comment></comment></comment></comment></comment>


Google details its vision for the IoT - <AUTHOR> http://www.networkworld.com/article/3021820/internet-of-things/google-ubiquity-summit-iot.html <comment><AUTHOR> Sensors, low power low frequency low cost networks and IoT operating systems are table stakes to play in IoT. Google's offerings at this level is compelling but more so is the long term investments in machine learning, geolocation and cloud services that developers can apply to building a really large and intelligent IoT.</comment>


Show HN: What's your Twitter conversation score? - <AUTHOR> http://twitversation.mooreds.com/

<comment><USER2> It got me right, anyway. I would think it would be useful for filtering out broadcasters, since I am post interested in players. Klout shows me a score (thanks to some add-on I apparently agreed to). Something like that? The option to filter out broadcasters would rock.

<comment><AUTHOR> Thanks. Are you saying you'd like to be able to load up a list of names? Not sure where the filtering fits in.

</comment></comment><comment><AUTHOR> Looking for feedback. Is this useful? Interesting? Hard to understand?</comment>


Django 1.2 released - <AUTHOR> http://www.djangoproject.com/weblog/2010/may/17/12/

<comment><USER2> Django advent is a very good series of articles about 1.2 <http://djangoadvent.com/>

<comment><USER3> My favorite quote on that is:

> _"One of Django's core design philosophies is that template languages > shouldn't try to be programming languages. To that end, we've kept the > template language deliberately simplisitic so that you'd be more or less > forced to push advanced logic up into the view."_

Very view people seem to understand this at first unfortunately and try to do crazy things like swap out the template language for something else or add on a bunch of hacks. Why create additional custom template logic and the parsing instructions for converting it to python when you can just write the functionality in probably one line of standard python in your view fuction and have it run faster.

<comment><USER4> I disagree with this philosophy entirely and think it leads to a poor separation of concerns. There is plenty of template specific logic that has no business being in the view, and being forced to put it into your view because your template system is crippled ends up mixing concerns and causing more maintenance headaches than it needs to.

As a very simplistic (and somewhat contrived) example:

      % for label in ('Home','Features','Pricing','Contact'):

{{ label }}

      % endfor

I'd much rather write that than repeat myself 5x, especially if what I'm doing is more complicated than a simple list tag.

In my mind, the view should be responsible for dealing with application logic and business logic. E.g. stuff like pulling things out of the database, dealing with GET/POST request data, validating forms, verifying user authentication and permissions, and whatever application specific logic is necessary.

The views should pass their data to the template, but not assume anything about how the template is being rendered, and not be doing things _for_ the template. E.g. if you're doing something that renders a HTML snippet to pass into the template, you've done something wrong.

Once you start going down that road you make it much more difficult to render alternate versions of your templates (for mobile users for example).

Another case where the crippled templating system ends up pushing concerns into the wrong layer is rendering hierarchical data: e.g. a nested comments tree. Deciding how to render that data should be entirely within the scope of the template. But because of the lack of simple recursion support, the 'recommended practice' is to unravel the tree in your view code, and pass the unraveled version into the template. Or write your own template tag, but that is even more complicated.

It's also a bit silly that Django calls controllers 'views' and calls views 'templates', but perhaps it explains why they think it's okay to do view specific rendering at the controller level.

<comment><USER5> Absolutely agree. Writing template tags in Django involves a lot of boilerplate. Compare for example Mako or Jinja2 where you can easily write a macro to handle something like nested comments.

<comment><USER6> The included simple_tag and filter decorators should be used for simple tags and filters. More sophisticated tags can specify a separate renderer class, which must be what you mean by "boilerplate."

      from django.core.urlresolvers import reverse
      from django.template import Library

      register = Library()

      @register.simple_tag
      def menu_item(req, viewname, label):
        url = reverse(viewname)
        cls = ''
        if url == req.path:
          cls += 'active'
        return '
%s
' % (cls, url, label)

Using the tag:

      {% menu_item request 'accounts.views.profile' 'Your Account' %}

The only part of that I don't like is passing the request, but I'm willing to bet there's a simpler way to access the request object from the function.

A simple filter:

      @register.filter
      def subtract(x, y):
        """Subtracts the arg from the value"""
        return int(x) - int(y)

And maybe in a for loop for overlapping elements:

Yes, I use two spaces in my Python code too.

<comment><USER5> The above solution is just plain ugly, HTML in Python.

Another PITA, where Django templates just fall down, is forms. Suppose you have a form:

       class MyForm(forms.Form):
            name = forms.CharField()

You then add that in the template:

        {{ form.name }}

All well and good; but what if you want to change the size, maxlength, or add a class ? These things clearly belong in the template, but no, you have to either add them in the form declaration:

        name = forms.CharField(widget=forms.TextInput(attrs={'class' : 'foo'}))

or in the view:

         form.fields['name'].widget.attrs = {'class' : 'foo'}

Both of which clearly break the separation of concerns. yes, you could write a template tag to get around this; but it's not in standard Django.

Contrast the following in Jinja2 (using WTForms, but you get the idea):

         {{ form.name(class_="foo") }}

<comment><USER3> > _All well and good; but what if you want to change the size, maxlength, or > add a class ?_

Adding a class: Django gives every element of the form id values for easy styling in CSS. Just do {{form.as_p}} and see what it outputs.

size and max length: I'm fine with these in python as they correspond to the max-length that would be validated into a data member. If you mean pixel size on screen, this belongs neither in HTML or your template but in CSS, since browsers render forms completely differently regardless of their HTML attributes, you have to style their width\height in CSS to get anything consistent.

<comment><USER6> Unfortunately, the defaults stink. 1.2 remedies this for error messages at least.

as_p and co. should include some class describing the field type in the outer
 tag so that a developer can style the label and error messages in a way specific to the field type.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> Great to see further integrated support for geoDjango: <http://docs.djangoproject.com/en/dev/releases/1.2/#geodjango>

</comment><comment><USER8> Release notes can be found here

<http://docs.djangoproject.com/en/dev/releases/1.2/>

<comment><USER9> I strongly encourage people to read the release notes before upgrading, there are backwards incompatible changes from 1.1

</comment></comment><comment><USER10> Yay! No more {% ifnotequal %}{% endifnotequal %}

</comment><comment><USER11> How bout adding composite primary key support....ARRRGHHH!!!

<comment><USER12> What major benefit (aside from legacy support) would this achieve that would be worth the effort?

<comment><USER13> ... Situations where use of a composite key is the correct design decision, maybe? Like the very common case of join tables, for example. Surrogate keys in these situations are wasteful and unnecessary.

I find it seriously irritating when silly limitations like this in a framework corner you into bad data design.

<comment><USER14> So... next time a feature-proposal window rolls around, go sign yourself up to work on composite-key support. That's pretty much how things get done :)

</comment></comment></comment></comment><comment><USER15>
      "Object-level permissions"

      get_all_permissions(obj=None)

      New in Django 1.2

      If obj is passed in, only returns the permissions for this specific object.

I wander if this has, or rather can have, very positive impact on the admin site app? (Neatly applying row-level permissions that is.)

<comment><USER8> It just puts the plumbing in place to allow row level perms to built later on

</comment></comment><comment><USER2> Is this new? <http://skitch.com/igorgue/dd7ym>

It might be related to this? [http://docs.djangoproject.com/en/dev/releases/1.2/#customiza...](http://docs.djangoproject.com/en/dev/releases/1.2/#customizable- syntax-highlighting)

<comment><USER16> Yes to both!

</comment></comment><comment><USER17> Thank you and congratulations to the team!

</comment><comment><USER11> Great work guys. I do love django and everything it's doing. We can't let these ruby guys nab all the credit

<comment><USER18> whoa, easy there

</comment></comment><comment><USER19> When will settings.py be replaced by a YAML file?

just kidding

/me ducks

<comment><USER20> I worked somewhere a while ago that requested YAML configuration files, since that was how the sysadmin team administered other existing pieces of software. Since settings.py is executable Python code, adding support for reading settings from /conf/django-app.yaml took just a few lines of Python in the settings file itself.

</comment></comment><comment><USER21> Anyone running 1.2 on Google App Engine? Smooth sail?</comment>


Ask HN: What do you do with big ideas? - <AUTHOR>

What do you do when you come up with an idea that would take too much time/resources to implement with what you currently have available?
Do you wait until you have enough resources? Pitch it to a VC? Build a tiny portion of the idea?
And how would you evaluate how good it is if you don't have to resources to test it out? <comment><USER2> "Build a tiny portion of the idea"

Yes, this is the solution, the more you go with it the more you expand it. When it reach a certain level, it would be more interesting to VC and investors.

<comment><USER3> If no small portion of it is a good idea by itself, then I don't think it really is a good idea.

<comment><USER4> Not a good idea, or not a _feasible_ idea? I can think of dozens of good ideas that cannot be reduced to some kind of minimal, doable project.

<comment><USER3> Well it all gets down to definitions and its more of a rule of thumb. However, I'm very suspicious of ideas that seem to be good only because the complexity gives them a certain gravitas. Its sort of a version or expansion (or misappropriation) of Gall's law:

"A complex system that works is invariably found to have evolved from a simple system that worked. The inverse proposition also appears to be true: A complex system designed from scratch never works and cannot be made to work. You have to start over, beginning with a working simple system."

<comment><USER5> Please list a dozen. I like the challenge of attempting to break problems down into small parts. THx.

<comment><USER6> What less than a search engine can you build if you've got pagerank? in fact you can't even know if pagerank works unless you have a search engine.

<comment><USER7> Sure, but you don't need to index the entire internet to build PageRank; only a subset of pages that form a graph. And, it's pretty easy to break the notion of building a search engine into smaller, discrete steps-- hell, I'd imagine that it could be done by two Stanford grad students.

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> There are always much more big ideas than I have a time, so I am always try to forget them early to prevent myself from distraction.

Really great ideas will come back and if they show up few times then it is time to take a closer look to them.

</comment><comment><USER9> Build an MVP and try it out.

\- <http://news.ycombinator.com/item?id=748057>

\- <http://venturehacks.com/articles/minimum-viable-product>

Also, talk about your idea to as many people that you trust as possible, getting feedback is really important, especially in the early stages of a project. Don't keep it secret as that won't serve you well for developing and executing your idea.

</comment><comment><USER10> For a man whose user name has always been "bigthingist", I discovered that small things pay much much better.

Take your big idea and turn it into a very small one. Then do _that_ one.

</comment><comment><USER11> Write the idea down somewhere. However, ideas are a dime a dozen and are essentially useless unless you have a viable plan of attack. For instance, I would love to work on something world-changing like time-travel, teleportation, or anti-gravity, but there are currently no fruitful ways of even approaching those problems.

I had an advisor tell me that I should always be keeping several "big" problems on the backburners at all times, so that whenever I find out about a new technique or technology, I will be able to immediately think of ways to apply the new tools to the big problems. He said it will fail 99 percent of the time, but on the 1 percent of the time that it does work, everything will somehow fit together and with any luck, you will have found a viable approach.

</comment><comment><USER12> Write it down in my ideas book and think about it long enough that I either _can_ implement it (MVP, get the resources, etc) or it mutates into something better within my reach. Sitting on it also means when I see an opportunity that might fit it (e.g. funding available for $foo) it's there ready to go.

Of course, this doesn't always work, some ideas are too timely and then you have a different decision process; but sitting on an idea from a year ago and spotting a funding source specific to it this year is how I'm doing what I'm currently doing.

</comment><comment><USER13> I have a few good ideas, and one that's really good.

One of the good ideas can be implemented while still keeping my job, because it requires relatively small amount of resources/time to get started. It's far from original and won't make me rich, but it will give me valuable experience. My plan is to try it and see what happens.

The _really_ good idea can become a huge success, but also fail completely because it depends on many things that are out of my control. I'm saving that untill later.

</comment><comment><USER14> Good advice from the irrepressible Dijkstra on this matter: "Before embarking on an ambitious project, try to kill it." (<http://www.cs.utexas.edu/users/EWD/ewd10xx/EWD1055A.PDF>)

If you try honestly and still fail to kill it completely, whatever's left that you can't kill because it seems doable right now is one way to go.

</comment><comment><USER15> I have spent a lot of my time contemplating "big ideas" both when I was a PhD candidate (various set theory proofs, signal processing ideas) and in my own software (machine learning methods and application to gambling etc) and I find that mostly thinking about this stuff is just mental masturbation. I typically found some flaw later on and I would have been much better off with more manageable problems that gave more direct, smaller, higher probability of success profits. Basically, I think if you don't have the resources to implement it, it's not a good idea for you. Of course, if you have some amazing insight into a hard problem (how many $$$$$ problems are out there that haven't had serious attention from seriously smart people?) then you can build a prototype and seek funding but I would be very very cautious.

</comment><comment><USER16> Years ago a good hacker friend of mine and I thought we would start writing down all the good ideas we had. We only wrote down the really good ones. After half a year we had more than 50 ideas that were all patentable, gamechanging or could make lots and lots of money. Some of them have later been implemented successfully by startups vouching for the fact they were indeed pretty good ideas. At least some of them :-)

We stopped because it became obvious to us that a binder (yes this was before computers were in wide use) full of great ideas is worth exactly nothing.

So what do I do when I come up with a great idea? I forget it as quickly as possible so I can concentrate on executing what I'm doing now.

</comment><comment><USER17> Find engineers that you think would know how to approach the unknowns of your idea. Ask them about components of the parts that you don't understand.

If you don't have time to build it: find someone who might want to use it and tell them about it.

</comment><comment><USER18> There was a series of pictures here a while ago about some guy that built a castle by his own hands. It doesn't really matter what you have available to you today, what matters is if you can keep your goal in sight over an extended period and persevere until you've realized your vision.

It's amazing what you can do once you _really_ focus on something.

<comment><USER19> <http://news.ycombinator.com/item?id=702048>

</comment></comment><comment><USER20> I sleep over them</comment>


Why is Chrome so much less graphically performant than Safari? - <AUTHOR>

Hey HN,
Front End Developer here, long time reader. I'm trying to identify why Chrome seems to struggle when it comes to animation performance while Safari is able to render everything without a hitch. Is this because Safari has hooks into the OS that Chrome does not? Is this because Google adopted blink in lieu of webkit? And most importantly is there a remedy out there?
Take the following site for example: http://scrollrevealjs.org/
In Chrome my scrolling gets choppy, however everything remains beautifully buttery in Safari. As a developer what can I do to improve the performance of my sites that rely heavily on animation?
Thanks! <comment><USER2> It's a known issue, been around since retina MBP was introduced; see:

[https://code.google.com/p/chromium/issues/detail?id=136555](https://code.google.com/p/chromium/issues/detail?id=136555)

For me, I have no problems with Chrome when running an rMBP with a external display, but once I switch to the built in retina display, performance suffers significantly.

I switched to Safari a few months ago despite preferring Chrome because I couldn't stand Chrome's poor retina performance.

</comment><comment><USER3> Try looking at this.

[http://jankfree.org/](http://jankfree.org/)

Chrome has some good tools and even has chrome://tracing to show you low level stuff inside Chrome.

<comment><AUTHOR> Thank you Sarkie!

</comment></comment><comment><USER4> Your example looks fine in chrome for me.</comment>


Skype, Founders Settlement in the Works - <AUTHOR> http://gigaom.com/2009/11/01/skype-vs-founders-settlement/

<comment><USER2> Does anybody else think this is really, really funny? The Skype founders sold their company for billions of dollars and _didn't sell the technology_. It's kinda cool that it's two guys dicking with a massive corporation instead of the other way around.

</comment><comment><USER3> They are crazy to try to buy it back now, unless it's just a ploy to milk more money out of the original sale.

There are a bunch of lower cost DIY voip services and Google Voice could crush them in a year.</comment>


People keep finding hidden cameras in their Airbnbs - <AUTHOR> https://nypost.com/2017/12/04/people-keep-finding-hidden-cameras-in-their-airbnbs/ <comment><USER2> This headline is overstating it. Yes, there have been two cases in the past few months, but this is two cases out of tens (hundreds?) of thousands of booked rooms.

That said I'll probably check for this next time I stay in an AirBnb.

<comment><USER3> Not only that but hidden cameras have been a thing in cheap hotels 'round a few countries for some time (perh since the infamous "X10"). So it's not all that new a phenomenon and definitely not relegated to AB&B --though they get the most press about it, of late.</comment></comment>


The XKCD book page numbering explained (or skew binary explained) - <AUTHOR> http://www.barklund.org/blog/2009/11/24/xkcd-book-page-numbering-explained/

<comment><USER2> The first paragraph should have listed some of the page numbers as I don't have the book so I didn't know what he was talking about.

<comment><USER3> The first 10 numbers in skew binary are 0, 1, 2, 10, 11, 12, 20, 100, 101, and 102.

<comment><USER4> The basic pattern is that it's like trinary, but once you get to something ending in some 1s and finally a 2, the two starts to migrate upward, leaving 0s behind it (as in 10112, 10120, 10200, 11000) until the 2 disappears and you keep on going normally. The effect is that instead of digits flipping over all at once, as in 999998, 999999, 1000000, it happens one at a time. Very interesting number system.

<comment><USER3> Indeed. And related to efficient data structures.

</comment></comment></comment></comment><comment><USER3> Okasaki has a lot about skew binary numbers (and other strange systems) in his "Purely Functionaly Data Structures". Linked lists are basically equivalent to unary. Fibonacci number systems are also useful. You can also use `redundant ternary' and much more.

Even partial differentiation of (algebraic) data structures is a useful operation. It corresponds to looking at data structures with `holes' in them. The functional people call them zippers.

</comment><comment><USER5> That article was interesting but the contrast between the paragraphs and the code blocks made my eyes strain way too much. Am I the only one?

<comment><USER6> Readability FTW, again.

<http://lab.arc90.com/experiments/readability/></comment></comment>


Lithium sulfur batteries: hope for 4x li-ion - <AUTHOR> http://slashdot.org/comments.pl?sid=1240763&cid=28043161

<comment><AUTHOR> The paper mentioned may be the last (May 2009) reference recently added here: <http://en.wikipedia.org/wiki/Lithium_sulfur_battery></comment>


Ask HN: Why does Wikipedia still render equations poorly on retina displays? - <AUTHOR>

A question that the HN crowd may know the answer to.  Every time I visit Wikipedia to read a technical article, the LaTeX markup annoys me immensely as it doesn't display correctly for retina (or HiDPI) displays.  The font is pixelated and is rendered for low-res screens.<p>High resolution displays have been around for quite a while now; is there some reason that Wikipedia persists in using low quality graphics? <comment><USER2> Because, as far as I can tell, they are images and not an actual font. Bitmaps are pixel-doubled on Retina, which makes them blocky.

Example: [http://en.wikipedia.org/wiki/Equation](http://en.wikipedia.org/wiki/Equation)

<comment><AUTHOR> Oh, I know that. I was just wondering why the images aren't rendered for HiDPI screens. Other popular websites do this just fine.

<comment><USER2> Because no volunteers have done it yet.

</comment></comment></comment><comment><USER3> The real question is why do retina displays render Wikipedia equations poorly.</comment>


The Most Educated Countries in the World (Canada, Japan, Israel; US 6th) - <AUTHOR> https://www.cnbc.com/2018/02/07/the-10-most-educated-countries-in-the-world.html <comment><USER2> So, the statistic is counting people who were educated elsewhere and then moved to the US afterward. Essentially letting the US take credit for other countries' educational programs.

I think if we just counted the average education level of people who grew up in the US it would be much lower.

The US attracts educated people from all over the world, but it does not do much to educate the majority of its own people.

</comment><comment><USER3> As a Canadian I think we are at a point where there's diminishing returns to education now.

</comment><comment><USER4> Doesn't Canada only allow skilled immigrants to enter the country? I suspect that is a significant factor.

<comment><USER5> Canada's immigration system works with points and education is worth a lot.

While statcan doesn't provide information on tuition, the immigration data shows that 66 000 or the 104 000 male immigrants were in the "economic" category in 2015.

[http://www.cic.gc.ca/opendata- donneesouvertes/data/IRCC_FFPR...](http://www.cic.gc.ca/opendata- donneesouvertes/data/IRCC_FFPR_10_E.xls)</comment></comment>


Over 50% of Firefox users are cheap pricks - <AUTHOR> http://www.inquisitr.com/29442/over-50-of-firefox-users-are-cheap-pricks/ <comment><USER2> That's a pretty stupid conclusion to draw from that data.

<comment><USER3> Yeah, I would say the test is silly.

(And I would pay for an add-on if I see that I use it and enjoy it.)

</comment></comment><comment> onreact-com That's kind of sad. I'd pay $12+ or more depending on how useful it would be for a FF extension. Especially in case you'd get some support and regular upgrades.

12$ is not much for you but for the programmer it can make a stable income once the add on gets popular.</comment>


Show HN: A city-wide Scavenger Hunt – Beta Test in your location today - <AUTHOR> http://playcopycat.com/

<comment><USER2> It looks like this isn't available yet, so it shouldn't be a Show HN yet: [https://news.ycombinator.com/showhn.html](https://news.ycombinator.com/showhn.html).

Also, please don't delete and repost the same submission: [https://news.ycombinator.com/newsfaq.html](https://news.ycombinator.com/newsfaq.html).

<comment><AUTHOR> Hi,I'm very new to this site... had to play around with "showhn" to figure out how to correctly post under the right category; hence the deleting and reposting of the thread. This app is available for beta testing. I apologize if this is not the appropriate place to post. Read a few suggestions from blogs that this site may help in gaining beta users.

<comment><USER2> Welcome to Hacker News!

"Show HN" is a special category for sharing your work when there's something people can play with. If you don't have a publicly available release for users to try out yet, don't worry. Just make a regular post (i.e. don't put "Show HN" in the title) and then come back and do the Show HN when you're ready.

The Show HN guidelines are here: [https://news.ycombinator.com/showhn.html](https://news.ycombinator.com/showhn.html). And you're welcome to email us any questions: firstname.lastname@example.com.

The page you posted made it look like the app wasn't ready for people to try yet. If it actually is, go ahead and make another Show HN post (you may need to use a slightly different URL). I'd recommend that you make it more obvious from the web page how people can get the software to try it, or users may end up flagging it again. Good luck!</comment></comment></comment>


Alacritty: A cross-platform, GPU-accelerated terminal emulator - <AUTHOR> https://github.com/jwilm/alacritty <comment><USER2> So I tried Alacritty the last time it was posted, and found that it was notably laggy compared even to vte-based terminal emulators, let alone urxvt. Maybe my use case is atypical (nouveau drivers, 4k monitor), but I was underwhelmed given that Alacritty claims to be "the fastest terminal emulator in existence." It's definitely not there yet, or at least it wasn't a couple of weeks back.

<comment><USER3> Strange, I find it incredibly quick, and quite frankly looks better than pretty much every other emulator out there.

Two issues (256color in vim, scrollback) I currently have are show stoppers but I'm sure some people won't mind.

[https://github.com/jwilm/alacritty/issues/26](https://github.com/jwilm/alacritty/issues/26)

[https://github.com/jwilm/alacritty/issues/124](https://github.com/jwilm/alacritty/issues/124)

</comment></comment><comment><USER4> Since it was posted about a month ago there has been on the order of 100+ commits from a variety of people. I'm hoping @jwilm pops in to respond:

\- Since it started getting community activity, where do you feel the direction of this is going now?

\- Where has the interest for this been amongst the contributors?

\- What's the short term roadmap looking like?

</comment><comment><USER5> this has been posted in HN numerous times already alongside zeit's Hyper ([https://hyper.is/](https://hyper.is/))

</comment><comment><USER6> previouly: [https://news.ycombinator.com/item?id=13338592](https://news.ycombinator.com/item?id=13338592)</comment>


Instant X86 SSD Cloud Servers - <AUTHOR> http://instantcloud.io/server <comment><USER2> I guess that's just a demo for [https://www.scaleway.com/](https://www.scaleway.com/) ? But the network speed is much higher? Also ominously the Scaleway pricing thingies all say "preview". Preview of what?

I don't get the point of this.

</comment><comment><USER3> This pricing does not seem sustainable.

€12 a month for 4 dedicated cores, and 8GB RAM? How is that even possible?

Is this some novel meaning for the word "dedicated"?

</comment><comment><USER4> You can spin up as many as you want if you delete the cookies. They still only last 20 minutes but there is a lot you can do in 20 minutes.</comment>


Show HN: Pluri(Alpha) – An Experimental Language Made on Top of JavaScript - <AUTHOR> https://github.com/rafaelcalpena/pluri <comment><USER2> Could be dead on arrival without built in parallelism primitives.

<comment><AUTHOR> Pluri can also have asynchronous execution as well, it's just synchronous by default. I will soon add a repository of essential/useful modules that every program make use of. One of them is the "async" module, which allows concurrent operations.

[UPDATE]: Repository has been added: [https://github.com/rafaelcalpena/pluri- useful-modules](https://github.com/rafaelcalpena/pluri-useful-modules)</comment></comment>


Ask HN: How's This Landing Page? Feedback Please - <AUTHOR>

	Hey Guys!
SoWink is proud to announce the official launch of our landing page as of yesterday evening, 3/9/11. Please take a moment and kindly review our site, feel free to offer any sort of feedback, good or bad, and help us improve our design/conversion. Thank you!
SoWink, Inc. Brings the Next Generation of Social Online Dating!
Check us out at http://www.sowink.com and discover for yourself how we'll revolutionize your dating world. <comment><USER2> I'd say it's a very pleasant visual (disclaimer: I'm not much of a design- beauty guy), but here's one heads-up:

Cmd(cntl)+(+key) cannot be used to enlarge text for the visually impaired (or just those with high pixel density screens) - not without breaking the bounds of they graphics they're placed over.

EDIT:

Second thought... Why just say, "experience our comprehensive privacy measures instated for your peace of mind"? How about a _link_ to a page _describing_ those measures? I suggest this because I'm the wary type: I don't spend time 'experiencing' without major reassurance in advance. That's also why I don't provide an email address 'for notification' unless the landing page (or at least additional pages linked thereon) powerfully sells me on "wow, this promises to be really cool (or really solve a problem that's been bugging my life)" )

Hope that some help.

</comment><comment><USER3> 3 Things

1\. I asked why is it revolutionary? 2\. It needs pictures. 3\. More emotional copy. How does it solve the person's problem (which is obviously finding that person a partner) but are you targeting a specific niche within that niche? Some people want love, others want fun, others want things that can't be described in public :)

So how is this different from every other dating site. (and they are a LOT of them)

</comment><comment><AUTHOR> Thanks for the feedback guys.

@apedley - Demo video on the way, being that we're still in stealth mode, cannot release too much details. But I assure you that it'll be completely different from any existing dating services.

@media - That's a good tip, I'll do that. Although it'll have to be when we get closer to launching Beta.

</comment><comment><AUTHOR> <http://www.sowink.com> Clickable Link</comment>


NPR Site Hacked by Syrian Electronic Army - <AUTHOR> http://imgur.com/cqMA69v

<comment><AUTHOR> It appears to be back to normal. WNYC was also hit, and they also appear to have regained control.</comment>


Apple Stock Has Inflated Another Dangerous 'Dotcom' Bubble in the Nasdaq - <AUTHOR> https://www.ccn.com/apple-stock-inflated-another-dotcom-bubble-in-the-nasdaq/ <comment><USER2> But Apple is actually making money.</comment>


Dasher: information-efficient text entry - <AUTHOR> http://video.google.com/videoplay?docid=5078334075080674416# <comment><USER2> One and two years previously ...

<http://news.ycombinator.com/item?id=16521>

<http://news.ycombinator.com/item?id=132630>

Still relevant, still brilliant.</comment>