Code Monkey home page Code Monkey logo

emonk's Introduction

My fork of emonk library, in which I fix stuff for my own good.
Original can be found here: http://github.com/davisp/emonk/

emonk - Accidentally Refactored erlang_js

erlang_js is awesome. But I started refactoring. Now there's emonk.

With the latest versions of Emonk there's quite a bit of difference now. Emonk is NIF based and uses a thread-pool to move JavaScript execution off of the Erlang scheduler threads. Translation from Erlang terms to JavaScript objects uses a native translation step to avoid JSON overhead. I haven't gotten around to actually testing to see if there's any sort of appreciable difference in speed.

Requisites

  1. A fairly recent version of Spidermonkey. I use the version from HomeBrew which uses this url.
  2. R14A. Emonk uses the new NIF API extensively.

Building

Hopefully the build scenario is something like:

$ git clone git://github.com/davisp/emonk.git
$ cd emonk
$ make
$ make test

Running

I've been using etap to test as I code. Its awesome. You should use it. That said, running is pretty cake assuming emonk is on your Erlang code path:

$ ERL_LIBS=~/awesome_projects/emonk/src erl -s emonk
{ok, Context} = emonk:start_vm().
{ok, 6} = emonk:eval(Context, <<"var f = 2; f*3;">>).
{ok, undefined} = emonk:eval(Context, <<"var g = function(x) {return x*4;};">>).
{ok, 36} = emonk:call(Context, <<"g">>, [9]).

Bugs and Things

The best place to file bugs is at the issue tracker on GitHub. Less yapping, more tapping. Thanks mattly.

Yep

That's pretty much it. Mostly this was internal churn that I kinda started chasing around like my tail. Hopefully things are easy enough to follow in the logs and code.

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.