# Displaying Animated Snips in an IRacket Notebook

**URL:** <https://racket.discourse.group/t/displaying-animated-snips-in-an-iracket-notebook/2985>\
**Category:** Questions & Answers\
**Tags:** iracket, snips\
**Created:** [June 28, 2024, 11:30am UTC](https://racket.discourse.group/t/displaying-animated-snips-in-an-iracket-notebook/2985 "2024-06-28T11:30:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bakgatviooldoos](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/bakgatviooldoos/32/1381_2.png) [@bakgatviooldoos](https://racket.discourse.group/u/bakgatviooldoos)\
**Post date:** [June 28, 2024, 11:30am UTC](https://racket.discourse.group/t/displaying-animated-snips-in-an-iracket-notebook/2985/1 "2024-06-28T11:30:54Z")

</div>

Hi, Racket Discourse.

I am currently playing around with `iracket` and `jupyter` notebooks. Such fun!

I would like to structure the notebook I am busy with in the vein of the Advent of Code puzzles, where you are taken through a sequence of expository sections and then see the problems being solved as you go along; but in particular the _narrative_ mode of communication, as if the reader were a "player" in the game of solving the problem, is what I am aiming for.

So, I thought of using _moving pictures_ to help convey this aesthetic. Thanks to @alexh's wonderful exposition on the animated snips in his [space invaders](https://alex-hhh.github.io/2020/11/space-invaders.html) post, it was easy to get a mock-up working normally.

Obviously, this can't be copy-pasted straight into the notebook (if at all), after running which I receive the error:

```scheme
instantiate-linklet: mismatch;
 reference to a variable that is uninitialized
  name: add-editor-keymap-functions
  exporting instance: "C:\Program Files\Racket\share\pkgs\gui-lib\mred\private\wxme\editor.rkt"
  importing instance: "C:\Program Files\Racket\share\pkgs\gui-lib\mred\private\wxme\text.rkt"
  possible reason: modules need to be recompiled because dependencies changed
  possible solution: running `racket -y`, `raco make`, or `raco setup`
  context...:
   body of "C:\Program Files\Racket\share\pkgs\gui-lib\mred\private\wxme\text.rkt"
   body of top-level
   C:\Program Files\Racket\share\pkgs\sandbox-lib\racket\sandbox.rkt:710:9: loop

```

I assume (vaguely) that this happens for the same reason I can't use `plot` but instead `plot/bitmap` in notebooks? And if so, is there a way this can be achieved, or am I barking up the wrong tree?

* * *

Edit: I assume I could do something GIF-like, in the sense of generating a GIF from the snips, but I might as well ask if the first prize is available.
