Git Product home page Git Product logo

js2amb's Introduction

JavaScript to Ambients Compiler (js2amb)

Compiles JavaScript to Ambient protocol syntax

Background

Ambients is a protocol for distributed computation. It allows you to request and execute computation as easily as you can data inside OrbitDB. Think of it like AWS Lambda or Azure Cloud functions, but on a decentralized peer-to-peer network.

The protocol also includes guarantees as to the verfiability and safety of the code, all without a blockchain.

A working implementation of the Ambients protocol has two main functions:

  1. Compile source language code into "byecode" DAG, and store it in a distributed, peer-to-peer network.
  2. Retrieve the DAG from said network and safely + verfiably execute the code.

Description

This code, while it can be executed on its own, stands to support the ambc compiler by transliterating JavaScript code into Ambients syntax.

This effort is very alpha and there's a LOT of work to be done in order to be able to parse JS syntax fully. If you want to help, please seek us out on Gitter or by open an issue.

Install

First, install node.js Then:

$ git clone https://github.com/aphelionz/js2amb
$ cd js2amb
$ npm install

Usage

There is currently rudimentary CLI support via src/bin.js:

$ ./src/bin.js path/to/js/file.js # outputs Ambients ASCII

To see it in action, you can run the tests.

% make test

Contributing

Please do! If you're at all interested in this topic you should definitely seek us out on Gitter, open issues, and submit PRs.

License

MIT © 2019 Haja Networks Oy

js2amb's People

Contributors

aphelionz avatar

Watchers

 avatar

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.