Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
|
|
@ -0,0 +1,19 @@
|
|||
> (defun get-server-name ()
|
||||
(list_to_atom (++ "exampleserver@" (element 2 (inet:gethostname)))))
|
||||
|
||||
> (defun start ()
|
||||
(net_kernel:start `(,(get-server-name) shortnames))
|
||||
(erlang:set_cookie (node) 'rosettaexample)
|
||||
(let ((pid (spawn #'listen/0)))
|
||||
(register 'serverref pid)
|
||||
(io:format "~p ready~n" (list (node pid)))
|
||||
'ok))
|
||||
|
||||
> (defun listen ()
|
||||
(receive
|
||||
(`#(echo ,pid ,data)
|
||||
(io:format "Got ~p from ~p~n" (list data (node pid)))
|
||||
(! pid `#(hello ,data))
|
||||
(listen))
|
||||
(x
|
||||
(io:format "Unexpected pattern: ~p~n" `(,x)))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue