All Projects → thesephist → maverick

thesephist / maverick

Licence: MIT license
Web IDE and REPL for the Ink programming language, written in pure Ink on a self-hosted compiler toolchain

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to maverick

klisp
A Lisp written in about 200 lines of Ink, featuring an interactive literate programming notebook
Stars: ✭ 28 (+7.69%)
Mutual labels:  repl, ink, torus-dom
merlot
Web based Markdown writing app built with isomorphic Ink and Torus
Stars: ✭ 145 (+457.69%)
Mutual labels:  torus-dom, ink-programming-language
inkbyexample
✒ A hands-on introduction to Ink using annotated example programs.
Stars: ✭ 18 (-30.77%)
Mutual labels:  ink, ink-programming-language
BuildPhp
php and web env manager for mac,include apache nginx php mysql memcached redis node with mutable version, and SSL make, file info... extend tools
Stars: ✭ 111 (+326.92%)
Mutual labels:  web-ide
ink-tab
Tab component for Ink 🌈
Stars: ✭ 87 (+234.62%)
Mutual labels:  ink
crosis
A JavaScript client that speaks Replit's container protocol
Stars: ✭ 85 (+226.92%)
Mutual labels:  repl
bspl
Bit-Shift-Print Loop
Stars: ✭ 17 (-34.62%)
Mutual labels:  repl
Codebot
Free and open source (MIT license) web-based IDE focused on game development.
Stars: ✭ 86 (+230.77%)
Mutual labels:  web-ide
go-notebook
Go-Notebook is inspired by Jupyter Project (link) in order to document Golang code.
Stars: ✭ 33 (+26.92%)
Mutual labels:  repl
elasticsearch-cli
Provides a REPL console-like interface to interact with Elasticsearch
Stars: ✭ 15 (-42.31%)
Mutual labels:  repl
dotnet-repl
A polyglot REPL built on .NET Interactive
Stars: ✭ 522 (+1907.69%)
Mutual labels:  repl
swiftreplmadness
Example of using your own packages in the Swift REPL
Stars: ✭ 18 (-30.77%)
Mutual labels:  repl
gorilla-repl
A fork of Jony Epsilon's rich REPL for Clojure in the notebook style.
Stars: ✭ 22 (-15.38%)
Mutual labels:  repl
Webide
Coding WebIDE Community Edition
Stars: ✭ 1,623 (+6142.31%)
Mutual labels:  web-ide
igcc
Interactive GCC - C/C++ REPL.
Stars: ✭ 38 (+46.15%)
Mutual labels:  repl
graphiql-storm
🌪 A GraphQl Web IDE
Stars: ✭ 111 (+326.92%)
Mutual labels:  web-ide
moleculer-repl
REPL module for Moleculer framework
Stars: ✭ 24 (-7.69%)
Mutual labels:  repl
c9.ide.theme.jett
Flat Material Look for Cloud9!
Stars: ✭ 26 (+0%)
Mutual labels:  web-ide
sliver
REPL for SilverStripe, powered by Psysh. Interactively debug and tinker with a sliver of your code.
Stars: ✭ 17 (-34.62%)
Mutual labels:  repl
fundot
The Fundot programming language.
Stars: ✭ 15 (-42.31%)
Mutual labels:  repl

Ink playground, "Maverick" 🦅

Maverick is a simple web IDE and REPL for the Ink programming language, written in pure Ink and built on a self-hosted September compiler toolchain that runs entirely in the browser. It compiles Ink code to JavaScript to run it locally without requiring a backend or a native execution environment, which is possible because the September compiler is used to compile the compiler itself to JavaScript bundled in the web app.

You can try the demo at play.dotink.co by running some included example programs.

Screenshot of Ink playground running a prime sieve program

Architecture

Maverick's primary goal is to enable anyone to write and experiment with Ink programs without installing anything on their system. I had developed a version of the playground before that was backed by a sever-side evaluation service, but I didn't feel very secure publishing a remote code execution service to the open Internet, for obvious reasons.

Maverick gets around this problem by compiling and running Ink programs entirely in the browser. This is possible because September, the Ink-to-JavaScript compiler, is compiled to JavaScript using itself. September then runs in the browser, and can compile other Ink programs to JavaScript programs and run them immediately in the browser using JavaScript's eval(). This has the unfortunate side-effect of Ink programs being able to introspect and modify the surrounding web application, but this isn't too much of an issue, because if anything breaks, you can just reload the page!

Outside of the compiler, Maverick is a simple single-page web application built using Torus.

REPL environment

Currently, Ink's module system does not work within September-compiled JavaScript bundles. So instead, these standard libraries are globally available in the REPL environment:

  • std
  • str
  • quicksort

For example, we can type in sort!(map([1, 2, 3], n => n * n)) to the REPL and execute it without importing std.

Development

Because Maverick depends significantly on the September compiler, the repository is designed to be cloned side-by-side to the thesephist/september repository. Maverick, during the build step, will reach inside the September repository next to it to compile it into JavaScript.

Maverick uses a Makefile for development and build tasks. Simply running make will re-compile all dependencies and the application, including the September compiler itself. it produces a static JavaScript bundle into static/ink/bundle.js. Other commands are as follows.

  • make watch
  • make fmt or make f formats all non-vendored source code, including tests.
  • make check or make t runs all tests.
  • There are several different build tasks, depending on what portion of the app you want to compile:
    • make build-libs compiles the common dependencies between September and Maverick into ink/lib.js
    • make build-september compiles the September compiler source from the directory ../september into ink/september.js
    • make build compiles the Maverick application itself into the final bundle, assuming that the dependencies and September itself have been compiled.
    • make watch or make w watches Maverick's source code for changes and recompiles them when they are changed. This is useful for iterating during development, and depends on entr.

Maverick is continuously deployed as a static site on Vercel, on every push to git branch main.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].