Skip to content

Instantly share code, notes, and snippets.

@blink1073
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blink1073/dc22f0b4d0c664d10e6c to your computer and use it in GitHub Desktop.
Save blink1073/dc22f0b4d0c664d10e6c to your computer and use it in GitHub Desktop.
MetaKernel Magic Spec
  • A line must start with a magic in order to be interpreted as a magic.

  • Magics can be nested within a line

  • Magics can return any object they like (but it should be JSON-dumpable)

  • If no valid magic is found, the block will be considered code and handled by the kernel.

  • Help magic is special:

    • It can be at the end of the line and takes precedence.
    • No code is executed when a help magic is present.

How do we handle mixed cells, like this:

a = 1; 
%download somefile.txt
b = 2;
!ls -a
%%octave
a = 1;
%set b !ls -a
c = 2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment