Displaying Animated Snips in an IRacket Notebook

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 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:

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.

1 Like