精华文章?
经典读物
Joe Armstrong 的博士论文,创始人自己写的研究论文,想一探 Erlang 的奥秘?这绝对是不可错过必读的文献。段先德同学翻译了很好的中文版:《面对软件错误构建可靠的分布式系统》,英文版:《Making reliable distributed systems in the presence of software errors》。
这篇《函数式编程另类指南》想必是 N 多初次接触 Erlang 的同学们都读过的,还有这篇《轻松实现可伸缩性,容错性,和负载平衡的大规模多人在线系统》,还记得当时读完时的心情么?另外,还有一篇《Concurrency and Erlang》(英文原文)也同样值得一读。
开发环境
Emacs + ErlangMode + Distel 是经典的 Erlang 开发环境,这篇《about distel》提供了非常棒的安装脚本。
这篇《目前支持Erlang语法的开发环境》则对目前对 Erlang 有支持的工具做了一个简单的盘点。
如果只是需要简单的 syntex highlight 那么改造改造 EditPlus 也能将就着用,这篇《editplus stx for erlang?》里面有语法加亮文件下载。
与其他语言的交互
和其他语言的交互总是难免的,Erlang的方式是 Node 以及 Port ,这篇《Erlang: Let’s talk to java》讲了 Erlang – Java 以 Jinterface 的交互方式。
单元测试
单元测试?可以看这篇简短的指引《Unit Test in Erlang》。
性能调优
这篇《erlang 网络调优实战》,层层深入,步步逼近,直逼 C2M 不可思议的目标。
学习心得
mryufeng是“非业余研究Erlang”的大拿,资深业内人士,这篇《公布 mryufeng 同学的 Erlang 秘笈》挖了大拿的好多珍宝。
Arbow同学是mryufeng的“亲密战友”,业内资深人士too,这篇《读“谈分布式网络程序设计”,思Erlang》,还有《Erlang 的分布通讯安全策略》,以及《Erlang网络编程-packet参数》,《erlang module pg2》都是第一线同志们的独立思考之作。
其他
ErlangTalk@gmail.com 是建立在 gtalk 上的 Erlang 主题聊天室,很活跃,很多大虾出没,聊天记录,还是有很多很有营养的。《2007.09.聊天记录》,《2007.08.聊天记录》
还有 N 多篇好文(以及本人的 M 篇吹水滥文
),没有完全收录,有时间的话,慢慢看吧。
我是个初学编程的,我想接触erlang,不知有没有比较经典的入门书啊
楼上的,我觉得看SICP帮助挺大的。
我阅读了一下《面对软件错误构建可靠的分布式系统》。
该文采用的并发编程的思想与我见到的一个框架很相似。
那个框架采用的是以ACE为中间件,多进程,有个主进程负责其他进程的生死,进程只能与主进程之间传递消息,若两个非主进程同消息,只能同主进程来中转。
发布版本时,需求的不同,版本中包含的不同数量的进程。
所以感觉这篇文章写的不错。
The goal of this assignment is to make a distributed fault-tolerant application for a simple
computation of prime numbers. (Large prime numbers are user in security algorithms, if you
like to know a practical application of this algorithm).
A prime number is a number that is only dividable by 1 and itself, i.e. for N to be prime it
must hold that for all M between 2 and N-1 the erlang expression N rem M evaluates to
something unequal zero. The first few prime numbers are 1,2,3,5,7,11,13,…
Write a demonstrator for a fault-tolerant distributed application. A number of computers
should be connected in a network, say 1 to N.
It is known how they are positioned, i.e., 1 nest to 2, next to 3, … next to N.
On each computer you run the same program. This program computes the prime numbers, but
it skips numbers that other computers have already analyzed. Thus, if computer 1 starts to
compute whether 1 is a prime, then it informs the others, which decide to go on to the next
number (2, 3, 4, etc). In the end, all computers print a list of all prime numbers, but never
compute a prime number if one of the other computers already took that task.
As soon as a computer is disconnected from the network, or the Erlang node that it runs is
killed (simulating a crash), then the other computers continue working.
When a crashed computer is restarted (or the Erlang node restarted), the program joins the
pool and starts doing computations again.
函数式脚本编程论坛
如何用ERLANG编写一些像学习C语言时的小程序呢.比如写个求最大公约数的程序
在学习ERLANG的初级阶段我应该怎样练习这个语言呢.没有实战的程序员是不合格的.可是用ERLANG能做些什么,怎么去做呢?
能不能给我这个初学者一些入门的建意。我很晕的是,斯特朗这家伙写书就跟我给别人讲题一样。思维跳跃太大,而且不顾别人感受。我根本都还没有配制好SHELL以及EMACS他就让我写程序。没办法来请教下。还有,那些程序至少在大脑中运行下给我看看吧。要不怎么从C的模式中跳出来呢。
@Star 动手能够帮助动脑,我还是建议你耐着性子,照着“那本书”里的例子,慢慢地一步一个脚印地走一遍。碰到问题,发到 maillist 中,大家都会帮你解答的。随着这个步骤的深入,你的大脑中“Erlang 程序运行起来的感觉”会自然而然的慢慢浮现出来。
好吧.试试.多谢啦.
我在机子上创建了两个节点,gandalf和star,然后让gandalf运行一个进程,再让 star向gandalf发出请求,并改变其内容。但是出现了错误。这是书上的例子。不知道为什么会这样。
(gandalf@star-laptop)12> rpc:call(star@star-laptop,kvs,lookup,[weather]).
** exception error: bad argument in an arithmetic expression
in operator -/2
called as star@star – laptop
(gandalf@star-laptop)13> rpc:call(star@star,kvs,lookup,[weather]).
{badrpc,nodedown}
(gandalf@star-laptop)14>
好像一直都是找不到节点。可是我的NODE没错啊。
(star@star-laptop)13> rpc:call(gandalf@star_laptop,kvs,lookup,[weather]).
{badrpc,nodedown}
(star@star-laptop)14>
(star@star-laptop)17> rpc:call(gandalf@star-laptop,kvs,lookup,[weather]).
** exception error: bad argument in an arithmetic expression
in operator -/2
called as gandalf@star – laptop
@Star
(star@star-laptop)17> rpc:call(‘gandalf@star-laptop’,kvs,lookup,[weather]).
Thanks.
学习erlang都应看哪些书.
建议先通读《Erlang 程序设计》。
相比于Lisp,Erlang看起来更像Prolog,我想先看看Prolog的书对会对模式匹配和尾递归有更深入的了解。
Erlang的数据结构方面的书有哪些.有例程没.
我是倒过来,昨天刚从公司的书架上翻到了一本<Erlang程序设计>,感觉写得相当好,就当回家路上的读物读起来了。感觉这语言很有意思。
如果初学Erlang的话,我是挺推荐这本书的。
没想到这种语言还挺有中国特色,其中一个翻译是“GOD Erlang”即杨戬二郎神。:)
GOD Erlang, 是很老的电影名字
@Star
Erlang数据结构,还是这本书写的翔实.建议听看,该去看前者.
推荐新出的”erlang programming”这本书.
otp in actions 这本书对于初学者掌握otp gen_* 系列非常有帮助。 有需要的联系我 http://yufeng.info