All Projects → AtelierArith → Replay.jl

AtelierArith / Replay.jl

Licence: MIT license
Replay your REPL instructions

Programming Languages

julia
2034 projects

Labels

Projects that are alternatives of or similar to Replay.jl

robotframework-debuglibrary
A debug library for RobotFramework, which can be used as an interactive shell(REPL) also.
Stars: ✭ 96 (+300%)
Mutual labels:  repl
integrant-repl
Reloaded workflow functions for Integrant
Stars: ✭ 115 (+379.17%)
Mutual labels:  repl
ws-repl
MIGRATED TO https://vcs.rowanthorpe.com/rowan/ws-repl - THIS IS AN ARCHIVED VERSION... Arbitrary REPL in a web-page using websocketd
Stars: ✭ 38 (+58.33%)
Mutual labels:  repl
tinker-zero
Bridge laravel/tinker for your laravel-zero applications
Stars: ✭ 39 (+62.5%)
Mutual labels:  repl
Nota
A calculator with a beautiful interface for the Terminal, Including unicode-based charting and rich mathematical notation rendering
Stars: ✭ 45 (+87.5%)
Mutual labels:  repl
NeoConsole
NeoConsole offers a command line (REPL) interface to a Pharo image, as well as other tools.
Stars: ✭ 22 (-8.33%)
Mutual labels:  repl
d3-fdg-svelte
d3 Force Directed Graph example (d3-force) implemented in sveltejs. REPL:
Stars: ✭ 31 (+29.17%)
Mutual labels:  repl
huginn
Programming language with no quirks, so simple every child can master it.
Stars: ✭ 41 (+70.83%)
Mutual labels:  repl
ol
Otus Lisp (Ol in short) is a purely* functional dialect of Lisp.
Stars: ✭ 157 (+554.17%)
Mutual labels:  repl
lambda
lambda calculus interpreter
Stars: ✭ 23 (-4.17%)
Mutual labels:  repl
all-seeing-bot
Repl.it discord moderation bot
Stars: ✭ 73 (+204.17%)
Mutual labels:  repl
java-sheets
☕ Run Java Snippets in your Browser
Stars: ✭ 19 (-20.83%)
Mutual labels:  repl
JShellStandalone
Provides a standalone version of the JShell REPL. Anything needed to run JShell independently is contained, so there is no need to install the full JDK. A minimal Java runtime is embedded and compressed using the jlink tool.
Stars: ✭ 36 (+50%)
Mutual labels:  repl
cicada
Cicada Language
Stars: ✭ 9 (-62.5%)
Mutual labels:  repl
nodeScratchpad
Evaluate Nodejs Code Snippets From Menubar! 💻
Stars: ✭ 102 (+325%)
Mutual labels:  repl
composer-repl
A REPL for PHP built into Composer (using PsySH)
Stars: ✭ 81 (+237.5%)
Mutual labels:  repl
scope-capture-nrepl
nREPL middleware for scope-capture
Stars: ✭ 27 (+12.5%)
Mutual labels:  repl
vue-code-view
A Vue 2 component like Vue SFC REPL `@vue/repl` : u can edit, run and preview the code effect display in real time on the web page.
Stars: ✭ 67 (+179.17%)
Mutual labels:  repl
nim-noise
Nim implementation of linenoise command line editor
Stars: ✭ 45 (+87.5%)
Mutual labels:  repl
replbot
Slack/Discord bot for running interactive REPLs and shells from a chat.
Stars: ✭ 169 (+604.17%)
Mutual labels:  repl

Replay

CI Dev

Replay your REPL instructions something like this:

asciicast

Introduction

Let’s assume you have to record your screen to explain something about Julia topics e.g. how to use REPL, how to use your great package in Julia REPL etc… You are supposed to input your source code by hand line by line. Imagine that you type the following lines.

julia> 2+2
julia> print("")
julia> display([1])
julia> display([1 2; 3 4])
julia> @time 1+1
julia> using Pkg; Pkg.activate(".")
pkg> add Example
pkg> rm Example
pkg> st

Should we type them one by one using your fingers? We are too lazy to do. Don't worry! Our package Replay.jl saves your life!

Usage

$ git clone https://github.com/AtelierArith/Replay.jl.git
$ cd Replay.jl
$ cat ./examples/readme/app.jl
using Replay

repl_script = """
2+2
print("")
display([1])
display([1 2; 3 4])
@time 1+1
using Pkg; Pkg.activate(".")
]add Example
rm Example
st
$CTRL_C
"""

replay(repl_script, stdout, julia_project=@__DIR__, use_ghostwriter=true, cmd="--color=yes")
$ julia --project=@. -e 'using Pkg; Pkg.instantiate()'
$ julia --project=@. ./examples/readme/app.jl
$ # Below is optional
$ asciinema rec result.cast --command "julia --project=@. ./examples/readme/app.jl"
$ asciinema play result.cast

asciicast

You can redirect the output of the program into a file:

$ julia --project=@. ./examples/helloworld/app.jl > output.txt
$ cat output.txt

Tips: you can set replay(instructions; cmd="--color=no") as necessary.

$ julia examples/disable_color/app.jl > output.txt
$ cat output.txt

Record instructions using asciinema

  • asciinema is a free and open source solution for recording terminal sessions and sharing them on the web. It can be used in combination with Replay.jl with the following commands:
$ pip3 install asciinema # install `asciinema`
$ asciinema rec output.cast --command "julia examples/helloworld/app.jl"
$ asciinema play output.cast

See This issue to learn more.

Examples

  • We provide several examples to testout our Package.
$ tree examples
examples
├── disable_color
│   └── app.jl
├── helloworld
│   └── app.jl
├── imageinterminal
│   ├── Project.toml
│   └── app.jl
├── iris
│   ├── Project.toml
│   └── app.jl
├── ohmyrepl
│   ├── Project.toml
│   └── app.jl
├── plots_with_sixel
│   ├── Project.toml
│   └── app.jl
├── quietmode
│   └── app.jl
├── readme
│   ├── Project.toml
│   └── app.jl
├── sixel
│   ├── Project.toml
│   └── app.jl
├── unicodefun
│   ├── Project.toml
│   └── app.jl
├── unicodeplots
│   ├── Project.toml
│   └── app.jl
├── unicodeplots_animated
│   ├── Project.toml
│   └── app.jl
└── use_ghostwriter
    └── app.jl

Breaking Change

  • The internal logic of the program has been changed to stabilize its operation. As a side effect, we had to make some destructive changes to the API.
  • Note that color kwarg of replay is removed since v0.4.x . Use cmd="--color=yes" or cmd="--color=no" instead.

Restriction

  • Replay.jl does not work on Windows. Please use WSL2 instead.

Acknowledgements

Replay.jl is based on

The idea of how to replay julia session comes from

@hyrodium san provided an excellent logo for our package.

Appendix

Blog post

YouTube

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].