人工智能在绘画方面傻瓜相机_傻瓜智能合约

人工智能在绘画方面傻瓜相机

by Nik Custodio

由Nik Custodio

傻瓜智能合约 (Smart Contracts for Dummies)

如果您仍然不了解智能合约,那么…… (If you still don’t get what the heck a Smart Contract is…)

Ok, you know a bit about Bitcoin (see: Explain Bitcoin Like I’m Five). You’ve been seeing the blockchain on the news.

好的,您对比特币有所了解(请参阅: 像我五岁一样解释比特币 )。 您一直在新闻中看到区块链。

But what’s this new Ethereum thing? Apparently it’s this crypto-currency you can use to build “smart contracts”. Sounds impressive. So, uh… what are they again? (Spoiler: They’re not that smart. And they’re not really contracts!)

但是这个新的以太坊是什么 事情? 显然,您可以使用这种加密货币来建立“智能合约”。 听起来令人印象深刻。 所以,呃……又是什么? (剧透:他们并不那么聪明。他们并不是真正的契约!)

Instead of a one line definition, let’s try to get an intuition. First, we’ll revisit the blockchain and the word “trust”. Then, we’ll talk about the word “contract”. Understanding both words is the secret.

让我们尝试获得直觉,而不是一行定义。 首先,我们将重新讨论区块链和“信任”一词。 然后,我们将讨论“合同”一词。 理解两个词是秘密。

第一部分:“信任(少)”的含义 (Part I: What we mean by “Trust(less)”)

Most of the time, when we think Bitcoin (or Ethereum), we have a mental image of, well…coins.

在大多数时候,当我们认为比特币(或以太坊)时,我们会对硬币产生心理印象。

Aren’t these crypto-currencies after all? Isn’t that the whole point? In our minds we see objects — digital gold, or silver (or tulips for the skeptics).

毕竟不是这些加密货币吗? 这不是全部吗? 在我们的脑海中,我们看到的是物体-数字黄金或白银(或怀疑者的郁金香)。

Because these images are easy to understand, we forget a bit about that thing that’s underneath it all. So, I say we start thinking about this in a different way.

由于这些图片很容易理解,我们忘记了一些有关这个东西的下面这一切。 所以,我说我们开始以不同的方式考虑这一点。

数码石 (Digital Stone)

Ugh, really? Digital rocks? Actually, rocks are pretty useful.

gh,真的吗? 数字摇滚? 实际上,岩石非常有用。

We have this idiom in the english language that goes something like this: “set it in stone.”

我们在英语中有一个成语,它是这样的:“把它放在石头上 。”

“I’ve reviewed the contract Bob. Looks good. Let’s set this in stone!”
“我已经审查了合同鲍勃。 看起来挺好的。 让我们把它放在石头上!”
“Don’t get too excited Alice, nothing’s in stone yet.”
“爱丽丝,别太激动了,还没有什么坚如磐石。”
“This is God. I’ve written my 10 commandments on these two stone tablets. You know. Just in case ya'll start getting any funny ideas.”
“这是上帝。 我在这两个石碑上写下了我的十诫。 你懂。 以防万一您会收到一些有趣的想法。”

This metaphor continues to have meaning in a modern world because in the physical (ancient) world, stone had some interesting properties:

这个隐喻在现代世界中仍然具有意义,因为在物理(古代)世界中,石头具有一些有趣的特性:

  1. When you carve something on stone there is a physical finality and permanence to it. You can’t make changes just like that.

    当您在石头上雕刻东西时,它具有物理上的持久性和持久性 。 您不能那样做更改。

  2. If you try to “erase” something later on, it’ll be obvious. Any changes you make to it are quite transparent and tamper proof (provable).

    如果以后尝试“擦除”某些东西,这将是显而易见的。 您对其所做的任何更改都是相当透明的且防篡改(可证明)

  3. These rules apply equally to all. Stone is neutral. It obeys the laws of physics, not men. It doesn’t care if you’re a powerful king or a peasant — it behaves exactly the same for everyone.

    这些规则同样适用于所有人。 石头是中性的 。 它服从物理定律,而不是人。 不管您是强大的国王还是农民,它的行为对于每个人都是完全一样的。

Because of all these properties, we have a pretty high level of trust in stone.

由于所有这些特性,我们对石材的信任度很高

I mean — there’s a reason why we never say “let’s set this agreement in sand.” Stone is the kind of thing I can point to in the future for evidence. Stone equals solid proof — not just any material will do!

我的意思是–我们永远不会说“让我们把这个协议定在沙子里 是有原因的 石头是我将来可以指证的东西。 石材等于坚固的证据-不仅仅是任何材料都能做到!

When it comes down to it, a blockchain is really just the above: a kind of material that, through a special mix of cryptography and decentralization, has the properties of permanence, transparency, and neutrality — whatever you put on it.

当涉及到它时, 区块链 实际上就是上面的一种通过加密和去中心化的特殊组合,具有永久性,透明性和中立性的一种材料-无论您使用哪种材料。

Whether it’s a list of how many apples you sent to Joe. Or the words “I love Jenny.” It doesn’t matter. When you put it on a blockchain — it’s on.

是否列出了您发送给Joe的苹果数量。 或者说“我爱珍妮”。 没关系 当您将其放在区块链上时,它就在

Setting something on a blockchain is like setting something in stone. It makes trust easier.

在区块链上进行设置就像在石头上进行设置一样。 它使信任更容易。

Except now we can do it digitally. And that’s pretty special.

除了现在,我们可以数字方式进行 。 这很特别。

Thinking about a blockchain as a piece of stone you can write things on (instead of a piece of currency) also helps us understand its broad potential. Which leads us to…contracts!

将区块链视为一块石头,您可以在上面写东西(而不是一种货币),这也有助于我们了解其广阔的潜力。 这导致我们达成……合同!

第二部分:我们所说的“合同” (Part II: What we mean by “Contracts”)

The word “contract” has a lot of baggage. We start thinking: legal documents and lawyers.

“合同”一词有很多包bag。 我们开始思考:法律文件和律师。

The go-to description used in the news is a bit better: things that self-execute or execute automatically. That seems vaguely familiar though. After all, there’s really nothing new about automation or execution.

新闻中使用的go-to描述要好一些:可以自动执行自动执行的内容 。 不过,这似乎有些陌生。 毕竟,关于自动化执行 ,确实没有什么新东西

智能合约的曾祖父 (The great grandfather of smart contracts)

Take your good ol’ office vending machine for example. It’s a “stupid” machine that does what it’s told, and executes things automatically. It’s been around for decades!

带上您好的办公室自动售货机 例如。 这是一台“愚蠢”的机器,它可以完成所告诉的事情,并且 自动执行事情。 已经有几十年了!

Let’s pretend one afternoon you find yourself in front of this machine. It says: “If you give me $2.50, and press this button, you will get a Diet Coke.”

让我们假装一个下午,您会发现自己在这台机器前。 它说: “如果您给我$ 2.50,然后按此按钮,您将得到健怡可乐。”

It might not actually say those words anywhere. But that’s the promise of this little interaction. One might even call this a kind of simple agreement. (You can guess where this is going.)

它可能实际上没有那些话 任何地方。 但这就是这种小互动的希望。 甚至可能将其称为一种简单的协议 (您可以猜到这是怎么回事。)

You feed in the money. Press the button. Presto! Bottle in hand, you forget this meaningless event in your life 2 seconds later and start worrying again about those darn TPS reports you forgot to do.

你给钱。 按下按钮。 快点! 手握瓶子,您会忘记2秒钟后生活中这个毫无意义的事件,然后再次担心那些您忘了做的令人毛骨悚然的TPS报告。

Well, you didn’t notice, but this whole thing was actually a small program(“contract”) coded(“written”) into the machine beforehand that ran when you hit the button(“signed off on it”). Something like:

好吧,您没有注意到,但是这整个过程实际上是一个小的程序(“合同”)预先编码(“写入”)到了机器中,当您按下按钮时运行了该程序(“在其上签字”)。 就像是:

> if money received == $2.50 >     && the button pressed is "Diet Coke"> then release Diet__Coke

Computer code, as you see, is kind of like a contract.

如您所见,计算机代码有点合同

It’s making statements and declarations. There are terms (if you do this…then…). And just like someone you trust — it even fulfills its end of the bargain!

它在做语句和声明。 有术语(如果您执行此操作……那么……)。 就像您信任的人一样,它甚至可以完成讨价还价!

Voila. Contracts are just code. But unlike a “contract” in English, this is something both humans and machines can read. Extra fun!

瞧 合同只是代码。 但是,不同于英语中的“合同”,这是人类机器都可以阅读的东西。 额外的乐趣!

好的但是… (Ok, but…)

Now you’re more confused about this smart contract business. As we said, this is nothing special. In fact, as the vending machine demonstrates, this kind of code is already everywhere in our daily lives. If a smart contract is just “if…then” code (or any code for that matter), then what’s the hoopla? What’s actually new?

现在,您对此智能合约业务更加困惑。 正如我们所说,这没什么特别的。 事实上,由于自动售货机表明,这种代码在我们的日常生活已经无处不在。 如果智能合约只是“如果……那么”代码(或与此有关的任何代码),那么什么叫pla头? 实际上是什么新东西?

自动贩卖机2.0 (Vending Machines 2.0)

One sunny day, you spot a vending machine sitting on the corner. You’ve never seen this one before!

晴天,您发现自动售货机坐在角落里。 您以前从未见过!

You walk over and take a look. This machine says: “If you put in $1,000 this machine will give you $5,000.”

你走过去看看。 这台机器说:“ 如果投入1,000美元,这台机器将给您5,000美元。”

Whoa! Whoever put this machine together must be very rich and generous.(Or insanely stupid…). Either way. 1k for 5k? No brainer — that’s a deal you’ll take any day! Right?

哇! 凡是将这台机器组合在一起的人,都必须非常富有和慷慨。(或疯狂的愚蠢……)。 无论哪种方式。 1k换5k? 没事-这是您每天都要做的事情! 对?

This is exactly like our good old Diet Coke machine. Same logic. Same if-then process.

这就像我们的旧式健怡可乐机器一样。 逻辑相同。 相同的if-then过程。

Except now the stakes are different. You reach for your pocket but suddenly, you feel hesitant. Who the hell put this machine together anyway? And what if it eats your money? $1,000 isn’t a small amount — you were saving that for months. You didn’t think twice about that Diet Coke. But now? Now you realize that maybe vending machines aren’t that simple.

除了现在的赌注不同。 你伸手去拿口袋,但突然间,你犹豫了。 到底是谁把这台机器放在一起? 如果吃了你的钱怎么办? 1,000美元可不是一笔小数目-您节省了数月的时间。 您没有对那饮食可乐三思而后行。 但现在? 现在您意识到,自动售货机并不是那么简单。

You start thinking about trust.

您开始考虑信任。

How do we know it has enough funds to spit out the promised $5,000?

我们怎么知道它有足够的资金吐出承诺的5,000美元?

How do we know the code is going to run?

我们如何知道代码将要运行

Is there any way to publicly and transparently verify this code?

有什么方法可以公开透明地验证此代码?

结论 (Conclusion)

The $5,000 vending machine is an extreme, theoretical example but it does hint at the problem with scaling trust. In an expanding, digital world where people can connect anonymously — trust becomes a tricky thing. We usually rely on third-parties and other middle men for that reason. We have to. Especially if we’re moving things way more valuable than Diet Cokes. You know, like newfangled financial stuff. Or the very idea of “value” and “ownership” itself.

5,000美元的自动售货机是一个极端的理论示例,但它确实暗示了扩展信任的问题。 在人们可以匿名连接的不断扩展的数字世界中,信任成为一件棘手的事情。 因此,我们通常依赖第三方和其他中间人。 我们必须。 特别是如果我们要比Diet Diet可口可乐更有价值的话。 你知道,就像新的财务资料。 或“价值”和“所有权”本身的想法

Hmmm. If only you could marry the automation of traditional programming and the trust-worthy properties of digital stone….

嗯 只要你能嫁的传统节目 数字石的值得信赖的性能的自动化系统。

Well, that is exactly what a smart contract is! It’s just code — with a very special kind of backing.

好吧,这就是智能合约! 这只是代码-具有非常特殊的支持。

Keep in mind, we’ve had both computation and execution before. But never one that was finalized in a neutral, provable, trustable way on (digital) stone.

请记住,我们之前已经进行过计算和执行。 但是,从来没有人以中立,可证明,可信赖的方式在(数字)石头上敲定法律。

现实世界如何? 一些想法。 (How about the real world? A few ideas.)

Online Gaming: Fight fraud on gambling sites. Are the odds of that dice roll you just did actually 1 in 6? How do we know they’re going to pay out? Well, why not “set the code in stone” and prove it? A live example.

在线游戏:打击赌博网站上的欺诈行为 。 您实际上只做过六分之一的掷骰子几率吗? 我们怎么知道他们要付款? 那么,为什么不“彻底确定代码”并加以证明呢? 一个真实的例子

Supply Chains: Maybe track and verify where and how things are made?

供应链:也许跟踪并验证在哪里以及如何制造东西?

Voting: Maybe a tamper proof voting process?

投票:也许是防篡改投票程序?

Decentralized and Autonomous Companies: Sci-fi time.

分散和自治公司:科幻时间。

Throughout history, automation has always been applied to the bottom of companies. The assembly line. The factory worker. But if the rules of a corporation are just a kind of operational logic— then isn’t it possible to flip the pyramid and instead automate the top?

纵观整个历史,自动化始终应用于公司底层 流水线。 工厂工人。 但是,如果公司的规则只是一种操作逻辑 ,那么,是否有可能翻转金字塔并自动实现最高业绩

These are only a few examples of what you could code on a blockchain using Ethereum’s Turing complete programming language. We’re only at the beginning. If you dream it, you might be able to code it.

这些只是您可以使用以太坊的Turing完整编程语言在区块链上进行编码的一些示例。 我们只是开始。 如果您梦dream以求,则可能可以对其进行编码。

And in many ways, that’s what makes this whole thing exciting. We have some guesses, but honestly — we have no idea what will be built in the years and decades to come.

从很多方面来说,这就是使整个事情变得令人兴奋的原因。 我们有一些猜测,但老实说-我们不知道未来几十年和几十年会建成什么。

All we know is that the building blocks are here. And it is open to all. The rest is up to you.

我们所知道的是,构建块就在这里。 它向所有人开放。 其余的取决于您。

准备去兔子洞了吗? (Ready to go down the rabbit hole?)

翻译自: https://www.freecodecamp.org/news/smart-contracts-for-dummies-a1ba1e0b9575/

人工智能在绘画方面傻瓜相机

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值