Coder Social home page Coder Social logo

License Java CI

VAlgoLang

VAlgoLang (formerly known as ManimDSL) is a domain specific language using Manim to create animations for data structures and algorithms.

Table of Contents:

Installation

VAlgoLang produces Python code that needs to run on Manim to generate the mp4 files. Please follow the documentation to install manim and follow the instructions according to your operating system.

Once manim is installed there are multiple ways to get VAlgoLang.

Mac OSX

VAlgoLang is avaliable on Homebrew using the instructions below:

    brew tap VAlgoLang/homebrew-valgolang
    brew install valgolang

Typing valgolang in your terminal should show give you access to the compiler.

Debian Based Systems

curl -sLO https://github.com/VAlgoLang/VAlgoLang/releases/download/latest/valgolang_1.0.SNAPSHOT-1_all.deb && sudo dpkg -i valgolang_1.0.SNAPSHOT-1_all.deb

Web Editor

If you do not want to install all the dependencies, you can use the web editor to write and compile code in VAlgoLang.

Building VAlgoLang Locally

To get started on your local machine, please do the following:

  1. Fork and clone the repository and open in your favourite editor. Since the interpreter is written in Kotlin, our choice is IntelliJ.
  2. Install Manim and its dependencies.
  3. Make changes to the compiler as you wish.
  4. Run the following command to build the JAR file for the compiler:
./gradlew build -x test

Remember that you'll need to do this every time you make a change and would like to see its effect.

  1. Run the following on a .val file to see whether your changes are working as expected:
./compile <your-file-name>.val

During development, it might be easier for you to read through the .py output file each time you make a change than to wait for Manim to generate a video. In this case, we recommend using the -p flag during compilation. For more on the command line arguments for VAlgoLang, see here.

Usage

Here is an example on how to use VAlgoLang:

    let stack = Stack<number>();
    stack.push(1);
    let x = stack.pop();

Save this file with the .val extension and run the compiler on it:

    java -jar valgolang.jar <your-file-name>.val out.mp4

This should save the animation to out.mp4, animating the stack with 1 being pushed and popped off the stack.

Documentation

Documentation is in progress at valgolang.github.io.

Contributing

We welcome all contributions! If you would like to contribute, please see the corresponding guidelines. By contributing, you are agreeing to our code of conduct.

VAlgoLang's Projects

valgolang icon valgolang

Domain Specific Language using Manim to create animations for data structures and algorithms

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.