Giter VIP home page Giter VIP logo

ark's Introduction

Ark Programming Language

Ark is a systems programming language somewhere inbetween C and C++.

Example

A small example program written in Ark.

[c] func printf(fmt: str, ...);
func main(): int {
    mut i := 0;
    for i < 5 {
        printf("i: %d\n", i);
        i = i + 1;
    }
    return 0;
}

Resources

Installing

Installing Ark should be relatively easy, you'll need a few dependencies before you get started:

Dependencies

  • Go installed and $GOPATH setup
  • subversion
  • LLVM installed, with llvm-config and llc in your $PATH
  • a C++ compiler

Building

Replace RELEASE_360 with the version of LLVM you have installed. For example, version 3.6.1 becomes RELEASE_361. You can find out your version of llvm by running llvm-config --version.

$ svn co https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_360/final $GOPATH/src/llvm.org/llvm
$ export CGO_CPPFLAGS="`llvm-config --cppflags`"
$ export CGO_LDFLAGS="`llvm-config --ldflags --libs --system-libs all`"
$ export CGO_CXXFLAGS=-std=c++11
$ go install -tags byollvm llvm.org/llvm/bindings/go/llvm
$ go get github.com/ark-lang/ark
$ go install github.com/ark-lang/ark

Make sure $GOPATH/bin is in your $PATH.

To see the current state of the compiler, try running the test script.

Usage

For detailed usage information, run ark help. For information on specific commands, use ark help <command>.

Compiling Ark Code

ark build tests/big_test.ark -o out_name

If the -o option is not specified, the outputted binary will be names main.

Docgen

ark docgen tests/big_test.ark --dir some_output_dir

If the --dir option is not specified, the generated documentation will be placed in docgen.

Utilities

make gen and make fmt

The targets gen and fmt are included for the convenience of the developers. They run go generate and go fmt respectively on all the modules in Ark. Please run make fmt before creating a pull request.

Testing

Requires $GOPATH/bin to be in your $PATH and Python 2.4 or newer.

$ ./test.py

License

Ark is licensed under the MIT License.

ark's People

Contributors

felixangell avatar movingtomars avatar vnev avatar haneefmubarak avatar raoulvdberge avatar ianhedoesit avatar zhiayang avatar torwart avatar 7bitlyrus avatar lilithwittmann avatar naegelejd avatar built1n avatar andars avatar inphi avatar kiljacken avatar

Watchers

James Cloos avatar  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.