# Console Transcript Replay: I Want It

**URL:** <https://revolt.metaeducation.com/forum/t/console-transcript-replay-i-want-it/1711>\
**Category:** Console\
**Created:** [January 23, 2018, 11:54pm UTC](https://revolt.metaeducation.com/forum/t/console-transcript-replay-i-want-it/1711 "2018-01-23T23:54:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hostilefork](https://revolt.metaeducation.com/forum/user_avatar/revolt.metaeducation.com/hostilefork/32/421_2.png) [@hostilefork](https://revolt.metaeducation.com/forum/u/hostilefork)\
**Post date:** [January 23, 2018, 11:54pm UTC](https://revolt.metaeducation.com/forum/t/console-transcript-replay-i-want-it/1711/1 "2018-01-23T23:54:45Z")

</div>

_I'm moving this from a post I made that was tied up with suggestions about changing the prompt away from **`>>`** to make it more obviously taken as an asymmetric delimiter. This is an interesting feature which can be discussed in its own right..._

* * *

Let's imagine someone tells you they've set **x: 1** , and then have the following code:

```
>> x + 2
== 3

>> print "hi"
hi

```

Try pasting that today, say, in Red and you will get:

```
>> >> x + 2
*** Script Error: >> operator is missing an argument
*** Where: catch
*** Stack:  

>> == 3
*** Script Error: == operator is missing an argument
*** Where: catch
*** Stack:  

>> 
>> >> print "hi"
*** Script Error: >> operator is missing an argument
*** Where: catch
*** Stack:  

>> hi
*** Script Error: hi has no value
*** Where: catch
*** Stack:  

```

## But What If...

...imagine you could go on a website, drag across someone's transcript, and paste it right into your console unedited and have it run.

What I'm talking about is knowing that you are receiving a paste (either by virtue of an API that tells you, or just noticing that the rate at which lines are coming in is faster than a human types...a heuristic I have been meaning to implement so that lines are batched instead of intermixing with the output). And really being able to just paste a console transcript whole cloth, but have it respond by outputting its own complementary transcript.

So now let's say your transcript looked like:

```
>> x + 2
== 3

>> print "hi"
hi

```

So if you pasted it into an environment where you'd said **x: 10** it would take the data one line at a time, and \>\> would kick it over into a replay mode

```
>> x: 10
== 10

>> ; here you do the paste, it sees the >> and kicks over

[[TRANSCRIPT PASTE DETECTED]]
( to disable, see http://rebol.info/disable-transcript-paste-detection )

; >> x + 2
; == 3
;
; >> print "hi"
; == hi

[[REPLAYING TRANSCRIPT]]

>> x + 2
== 12

>> print "hi"
hi

```

## ...Heuristics, hmmm... 🧐

If we keep the current indicators for prompts, e.g. **`>>`** and **`==`** with **`** `** for errors, then we'd be making heuristic decisions here...since these are all things you can legally use elsewhere.

**==** is in common use today as an operator, though it rarely appears at the beginning of a line. I intend it to _not_ be an operator, but a divider of some kind. So it actually be contentious, because although == doesn't appear at the start of a line today, it would as a divider. So maybe plain equals, just off by one space?

```
>> x + 2
 = 12

```

Parity just looks confusing, don't think anyone would get used to it:

```
>> x + 2
<< 12

```

Anyway, now that I've outlined this feature, I want it yesterday. The value of such a feature may exceed the value of dedicating `<<x>>` as some new lexical type for MAP! or similar.

---

<div class="post-metadata">

**Author:** ![IngoHohmann](https://revolt.metaeducation.com/forum/user_avatar/revolt.metaeducation.com/ingohohmann/32/195_2.png) [@IngoHohmann](https://revolt.metaeducation.com/forum/u/IngoHohmann)\
**Post date:** [September 22, 2021, 10:06am UTC](https://revolt.metaeducation.com/forum/t/console-transcript-replay-i-want-it/1711/2 "2021-09-22T10:06:46Z")

</div>

It could also be interesting to have this work like a test, with an indication which value was in the transcript, and which value was computed in the session.
