Microblogging + Nbdev?

Can we flesh this idea out a bit more?

  1. How would it work?
  2. What kind of integration, exactly?
  3. How can we make things lightweight so you can quickly add notes, perhaps without having to open a notebook?
  4. Is this even a good idea?

One of my favorite microblogs are Simon Willison’s TILs https://til.simonwillison.net/

8 Likes

Okay, I’ve been wrapping my head on this since you first mentioned this idea to me and it’s growing and stirring.

From my personal framework, here’s how I’ve been operating:

  1. Test something out I’m working on
  2. Realize it’s useful, write a small isolated version in a Colab notebook
  3. Copy/Paste over to https://carbon.now.sh and send a tweet on it.

I love this idea of “scratch notebooks” that you just write in and it doesn’t get saved unless you decide it’s useful. It’s why I stay in colab for so long.

If I were to write out how I’d imagine it going in a cell, something like:

# topic python {potential_specific_page_thingy}
# export_carbon {configA} {configB}
import importlib
def is_mylib_available():
  return importlib.util.find_spec('mylib') is not None

You could then surround any documentation etc you want in markdown (maybe add another special tag in there to use), and then it gets converted, shoving it into a .py (with the markdown comments in the code!) + a documentation page, and finally a new clean notebook from your result.

Afterwards the “sandbox” notebook gets wiped for you to use again.

export_carbon in this case would make use of the carbon-now-cli to turn the snippet into a pretty picture for you to upload to twitter.

The key bits that are important for me to be able to use it:

  1. It has to be quick, from both starting and finishing
  2. Ideally it should have the concept of the scratchpad. This removes our “UntitledNotebook24.ipynb”
  3. If the topic is the same/subtopic then merge them together into a single notebook, organized by date.

Those are my immediate thoughts, open to any opinions on it but that’s how I’d probably want to use such a framework :slight_smile:

2 Likes