Giter Club home page Giter Club logo

comp_iler's Introduction

Comp_iler

Sandboxed code execution discord bot.

Invite the bot!
Not all languages are enabled on the public bot.

Usage

>```cpp
#include <iostream>

int main()
{
    std::cout << "Hello World!" << std::endl;
}
```
>`py print('hello world')`

Supported Languages and Options

One of the following language codes is set in lang.
You can see all the possible codes using the languages command in the bot.

  • apl APL
  • bash Bash
  • bf Brainfuck
  • c C
  • clj Clojure
  • cpp C++
  • cs C#
  • elixir Elixir
  • fs F#
  • go Go
  • hs Haskell
  • idr Idris
  • java Java
  • js JavaScript
  • julia Julia
  • lisp Racket
  • lua Lua
  • ocaml OCaml
  • pas Pascal
  • php PHP
  • pl Perl5
  • prolog Prolog
  • py Python
  • rb Ruby
  • rs Rust

How it Works

For every language there is a docker image which spins up a docker container.
The container is used for all evaluations of code, restarting if something goes wrong.
The container is locked down, so there is no networking, limited memory and CPU usage, and a time limit.

Setup

  1. Install Docker 18+
  2. Install Node 10+
  3. Install Myriad
    • This will require GHC and Cabal.
    • You will also have to configure Myriad, see its repository.
  4. Fill out config.json
    • owner The owner(s) of the bot. Use an array for multiple owners.
    • token The bot token.
    • prefix The prefix for commands.
    • codePrefix The prefix for code evaluation.
    • myriad The port that Myriad is running on.
  5. Run npm i

Running

  1. Run myriad --config /path/to/config.dhall --languages /path/to/languages/
  2. Run node .

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.