Git Product home page Git Product logo

ericcurtin / ape Goto Github PK

View Code? Open in Web Editor NEW
0.0 4.0 1.0 41 KB

ape is a tool enabling one to put a "bang line" in the source code of a C/C++ program to run it, or to run such a source code file explicitly. It was created in an attempt to make experimenting with C/C++ more appealing to people used to Python and similar languages which operate most visibly with source code.

License: GNU General Public License v2.0

CMake 26.78% C++ 69.40% C 0.96% Shell 2.86%

ape's Introduction

ape Build Status

Overview

ape is a tool that allows you to use a compiled language as a scripting language.

Building

To build ape, simply run:

./build.sh

ape uses the cmake build system.

Installing

To install ape, build using steps above and then run:

make install

as the root user to install.

Using

Once ape is installed, try to execute helloWorld.ape script.

Writing ape script

Start with:

#!/usr/bin/ape

followed by your C++ code.

Tools

There are two tools that can be used to compile an ape script.

ape-compile

ape-compile compiles the script, the location of the binary will be:

/tmp + "path of ape source"

ape-make

ape-make compiles the script, if the modification date of the source is more recent than the binary.

ape-make executes ape-compile.

ape

ape when executed on it's own, reads STDIN. You can end STDIN by pressing Ctrl-d. Once this data is read, it is compiled and executed.

ape when given an argument, will pass the file to ape-make.

ape executes ape-make.

Proposals for enhancement

Open an issue:

https://github.com/ericcurtin/ape/issues

Contributing

Open a pull request:

https://github.com/ericcurtin/ape/pulls

ape's People

Contributors

ericcurtin avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

skyformat99

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.