Code Monkey home page Code Monkey logo

sandbox's Introduction

Sandbox

Build the project

Requirements

Please install peg/leg manually or with a package manager, for example with Homebrew:

$ brew install peg

Please install the Boehm-Demers-Weiser conservative garbage collector manually or with a package manager, for example with Homebrew:

$ brew install bdw-gc

Build

$ make

Build with Docker

The Docker image provides a ready to go environment to experiment with the project. Just build the image locally and run an interactive shell inside the container:

$ docker build . --tag mtardy/sandbox
$ docker run -it mtardy/sandbox

Usage

Single input

You can pass your program:

  • via the standard input
$ echo "a=2+3 a*2" | ./parse
$ ./parse < file
  • via a file
$ ./parse file

Multiple inputs

You can also pass multiple files and use - in any order as the standard input when mixing files and standard input, for example:

$ ./parse file1 - file2 < file3
$ echo "a=2+3 a*2" | ./parse file1 file2 -

sandbox's People

Contributors

mtardy avatar piumarta avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sandbox's Issues

More factories?

Add a comprehensive set of factories for built-in types: Integer(aValue), Symbol(aValue, aMap[chars...]->string), Map(size? anotherMap? aString->arrayWithChars). For example...

   Integer   x   null Integer String Symbol Function Map
   String    x   null Integer String Symbol Function Map
   Symbol    x   null Integer String Symbol Function Map
   Function  x   null Integer String Symbol Function Map
   Map       x   null Integer String Symbol Function Map

   String(['a', 'b', 'c']) => "abc"  (array to string)  *OR*  => "['a', 'b', 'c']" ???  I.e., should String == printString() ?
   Map("def") => ['d', 'e', 'f']   (string to array)
   Function(print) != Function(print) != print   (shallow copy of function)
   etc...

In each case we should think carefully about what kind of input should give what kind of output modulo the name of the factory function. (Maybe we just keep String() factory and printString() and have them do different things in the case of array of char?)

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.