Giter Club home page Giter Club logo

atum's Introduction

Atum

Javascript Interpreter in Functional-Style Javascript

About

Atum is a Javascript interpreter written in functional style Javascript. Atum is designed to be a platform for Javascript experimentation and explores the implementation and power of functional interpreters. It is part of Benben, a project developing a complete Javascript implementation in functional style Javascript.

Project Goals

Atum is designed as a Javascript language testing and experimentation platform. It also explores the functional implementation of imperative programming languages. As an academic project, performance is a low priority (Atum may even be the slowest Javascript implementation ever).

A few major project goals:

  • Enable rapid prototyping and experimentation of the Javascript language.
  • Support substantial hosted language alterations with minimal code changes.
  • Functional style implementation.
  • Modular code structure of composable functions.
  • Minimal direct reliance on host language features.
  • Support powerful debugging.

Cloning

git clone https://github.com/mattbierner/atum atum
cd atum
git submodule update --init

Dependencies

Direct dependencies included in the project as submodules:

  • amulet - Helper library for working with immutable objects
  • Nu - Functional streams
  • [parse.js][parsejs] - Base combinatory parsing library
  • parse-ecma - Combinatory ECMAScript parser
  • ecma-ast - ECMAScript AST nodes

Resources

Indirect dependencies, used for testing or UI or some other supporting part of the project. They are included as source files.

Status

Atum is being actively developed and is not feature complete. Take a look at the issue tracker to see some features that are being worked on or are not yet implemented.

Contributing

Any contribution to atum is welcome. Some ideas to get started helping Atum:

  • Run existing Javascript code in Atum and report issues.
  • Implement Javascript builtins.
  • Develop tools that take advantage of Atum's unique features.

Project Highlights

Computations

Atum is built from computations. A computation is a composable continuation based step in a program, a function mapping the current state to a new state. Computations are not used directly, but constructed with composable higher order functions that abstract program operations. All of atum is basically built from 3 computations found in 'lib/atum/compute.js': just, bind, and callcc (The concept behind Atums's computations is based on the continuation monad, but many similarities between the two are only superficial given Atum's Javascript implementation).

From the set of base computations, Javascript language computations are define. Each computation encapsulates some part of program execution that other computations can use.

Support for Deep Language Alteration

Composed computations and minimal reliance on the host language allow altering core language features and introducing new language features easily. For example, try statements can be made transactional, with statements can be repurposed, or objects can be passed by value with only few changes. Combined with parse-ecma, new syntax can be introduced and implemented.

State and Snapshots

The interpreted program's state is stored in a single immutable state object. Copies of the state object can be easily created, allowing snapshots of program state to be collected.

Debugging

Atum's functional implementation and state snapshots enable novel debugging of interpreted programs. This allows unique interaction with the code not possible in traditional programming language implementations.

For example, with snapshots, a theoretical debugger could step through code not only forwards, but also backwards and examine the events leading to the current state. Further, the debugger can inject new states, creating branches in the program's timeline that can be explored individually. The distinction between writing, running, and debugging code disappears; programs becomes dynamic documents programmers query, inspect, and change in real time.

More commonplace debugging tools also gain new power. Complex queries, conditional breakpoints, event logging, and stepping are easily supported and can be enhanced to take advantage of Atum's unique features.

A very simple debugger based on the Webkit inspector is included in Atum. This was designed mainly to support development. Future projects will focus on developing debuggers targeting Atum specifically.

atum's People

Contributors

mattbierner 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.