Giter Site home page Giter Site logo

pratikdhanave / cx Goto Github PK

View Code? Open in Web Editor NEW

This project forked from skycoin/cx

0.0 1.0 0.0 70.76 MB

A new programming language for blockchain.

License: Other

Makefile 0.97% Go 89.48% Batchfile 0.53% Yacc 5.49% Lex 2.11% Roff 1.37% Dockerfile 0.04%

cx's Introduction

cx logo

CX Programming Language

Build Status Build status

CX is a general purpose, interpreted and compiled programming language, with a very strict type system and a syntax similar to Golang's. CX provides a new programming paradigm based on the concept of affordances.

Table of Contents

CX Programming Language

CX is a general purpose, interpreted and compiled programming language, with a very strict type system and a syntax similar to Golang's. CX provides a new programming paradigm based on the concept of affordances, where the user can ask the programming language at runtime what can be done with a CX object (functions, expressions, packages, etc.), and interactively or automatically choose one of the affordances to be applied. This paradigm has the main objective of providing an additional security layer for decentralized, blockchain-based applications, but can also be used for general purpose programming.

Installation

CX requires a Golang version of 1.15 or higher.

Binary Releases

You can find binary releases for most major systems on the release page.

Compiling on Linux

If you are using a apt compatible system, install the dependencies with"

sudo apt-get update

sudo apt-get install -y glade xvfb libxinerama-dev libxcursor-dev libxrandr-dev libgl1-mesa-dev libxi-dev libperl-dev libcairo2-dev libpango1.0-dev libglib2.0-dev libopenal-dev libxxf86vm-dev make

If you have not setup Golang on your machine, follow this guide to install and setup Go.

Download CX's repository using Go:

go get github.com/skycoin/cx

Get required Go dependencies with:

go get -u golang.org/x/mobile/cmd/gomobile
go get golang.org/x/mobile/gl 

Navigate to CX's repository.

Build CX's binary and install by running:

make build
make install
make test

Add the CX binary path to your operating system's $PATH. For example, in Linux:

export PATH=$PATH:$HOME/cx/bin

You should test your installation by running:

make test

Compiling on MacOS

If you have not setup Golang on your machine, follow this guide to install and setup Go.

If you do not have git installed, do so with:

brew install git

Download CX's repository using Go:

go get github.com/skycoin/cx

Navigate to CX's repository.

Build CX's binary and install by running:

make build
make install

Add the CX binary path to your operating system's $PATH. For example, in Linux:

export PATH=$PATH:$HOME/cx/bin

You should test your installation by running:

make test

Compiling on Windows

Compiling CX on Windows requires a recent version of Git to be installed.

Pacman is a utility which manages software packages.

To install pacman, download Mysys2 and run the installer.

When the installation is complete, click Run MSYS2 now.

If MSYS2 has already been installed, run it through the start menu.

You can run a full system upgrade and install required dependencies with:

pacman -Syu git mingw-w64-x86_64-openal base-devel mingw-w64-x86_64-toolchain

if [ ! -a /mingw64/lib/libOpenAL32.a ]; then ln -s /mingw64/lib/libopenal.a /mingw64/lib/libOpenAL32.a; fi

if [ ! -a /mingw64/lib/libOpenAL32.dll.a ]; then ln -s /mingw64/lib/libopenal.dll.a /mingw64/lib/libOpenAL32.dll.a; fi

You can compile CX by running:

cx-setup.bat

Test your installation by running:

cx lib/args.cx tests/main.cx ++wdir=tests ++disable-tests=issue

Updating CX

You can update your CX installation by running:

make install

Or on Windows:

cx-setup.bat

Resources and libraries

If you are interested in learning more about CX, please refer to the resources documentation.

If you want to get started with some basic example programs and tutorials check out the tutorials section.

The docs also provide a high level overview over the language.

Guide for cx compiler development

how to write cx wrapping libraty in Go Programming Language

cx's People

Contributors

amherag avatar archerixx avatar arfan499 avatar asahi3g avatar bigookie avatar canhdoan avatar cbrom avatar corpusc avatar diablo2050 avatar eliel00pendragon avatar eminyahyayev avatar evanlinjin avatar grondonanicolas avatar gz-c avatar hunzlahmalik avatar iketheadore avatar ingwal avatar ivankonevv avatar jcromerohdz avatar jdknives avatar junaidk avatar kenje4090 avatar liberxue avatar olemis avatar pratikdhanave avatar reewasssquared avatar rizary avatar skycoinsynth avatar stdevyuniers avatar yuniers 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.