Hacker News new | ask | show | jobs
by aaplok 456 days ago
Thanks, this is a good read. I did not know MyST, it is very cool.

The vim plugin I was talking about was vim-slime [0], which seems to date from 2007 and does have regions delimited with #%%.

Slime comes from Emacs originally, but I could not find if the original Emacs slime has regions.

Matlab also has those, which they call code sections [1]. Hard to find when they were introduced. Maybe 2021, but I suspect older.

None of those stores gge output of the command.

[0] https://vimawesome.com/plugin/vim-slime

[1] https://www.mathworks.com/help/matlab/matlab_prog/create-and...

1 comments

The Spyder docs list other implementations of the percent format for notebooks as markdown and for delimiting runnable blocks within source code:

  # %%

  "^# %%"
Org-mode was released in 2003: https://en.wikipedia.org/wiki/Org-mode

Org-mode supports code blocks: https://orgmode.org/manual/Structure-of-Code-Blocks.html :

  #+BEGIN_SRC <language> and 
  #+END_SRC. 
Literate programming; LaTeX: https://en.wikipedia.org/wiki/Literate_programming

Notebook interface; Markdown + MathTeX: https://en.wikipedia.org/wiki/Notebook_interface ;

  $ \delta_{2 3 4} = 5 $

  $$ \Delta_\text{3 4 5} = 56 $$