Skip to content

Instantly share code, notes, and snippets.

@lassebenni
Created January 26, 2026 17:05
Show Gist options
  • Select an option

  • Save lassebenni/775e3f38218372cf3236a8b3d923a794 to your computer and use it in GitHub Desktop.

Select an option

Save lassebenni/775e3f38218372cf3236a8b3d923a794 to your computer and use it in GitHub Desktop.
Terminal Tutorial: Mutable Defaults
{"version":2,"width":80,"height":24,"timestamp":1769447098,"command":"python3 actor_mutable.py","env":{"SHELL":"/bin/zsh"}}
[1.258659, "o", "$ python3\r\n"]
[1.762907, "o", "Python 3.11.4 (main, Jun 7 2023, 10:13:09) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n"]
[2.766521, "o", ">>> "]
[3.26899, "o", "d"]
[3.306452, "o", "e"]
[3.351715, "o", "f"]
[3.389558, "o", " "]
[3.43161, "o", "a"]
[3.472787, "o", "d"]
[3.550287, "o", "d"]
[3.594073, "o", "_"]
[3.642258, "o", "s"]
[3.693168, "o", "t"]
[3.722131, "o", "u"]
[3.77994, "o", "d"]
[3.849664, "o", "e"]
[3.927242, "o", "n"]
[3.980422, "o", "t"]
[4.018317, "o", "("]
[4.070095, "o", "n"]
[4.106489, "o", "a"]
[4.177534, "o", "m"]
[4.204848, "o", "e"]
[4.23732, "o", ","]
[4.290712, "o", " "]
[4.340858, "o", "s"]
[4.388896, "o", "t"]
[4.453331, "o", "u"]
[4.478129, "o", "d"]
[4.505566, "o", "e"]
[4.560909, "o", "n"]
[4.616105, "o", "t"]
[4.642361, "o", "s"]
[4.715636, "o", "="]
[4.748959, "o", "["]
[4.7878, "o", "]"]
[4.829402, "o", ")"]
[4.853497, "o", ":"]
[4.920069, "o", "\r\n... "]
[4.991614, "o", " "]
[5.069004, "o", " "]
[5.116846, "o", " "]
[5.184746, "o", "s"]
[5.243686, "o", "t"]
[5.300803, "o", "u"]
[5.341313, "o", "d"]
[5.386746, "o", "e"]
[5.438263, "o", "n"]
[5.505642, "o", "t"]
[5.551396, "o", "s"]
[5.574303, "o", "."]
[5.64564, "o", "a"]
[5.705442, "o", "p"]
[5.743103, "o", "p"]
[5.814497, "o", "e"]
[5.856933, "o", "n"]
[5.900079, "o", "d"]
[5.959691, "o", "("]
[6.028059, "o", "n"]
[6.073532, "o", "a"]
[6.118579, "o", "m"]
[6.194206, "o", "e"]
[6.252357, "o", ")"]
[6.302169, "o", "\r\n... "]
[6.329228, "o", " "]
[6.386759, "o", " "]
[6.441361, "o", " "]
[6.52519, "o", "r"]
[6.604124, "o", "e"]
[6.633434, "o", "t"]
[6.676757, "o", "u"]
[6.70234, "o", "r"]
[6.756489, "o", "n"]
[6.796206, "o", " "]
[6.827361, "o", "s"]
[6.899831, "o", "t"]
[6.961783, "o", "u"]
[7.008484, "o", "d"]
[7.083921, "o", "e"]
[7.126768, "o", "n"]
[7.202189, "o", "t"]
[7.229619, "o", "s"]
[7.277307, "o", "\r\n... \r\n>>> "]
[7.778341, "o", "a"]
[7.855469, "o", "d"]
[7.904053, "o", "d"]
[7.97052, "o", "_"]
[8.005328, "o", "s"]
[8.068849, "o", "t"]
[8.140375, "o", "u"]
[8.18056, "o", "d"]
[8.240874, "o", "e"]
[8.318379, "o", "n"]
[8.361763, "o", "t"]
[8.438584, "o", "("]
[8.461141, "o", "\""]
[8.482842, "o", "A"]
[8.504793, "o", "l"]
[8.554746, "o", "i"]
[8.634788, "o", "c"]
[8.69736, "o", "e"]
[8.724453, "o", "\""]
[8.780984, "o", ")"]
[8.828276, "o", "\r\n"]
[9.028448, "o", "['Alice']\r\n>>> "]
[9.533735, "o", "a"]
[9.577073, "o", "d"]
[9.636124, "o", "d"]
[9.713263, "o", "_"]
[9.740911, "o", "s"]
[9.800782, "o", "t"]
[9.822315, "o", "u"]
[9.896347, "o", "d"]
[9.952908, "o", "e"]
[10.019361, "o", "n"]
[10.055704, "o", "t"]
[10.118307, "o", "("]
[10.183137, "o", "\""]
[10.223171, "o", "B"]
[10.289861, "o", "o"]
[10.338796, "o", "b"]
[10.401198, "o", "\""]
[10.431442, "o", ")"]
[10.471113, "o", "\r\n"]
[10.680841, "o", "['Alice', 'Bob']\r\n>>> "]
[11.682608, "o", "#"]
[11.75654, "o", " "]
[11.814755, "o", "W"]
[11.85332, "o", "a"]
[11.91064, "o", "i"]
[11.988139, "o", "t"]
[12.043671, "o", "."]
[12.080902, "o", "."]
[12.159457, "o", "."]
[12.222121, "o", " "]
[12.282922, "o", "A"]
[12.351692, "o", "l"]
[12.382797, "o", "i"]
[12.452694, "o", "c"]
[12.529185, "o", "e"]
[12.555967, "o", " "]
[12.594437, "o", "i"]
[12.639742, "o", "s"]
[12.733434, "o", " "]
[12.762123, "o", "s"]
[12.809422, "o", "t"]
[12.858541, "o", "i"]
[12.884203, "o", "l"]
[12.932163, "o", "l"]
[12.989316, "o", " "]
[13.055743, "o", "t"]
[13.110184, "o", "h"]
[13.162494, "o", "e"]
[13.220239, "o", "r"]
[13.260781, "o", "e"]
[13.287425, "o", "?"]
[13.314803, "o", "!"]
[13.356573, "o", "\r\n"]
[13.859937, "o", ">>> e"]
[13.917732, "o", "x"]
[13.984322, "o", "i"]
[14.053252, "o", "t"]
[14.090795, "o", "("]
[14.126539, "o", ")"]
[14.208549, "o", "\r\n"]
[14.224623, "x", "0"]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Terminal Tutorial: Mutable Defaults</title>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/asciinema-player@3.6.3/dist/bundle/asciinema-player.css" />
<style>
body { margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; background: #121212; color: #eee; font-family: sans-serif; }
#player { width: 100%; max-width: 900px; box-shadow: 0 4px 6px rgba(0,0,0,0.3); }
.error { color: #ff5555; text-align: center; padding: 20px; border: 1px solid #ff5555; border-radius: 4px; background: rgba(255,0,0,0.1); }
</style>
</head>
<body>
<div id="player"></div>
<script src="https://unpkg.com/asciinema-player@3.6.3/dist/bundle/asciinema-player.min.js"></script>
<script>
window.addEventListener('load', function() {
setTimeout(function() {
if (typeof AsciinemaPlayer === 'undefined') {
document.getElementById('player').innerHTML = '<div class="error"><strong>Error:</strong> AsciinemaPlayer failed to load.</div>';
return;
}
AsciinemaPlayer.create('mutable_defaults.cast', document.getElementById('player'), {
autoPlay: true, preload: true, rows: 15, cols: 81, theme: 'monokai', idleTimeLimit: 2
});
}, 100);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment