Giter VIP home page Giter VIP logo

cone's Introduction

Cone Programming Language

Cone is a fast, fit, friendly, and safe systems programming language. It features:

  • 3d web support
  • Concise, readable syntax
  • Lean, native runtime
  • Custom allocators
  • Memory, thread & type safe
  • Extensive code reuse features

The Cone compiler is currently under development. The current status and next steps are documented in PLAN.md.

Documentation and Other Resources

The Cone home repository offers a rudimentary build environment for Cone programs, including the Congo build tool.

Language Features

When finished, Cone will support these features:

  • Readable, modular marriage of 3D content and behavior:
    • Simple, outline-like declarative syntax for content
    • Procedural generation and behavior interwoven in content
    • Snap-together, Internet-hosted, url-located parts
  • Compile-time memory, type, and concurrency safety checks
  • Gradual memory management: safely manage memory your way
    • Lexical, single-owner strategy for performance
    • Ref-counted or tracing GC for flexibility
    • Lifetime-constrained references for performance/simplicity
    • Custom allocators (pools/arenas) for performance
  • Lightweight concurrency
    • Co-routines, threads and actors
    • Lockless and locked permissions for safe data sharing
  • Robust type system
    • Sum types, structs, arrays, slices, ranges, aliases
    • struct subtyping via trait, interface, & parent inheritance
    • Attach methods to any type
  • Modules, macros, templates and meta-programming
  • Extensible pattern matching
    • Type-defined '~~' match operator
    • 'match' blocks using custom match methods
    • Content extraction during matching
  • Functions, Methods and Closures
    • Multiple return values and implicit return
    • Computed properties
  • 'do' block for context management
  • Concise, readable code:
    • 'this'-implied prefix operators for method cascading, etc.
    • Operator overloading
    • Control clauses for 'if', 'while', 'each'
    • Type inference
    • Parallel assignment
    • Auto-detected off-side rule
    • Blocks and 'if' are expressions
  • Unicode-aware (UTF8) text strings and variable names
  • Fast compilation and convenient packaging

Building (Windows)

A Visual Studio C++ solution can be created using the Cone.vcxproj project file. The generated object and executable files are created relative to the location of the solutions file. The build depends on LLVM 7 being installed and available at $(LLVMDIR).

Building (Linux)

To build on Linux:

sudo apt-get install llvm-7.0-dev
cmake .
make

Note: To generate WebAssembly, it is necessary to custom-build LLVM, e.g.:

mkdir llvm
cd llvm
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm-src
cd llvm-src/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
svn co http://llvm.org/svn/llvm-project/lld/trunk lld
cd ../..
mkdir llvm-build
cd llvm-build
CC=clang CXX=clang++ cmake -G "Unix Makefiles" -DLLVM_BUILD_LLVM_DYLIB=ON -DCMAKE_INSTALL_PREFIX=/llvm/wasm -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly /llvm/llvm-src
make
make install

Building (Mac OS)

To build on Mac OS:

brew install --with-toolchain llvm
llvm-config --bindir

Modify CMakeLists.txt so that LLVM_HOME points to LLVM's path (e.g., "/usr/local/Cellar/llvm/7.0.1" without the /bin) and modify LLVM_LIB to "libLLVM.dylib".

cmake .
make

License

The Cone programming language compiler is distributed under the terms of the MIT license. See LICENSE and COPYRIGHT for details.

cone's People

Contributors

jondgoodwin avatar lerno avatar meai1 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.