首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 企业软件 > 行业软件 >

emacs与erlang的完善结合

2012-10-17 
emacs与erlang的完美结合1.在emacs中使用c+x c+z 启动erlang shell 会报错use of opcode 153 this emulat

emacs与erlang的完美结合
1.在emacs中使用c+x c+z 启动erlang shell 会报错use of opcode 153; this emulator supports only up to 152 after upgrading to R140B4,因为erlang的beam文件版本不一致导致,linux下有2个erlang,一个14的,一个15的。所有要把14的删除(还有改.emacs中的配置,使用
这里的启动路径一致,不然会报erlexec找不到。

2.实现emacs中的跨模块操作:
要理解erl后面跟的参数的用途:
erl <arguments>
The arguments can be divided into emulator flags, flags and plain arguments:

* Any argument starting with the character + is interpreted as an emulator flag.
As indicated by the name, emulator flags controls the behavior of the emulator.

*
Any argument starting with the character - (hyphen) is interpreted as a flag which should be passed to the Erlang part of the runtime system, more specifically to the init system process, see init(3).
各种参数+,一,普通的使用

经常用的参数:
最重要的分布式的支持:用于节点与节点间的通迅用:(底层用的tcp/ip):
节点间的联系:松散结构
The nodes in a distributed Erlang system are loosely connected. The first time the name of another node is used, for example if spawn(Node,M,F,A) or net_adm:ping(Node) is called, a connection attempt to that node will be made.
Connections are by default transitive. If a node A connects to node B, and node B has a connection to node C, then node A will also try to connect to node C. This feature can be turned off by using the command line flag -connect_all false, see erl(1).
If a node goes down, all connections to that node are removed. Calling erlang:disconnect_node(Node)will force disconnection of a node.
The list of (visible) nodes currently connected to is returned by nodes().
cookie用于保护节点间的安全security,只是一些随机的数字

热点排行