Skip to content

gen_server-based set of Erlang/OTP examples for running ports in other languages

License

Notifications You must be signed in to change notification settings

erlsci/port-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

port-examples

An Erlang/OTP application for running Port examples in various languages

Dependencies & Setup

This application assumes that the following are on your system:

  • git
  • GNU make
  • A modern install of Erlang (v20+)
  • rebar3 (Erlang build tool)
  • Golang
  • SBCL (Steel Bank Common Lisp)
  • Quicklisp (CL deps manager)

This project's rebar.config.script will sett the required Go environment variables, but you will need to link the Common Lisp examples to your local Quicklisp directory (see below for details).

Build & Run

$ make

This will clone the Go and Common Lisp repos that are used in the examples. Now you need to tell Quicklisp about the cloned Common Lisp libs:

$ cd apps/ports/priv/cl-port-examples/
$ ln -s `pwd` ~/quicklisp/local-projects/
$ cd -

Now the app is ready to run:

$ make run

See the running port gen_servers:

> ports_app:children().
[{lisp_echo_server,<0.258.0>,worker,[lisp_echo_server]},
 {go_echo_server,<0.257.0>,worker,[go_echo_server]}]

Echo Examples

go_echo_server:send({command, echo}).
{result,"echo"}
lisp_echo_server:send({command, echo}).
{result,"echo"}

About

gen_server-based set of Erlang/OTP examples for running ports in other languages

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published