Spaced repetition - Neuron

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

Sridhar Ratnakumar

contd from here

Funny you mention spaced repetition, because I was thinking about it yesterday. Wondering if it can be implemented as some sort of 'plugin' mechanism in neuron.

Sridhar Ratnakumar

At minimum, I want to review N number of notes every day, each note having a 'next_review_date' YAML field that gets updated based on the spaced repetition algorithm.

NullSense

Sridhar Ratnakumar said:

At minimum, I want to review N number of notes every day, each note having a 'next_review_date' YAML field that gets updated based on the spaced repetition algorithm.

I think the best approach in this case would just be adding minimal syntax on top (maybe even how remnote.io does it) so that it can be easily decomposable.

The Best Way to Remember and Organize What You Learn
Sridhar Ratnakumar

What sort of minimal syntax? Do you have a specific proposal?

NullSense

so how remnote does it is just text::hidden-text

Sridhar Ratnakumar

I'm not at all familiar with Remnote.

Sridhar Ratnakumar

In neuron, all notes are in Markdown with a YAML block.

Sridhar Ratnakumar

I proposed that we implement this as a plugin, and have the plugin inject the 'next_review' value into the YAML metadata, with perhaps some structure expectation for hidden text (like a heading with {.flashcard-hidden} commonmark attribute)

Sridhar Ratnakumar

So when you show text::hidden-text as a demonstration of the minimal syntax you were referring to above, I have no idea how that translates to the neuron model.

Sridhar Ratnakumar

It would be nice to have a detailed proposal written up on GitHub.

Sridhar Ratnakumar

See https://github.com/srid/neuron/issues/176

Explain how to add custom HTML attributes to the various elements, including images. For example, ![](https://srid.keybase.pub/me.jpeg){#avatar .ui .left .floated .small .image} Also reference Sema...
Sridhar Ratnakumar

So we could create a flash card like this:

# Year length

What is the total number of months in a year?

::: {.flashcard-hidden}
12 months, unless you are from a parallel universe.
:::

This syntax is already supported by neuron, btw. See https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/fenced_divs.md

Pure Haskell commonmark parsing library, designed to be flexible and extensible - jgm/commonmark-hs
Sridhar Ratnakumar

That syntax creates a div with class=flashcard-hidden. But the plugin can use that and 'hide' it when showing the card during review stage.

Sridhar Ratnakumar

Piggybacking on existing commonmark extensions like this is really nice, because you get to use just text and HTML without introducing any custom syntax.

NullSense

That sounds like a good idea. I would highly encourage you to try both Obsidian and Remnote for inspiration, they are both excellent, just with a different structure software wise.

Sridhar Ratnakumar

Yup, several tools to get inspired from. Lots of idea space to explore in regards to representing structured content in plain-text ...

Sridhar Ratnakumar

(Plain-text stored locally or in Git repo, that is).

Nadrieril

Oh yaaaay I've been wanting that too

Nadrieril

I feel there's two different things: a zettel and a flashcard. I expect that a single zettel might contain many flashcards, or none. Not least because of close deletion. I like the syntax that Andy has for it: https://notes.andymatuschak.org/z5ARNXtS5VxteskEW91S1yYTgAcLABNXsZuJE

Nadrieril

The way he does it is that each Q/A block and cloze deletion block gets hashed to get a unique id and the next review date is stored in a separate database. I don't feel like storing that in the YAML is very clean

Nadrieril

One other reason to store review dates separately: in a community zettelkasten, people will want to each have their review state

Sridhar Ratnakumar

So a separate file (per-user) in the git repo?

Sridhar Ratnakumar

I'm taking Cerveau into consideration as well, which could as well support the plugin mechanism, but with web app functionality on top. And since it uses Git as storage, it would make sense to store the 'plugin data' in Git as well.

Sridhar Ratnakumar

(On the CLI side, it would be the same local file that gets updated)

Nadrieril

Hmm, I was thinking that learning from a zettelkasten shouldn't require write access to it

Sridhar Ratnakumar

Community flashcards. That's one rad idea.

Nadrieril

The idea I see is something like https://quantum.country : an online flashcard-aided learning resource

A free introduction to quantum computing and quantum mechanics
Nadrieril

A group of people curates a set of flashcards and anyone can use them to learn

Nadrieril

It's getting a bit out of scope for neuron though ^^

Sridhar Ratnakumar

Not out of scope as a decoupled plugin though.

Sridhar Ratnakumar

The idea is to make it possible to create "mini apps" of some sort that piggyback on neuron's "future-proof" philosophy. And allow you to do things using just plain-text and local storage (or git).

Nadrieril

There's a clear separation of concerns here: one the one hand extracting flashcards from whatever (here neuron zettels) and on the other a spaced repetition system with per-user state

Sridhar Ratnakumar

Right, as long as IDs stay consistent between the two places.

Nadrieril

The ideal would be a federated protocol for spaced repetition where you can add cards from many websites into your hub :3

Sridhar Ratnakumar

For zettel IDs this is straightforward. Not so much for individual sections in a zettel.

Nadrieril

Yeah indeed... But just cloze deletion already makes it difficult to limit to one flashcard per zettel :/

Nadrieril

Having something like <zettel id>/<0-based index in the zettel> might be good enough for many usecases, as long as the user can override ids when they add/remove flashcards or clozes

Nadrieril

A related but rather different use of spaced repetition would be to regularly prompt you with incomplete notes so that you can add to them. Andy describes this here: https://notes.andymatuschak.org/z7iCjRziX6V6unNWL81yc2dJicpRw2Cpp9MfQ

Nadrieril

Vaguely related: it'd be nice in the cerveau interface/LSP plugin to have a shortcut to create an empty note with the current selection as title. To quote this, "Adding a empty “[to complete] note” is better than simply not adding a note in a couple of ways.". Then spaced repetition would remind you to add content to that empty note

When you get stuck on your next writing project wouldn’t be great to have a partner who could quickly help you work through the stuck…
Sridhar Ratnakumar

That would be a more important use case for a spaced repetition neuron plugin. I myself need it.

NullSense

I think this is where a plugin system like obsidian's would shine. Perhaps making the project into an organization where everything is separate (plugins, cerveau, neuron, LSP, editor plugins) would be a good idea?