Bitcointalk · A few suggestions

中本聪,2009 年 12 月 12 日

SN-0040 已核对来源,附原文与上下文。

阅读语言
中文译文

svn 0.2 在 Mac OS X 10.4.11/Intel 上就快编译过了(我这里还有一台 PPC970 的机器,PPC 构建也做得了)。窗口部分通过 wxwidgets 用上了原生 carbon!非常快!我不得不新建了一个 makefile(makefile.osx;当然基于 makefile.unix……考虑过用 autoconf 吗?),并在 header.h 里加了些 ifdef。我手上有补丁。我会继续捣鼓,接下来也许会在 FreeBSD 上试试。

有 Mac 支持是好事。wxWidgets 的跨平台能力物有所值。

请不要试 PPC。PPC 是大端序,Bitcoin 是小端序,会有没完没了的字节序 bug;一旦网络上存在一个可能交换字节的节点,我调试网络就更难了。反正 PPC 也在被淘汰。

考虑过 autoconf。对 makefile 已经变成泥潭的大型项目来说,autoconf 是必需品,但我们规模还小,不用它反而更优。我宁愿让 makefile 尽量保持简单。

我认为把 bitcoin 拆成两个应用最理想:一个 wxwidgets 前端(功能基本都在了),加一个绑定控制 TCP 套接字的后端。我一直在读源码,估计拆分难度,应该相当简单。当然,还得开发一个 API。

光是想想,我头就大了。把整个 UI 后端都从 TCP 连接里过一遍,会让所有事情的难度翻倍。UI 与内部数据结构之间的带宽,实在太大了——listview 控件的工作方式,决定了要保持它更新,就得频繁通信。

我更想要命令行控制,那样能同时获得远程管理和批量自动化。

ORIGINAL · 英文原文
I almost have the svn 0.2 compiling on Mac OS X 10.4.11/Intel (I also have a PPC970 machine here as well so a PPC build would be possible as well). The windowing is native carbon too via wxwidgets! It is FAST! 😉 I had to create a new makefile (makefile.osx; based on makefile.unix of course.. given any thought to using autoconf?) and put some ifdef's into header.h. I have patches. I will keep toying around. I might try it on FreeBSD next.
Mac support would be nice.  wxWidgets really pays off for cross platform.

Please don't try PPC.  PPC is big-endian and Bitcoin is little-endian, there would be endless endian bugs making it harder for me to debug the network if there's a potentially byte-swapping node out there.  PPC is on its way out anyway.

Considered autoconf.  Autoconf is a necessity for large projects with a quagmire makefile, but I think we're small enough that it's more optimal without it.  I'd rather keep the makefile simple as long as possible.

Quote
I think that breaking bitcoin into two apps is ideal. A wxwidgets front end (since it is mostly all there) and a backend that binds to a control TCP socket. I have been reading over the source to see how hard it would be to break it apart and I think it should be fairly simple. Of course an API would have to be developed.
My head hurts just thinking about that.  Funnelling all the UI backend through a TCP connection would make everything twice as hard.  There's too much bandwidth between the UI and the internal data structures in order to keep the listview control updated, because of the way the listview control works.

I'd rather have command line control, that would get us remote admin and batch automation.
来源
Bitcointalk 原始链接 ↗ 记录编号 SN-0040