JSON-RPC 密码

中本聪SN-1433
其他参与者原话gavinandresen原帖 ↗

我刚在我 debian 系统的 /etc 里快速扫了 20 个 .conf 文件,发现:

I just did a quick survey of 20 .conf files in /etc on my debian system, and found:

1 个文件用 "key value"

1 file used "key value"

5 个用 "key=value"

5 used "key=value"

中本聪回应

谢谢这份调查!

Thanks for that survey!

我觉得 "key value" 有点不自然。键和值之间应该有一个更明确的、暗示赋值的分隔符。用空格作分隔符的人,也许只是图省事,直接用了所用语言的 split 函数。

I find "key value" a little unnatural. There ought to be a more definite separator between key and value that suggests assignment. The space people may just be getting lazy using their language's split function.

key=some full sentence with spaces in it. # 看起来比这样清晰

key=some full sentence with spaces in it. # seems more clear

key some full sentence with spaces in it. #

key some full sentence with spaces in it. # than this

那好,就用自解析的 mapConfig,语法:

Allright then, lets go with self-parsed mapConfig, syntax:

# comment

# comment

key=value

key=value

扩展名 .conf。文件名叫什么?~/.bitcoin/settings.conf 还是 ~/.bitcoin/bitcoin.conf 还是别的?

file extension .conf. What's the filename, is it ~/.bitcoin/settings.conf or ~/.bitcoin/bitcoin.conf or what?

我觉得最好把键和值开头结尾的空白都去掉。

I think we better strip whitespace at the beginning and end of the key and the value.

# 喜欢列对齐的用户

# user who likes column formatted

k = value

k = value

key = value

key = value

longerkey = this sentence would be this # "this sentence would be this"

longerkey = this sentence would be this # "this sentence would be this"

key = value # 猜这样也行

key = value # guess this is ok too

nextkey = value

nextkey = value

right = justified

right = justified

正常语法应该是 "key=value",只不过偶尔有人写 "key = value" 也不能怪人家。

The normal syntax should be "key=value", but you can't blame people for the occasional "key = value".

译文校对、修订与纠错

当前版本尚未建立逐条校对状态记录。来源核验、历史审校与当前译文校对是不同事项。

查看历史审校与代表修订 →

译文内容版本:12c14b9ebf75。用于比对文本,不代表校对等级或更新时间。

准备纠错说明

请填写对应原文、现译文、建议译法和理由。复制后通过你联系本站作者的渠道提交;此处不会自动发送。

来源
英文原标题

JSON-RPC password

Bitcointalk · 原始链接 ↗ 记录编号 SN-1433

阅读字号

选择适合你的字号,之后阅读会继续使用。