# \[ANN\] Replay.jl - Replay instructions

**URL:** <https://discourse.julialang.org/t/ann-replay-jl-replay-instructions/71655>\
**Category:** Package Announcements\
**Tags:** announcement, repl\
**Created:** [November 17, 2021, 12:29pm UTC](https://discourse.julialang.org/t/ann-replay-jl-replay-instructions/71655 "2021-11-17T12:29:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![terasakisatoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/terasakisatoshi/32/9187_2.png) [@terasakisatoshi](https://discourse.julialang.org/u/terasakisatoshi)\
**Post date:** [November 17, 2021, 12:29pm UTC](https://discourse.julialang.org/t/ann-replay-jl-replay-instructions/71655/1 "2021-11-17T12:29:30Z")

</div>

# 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 on Julia REPL etc… You are supposed to input your source code by hand line by line. Imagine that you type the following lines.

```julia-auto
julia> # Cau λon tλqe accnrately aub pnickly mithiu a giveu tiwe?
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

```

Without any mistakes, can you type accurately and quickly within a given time? To tell the truth, I could not do that… 😂

(Did we mention we should’ve initialized a screen recorder in advance?)

# Good news

I’m happy to announce the release of [Replay.jl](https://github.com/AtelierArith/Replay.jl).

Here is a demo that replays the substring of [Why We Created Julia](https://julialang.org/blog/2012/02/why-we-created-julia/).

![goma](https://global.discourse-cdn.com/julialang/original/3X/a/5/a57d0ae1f2e0412e33f1302a1e0545ee0e9a0f13.gif)  
[See also my youtube](https://www.youtube.com/watch?v=HNOK1sK-F3I)

More interesting examples can be found at [examples](https://github.com/AtelierArith/Replay.jl/tree/main/examples).

[https://user-images.githubusercontent.com/16760547/142200380-b5fa0eb6-49c0-477b-a16d-9465364c74e8.gif(image larger than 10 MB)](https://user-images.githubusercontent.com/16760547/142200380-b5fa0eb6-49c0-477b-a16d-9465364c74e8.gif)

# How to use

If [this PR](https://github.com/JuliaRegistries/General/pull/48882) is merged you can use Replay.jl via `] add Replay`. Then prepare a julia script something like:

```julia
# app.jl
using Replay
instructions = """
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(instructions)

```

and just execute `julia app.jl`.

Hope it helps, and enjoy your Julia life!

---

<div class="post-metadata">

**Author:** ![StevenSiew](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevensiew/32/218393_2.png) [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Post date:** [November 19, 2021, 9:46am UTC](https://discourse.julialang.org/t/ann-replay-jl-replay-instructions/71655/3 "2021-11-19T09:46:06Z")

</div>

Eh? How do I change the speed of the “fake” typing in the replay?

And the amount of delay between each line?

---

<div class="post-metadata">

**Author:** ![terasakisatoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/terasakisatoshi/32/9187_2.png) [@terasakisatoshi](https://discourse.julialang.org/u/terasakisatoshi)\
**Post date:** [November 19, 2021, 10:21am UTC](https://discourse.julialang.org/t/ann-replay-jl-replay-instructions/71655/4 "2021-11-19T10:21:20Z")

</div>

Currently, I do not provide an interface to achieve your wish.

However, you can control them by editing our source code here

[https://github.com/AtelierArith/Replay.jl/blob/0b054ae98b82d50aff283af43bf4e7e26b942279/src/Replay.jl#L31-L48](https://github.com/AtelierArith/Replay.jl/blob/0b054ae98b82d50aff283af43bf4e7e26b942279/src/Replay.jl#L31-L48)

and

here

[https://github.com/AtelierArith/Replay.jl/blob/main/src/Replay.jl#L110](https://github.com/AtelierArith/Replay.jl/blob/main/src/Replay.jl#L110)

---

<div class="post-metadata">

**Author:** ![terasakisatoshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/terasakisatoshi/32/9187_2.png) [@terasakisatoshi](https://discourse.julialang.org/u/terasakisatoshi)\
**Post date:** [November 20, 2021, 9:23am UTC](https://discourse.julialang.org/t/ann-replay-jl-replay-instructions/71655/5 "2021-11-20T09:23:29Z")

</div>

Good news!

We can install Replay.jl via:

```julia
pkg> add Replay

```
