GithubHelp home page GithubHelp logo

erlsci / port-examples Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 3.0 9 KB

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

License: BSD 2-Clause "Simplified" License

Makefile 18.09% Erlang 81.91%
common-lisp erlang quicklisp otp golang cl go

port-examples's Introduction

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"}

port-examples's People

Contributors

oubiwann avatar

Stargazers

 avatar

Watchers

 avatar  avatar

port-examples's Issues

Convert Erlang to LFE

This project started out as a demo for a friend (separate, private repo with a little different functionality). It was important to do that in Erlang-proper, but there's no reason this can't be ported/converted to LFE ๐Ÿ˜„

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.