OTP example app

9 views
Skip to first unread message

dysinger

unread,
Nov 1, 2009, 9:37:13 PM11/1/09
to Lisp Flavoured Erlang
I just pushed a (really basic) erlang otp example app coded in LFE
http://github.com/dysinger/lfe-otp-ping-pong

rvirding

unread,
Nov 10, 2009, 11:09:56 AM11/10/09
to Lisp Flavoured Erlang
Two things:

- You can add a behaviour attribute to the module definition:

(defmodule ping_pong
(export (ping 0))
(export (start_link 0) (init 1) (handle_call 3) (handle_cast 2)
(handle_info 2) (terminate 2) (code_change 3))
(behaviour gen_server))

This will be added attribute list but otherwise ignored. For now it
will just indicate intent, in a future release I will try to check it
as well.

- Could I just copy the ping_pong.lfe file into lfe/examples as
another example? We are desparately missing examples and this one
shows that lfe can be used together with OTP.

Robert

rvirding

unread,
Dec 1, 2009, 10:14:24 PM12/1/09
to Lisp Flavoured Erlang
Tim, I hope you don't mind but I took the ping_pong.lfe file, added
your copyright to it and have put in the examples directory of LFE. I
will remove it if you wish.

Robert

dysinger

unread,
Dec 4, 2009, 7:38:54 PM12/4/09
to Lisp Flavoured Erlang
absolutely no problem :)
Reply all
Reply to author
Forward
0 new messages