Code Monkey home page Code Monkey logo

dinosaur's Introduction

dinosaur

status: working but parked, use it in your browser

A training tool that gets you to write code like a dinosaur.

Concept

  • User picks a language
  • User is presented w/ 2 panes; editor and live feed to their code being executed
  • User makes changes to code to achieve some goal

Ideas

I don't really know what the goals will be yet, but I'm thinking about about multiplayer challenges- something like:

  • Two players need to exchange some messages with each other
  • Two players need to complete a set of calculations (over a series of messages) and each player can only see the odd or even half of the steps
  • Two or more players need to develop a decentralised chat system (discovery etc) without knowing who's out there
  • Same as above, but now there are adversaries (also players) actively trying to hinder the other players

Ultra hard mode would be players on the same team need to discover and communicate with each other using only the code in front of them; in the case where there are adversaries there'd be a whole element of validating that the person you're talking to is a teammate, not an adversary.

Architecture

Flows

  • Frontend makes a GET request to the backend to be allocated a session
  • Frontend mounts Shell component that gives the live feed of the gotty session (just as an iframe)
  • User makes edits in Editor component
  • Editor component text POST'd to Backend
  • entr in Backend re-runs code process
  • Shell component in frontend continues to display live feed

TODO

  • Ability to group sessions together / isolate them from other groups
  • Record all the packets and interactions for a group with timestamps

How to run it

Prerequisites

Steps

Build and run in the foreground

make  # will block and teardown on Ctrl + C

Build and run in the background

make up
make logs  # optional
make down  # teardown

How to use it

Once you've got the services up and running, navigate to http://localhost/ to see the frontend and select a language to play with.

You can also navigate directly to a particular language, e.g. http://localhost/?language=rust.

You can also share a session by navigating to it's URL in another browser window; e.g http://localhost/?language=rust&session_uuid=(some_uuid)

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.