This demo shows how time travel works with immutable transactions in Project:M36-flavored TutorialD.
In this example session, we load Chris Date’s suppliers and parts example relation variables with :importexample date
.
Next, we view the s
relation variable and :commit
the change.
We update
the s
relation variable to change the name to “Brown” wherever the status
attribute is 10 (which happens to be only in one location). We display s
again to confirm that “Brown” does appear and :commit
the change to s
.
The :showgraph
directive displays our transaction graph as a relation. The current
attribute indicates which transaction we have checked out. By the following the parent relationship, we identify the middle transaction which does not contain the “Brown” update. The first transaction has no parent transactions and thus not of interest here.
We jump to the transaction identifier of the middle transaction and display s
again to confirm that indeed “Brown” is not visible in the relation variable’s contents.
Finally, we jump back to the head transaction of the master
branch and display s
one final time to confirm that “Brown” has been indeed updated in the head transaction of the master
branch.
Share this recording
Link
Append ?t=30
to start the playback at 30s, ?t=3:20
to start the playback at 3m 20s.
Embed image link
Use snippets below to display a screenshot linking to this recording.
Useful in places where scripts are not allowed (e.g. in a project's README file).
HTML:
Markdown:
Embed the player
If you're embedding on your own page or on a site which permits script tags, you can use the full player widget:
Paste the above script tag where you want the player to be displayed on your page.
See embedding docs for additional options.
Download this recording
You can download this recording in asciicast v1 format, as a .json file.
DownloadReplay in terminal
You can replay the downloaded recording in your terminal using the
asciinema play
command:
asciinema play 102015.json
If you don't have asciinema CLI installed then see installation instructions.
Use with stand-alone player on your website
Download asciinema player from
the releases page
(you only need .js
and .css
file), then use it like this:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="asciinema-player.css" />
</head>
<body>
<div id="player"></div>
<script src="asciinema-player.min.js"></script>
<script>
AsciinemaPlayer.create(
'/assets/102015.json',
document.getElementById('player'),
{ cols: 106, rows: 39 }
);
</script>
</body>
</html>
See asciinema player quick-start guide for full usage instructions.
Generate GIF from this recording
While this site doesn't provide GIF conversion at the moment, you can still do it yourself with the help of asciinema GIF generator utility - agg.
Once you have it installed, generate a GIF with the following command:
agg https://asciinema.org/a/102015 demo.gif
Or, if you already downloaded the recording file:
agg demo.cast demo.gif
Check agg --help
for all available options. You can change font
family and size, select color theme, adjust speed and more.
See agg manual for full usage instructions.