• Stars
    star
    228
  • Rank 175,267 (Top 4 %)
  • Language
    Emacs Lisp
  • Created about 8 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple and fast flashcards for Emacs

Intro

Pamparam is a new spaced repetition (SR) memory cards implementation for Emacs.

Spaced repetition is an algorithm for learning and repeating cards. Cards for which you get high scores get scheduled for repetition much further into the future than those with low scores. This means you spend less time repeating things that are easy for you to remember and more time on things which are hard for you to remember.

Quickstart

git clone https://github.com/abo-abo/pamparam
  1. Open pamparam/doc/sets/capitals/capitals.org and call pamparam-sync.

    You get a message like 35 new cards, 0 updated, 35 total and the file pampile.org is opened.

  2. Call pamparam-drill.

    You get two buffers. One buffer, named e.g. pam-2017-04-23.org is your schedule file. It holds 10 cards that you should do today. The other buffer is a card asking you the capital of e.g. Estonia.

  3. Enter Tallinn. (the dot at the end starts the card validation)

    Since the answer is correct, you get a score of 5 (best one). Alternatively, if you reveal the answer with S-TAB and enter Tallinn., you will get only a score of 3. Finally, if you enter a wrong answer, you get a score of 0.

  4. Theoretically, you can stop here with 1/10 cards done. Resume at any later stage with pamparam-drill. Or press n (calls pamparam-drill) to select the next card. Any cards scheduled today but not finished will carry over to tomorrow.

Assuming you finished all 10 cards, what’s next?

  • (optional) call pamparam-commit to commit your progress.

    It’s not really required, but it’s neat to track everything, and it’s a nice restore point if you ever mess up your repo.

  • if you feel like doing more cards, call pamparam-pull.

    I don’t recommend doing more than 50 cards in a day, because you’ll be spending a lot of time on repetition in the future.

  • come back tomorrow for a new set of cards to repeat and learn.

How this works

Terminology

After pamparam-sync and pamparam-drill, you get the following tree:

.
├── capitals.org
└── capitals.pam
    ├── cards
    │   ├── 00
    │   │   └── 00247297c394dd443dc97067830c35f4-a606fe014370d8c520a07f30df46ef10.org
    │   ├── 01
    │   │   └── 01a151debf2bfee8906f43f4342eb10b-654cd76590cebe0ba37e8d4cce8a96ee.org
    │       ... (more cards) ...
    ├── pam-2017-04-23.org
    ├── pam-2017-04-24.org
    └── pampile.org

With this example, let’s get the terminology out of the way:

Master file
e.g. capitals.org,

This is an Org file that has a heading tagged with :cards: that contains the definition of all your cards.

Card file
e.g. capitals.pam/cards/00/00247297c394dd443dc97067830c35f4-a606fe014370d8c520a07f30df46ef10.org

This is an Org file that encapsulates a single card. Besides the front (the question) and the body (the answer), it also contains the metadata. The metadata contains: dates and scores of previous learning sessions with this card and the card’s accumulated ease factor.

Schedule file
e.g. capitals.pam/pam-2017-04-23.org

This is an Org file that stores the schedule for a particular day as TODO items with links to card files. Each item’s state starts at TODO and ends at DONE which you finish the corresponding card. An intermediate state REVIEW happens if you get a score lower than 5 for the first time. When doing the card for the second time, REVIEW becomes DONE with a score of 3 or more.

Pile file
capitals.pam/pampile.org

This is your cards pile. Very similar to a schedule file, it holds all cards that are not yet scheduled. There are two ways to interact with your pile: add to it by calling pamparam-sync from the master file or remove from it by calling pamparam-pull.

Repo
capitals.pam

A Git repository to store all your cards files, schedules, and the pile. Note that the master file isn’t here. This is intentional, since any of your existing Org can become a master file simply by adding a :cards: tag to one of the outlines. See pamparam-alist for a way to connect a master file to a repo that’s not in the same directory.

Master file example

A master file is an Org-mode file with things you want to learn.

One simple example is provided in capitals.org.

Here’s another, slightly more elaborate, example, which I use for learning Dutch:

* Cards            :cards:
** comic story
het stripverhal
*** The Adventures of Tintin is a world famous Belgian comic strip.
De Avonturen van Kuifje is een wereldbekend Belgisch stripverhaal.

** singer
de zanger
de zangeres
*** The singer is only known in Belgium.
De zangeres is alleen in België bekend.

The format of the master file is fairly straightforward:

  1. There needs to be one or more card sources - first level outlines marked with the :cards: tag. A separate card file will be created for every second or third level child of each card source. In the example above, four cards will be created.
  2. For each second or third level outline, the heading name is the question and the heading body is the answer. I usually put e.g. a noun or a verb into the second level, and a more elaborate example of using that noun or a verb into the child third level. I also like to organize the words by generation rules and thematically, so that e.g. honest will be close to modest and very close to honesty.

    The only hard and enforced requirement is that all heading names must be unique.

  3. If a word has many correct possibilities (like de zanger and de zangeres both mean singer), I put each on its own line. This allows to enter either synonym during validation.

The master file is a great summary of the info that you have available. It’s easy to search and organize.

One more option is to put all cards as level one headings. In that case, instead of tagging them with :cards:, you can add to the top of the file:

#+PROPERTY: pamparam t

Card file example

A card file looks like this:

* m
#+STARTUP: content
** scores
| <2017-04-23> | 3 |   |
** stats
(setq ease-factor 2.360000)
(setq intervals '(1))
* Slovenia
Ljubljana

The first heading holds all the metadata, like:

  • all times and scores when you did a card
  • your wrong answers, if any
  • an estimate of the card’s ease

The second heading’s name is the card’s front, the question. The second heading’s body is the anwer, it starts out hidden.

Card scoring

scoremeaning
5perfect answer, body hidden
4wrong answer, pamparam-card-redo was called, followed by a perfect answer
3perfect answer, body revealed
0wrong answer

On the first try, you can get either a 5 or a 3 or a 0. Unless you get a 5, you have to REVIEW the card today.

You can use pamparam-card-redo if you make a mechanical typo and get a 0, even though you knew the card. If you manage to correct the typo, you get a 4. You can make use of C-y to yank your previous answer.

In the REVIEW stage, entering the answer with body revealed is acceptable to move it to DONE. Still, you might want to try to keep the body hidden.

Commands and key bindings

Certain commands are applicable only in certain types of files. There are 3 types of files, all of which use org-mode: master, card and schedule.

Card file

Global bindings:

.pamparam-card-validate-maybe

Local bindings (only active if your point is at a heading start), in order of importance:

npamparam-drill
qbury-buffer
Rpamparam-card-redo
Dpamparam-card-delete

Master file

pamparam-sync

Anywhere in the repo

pamparam-drill
pamparam-pull
pamparam-commit

Customization

While it’s possible to have multiple repos, currently I have only a single one. In my case, it’s not convenient to keep the repo dutch.pam in the same directory as the master file dutch.org. So I use this setting:

(setq pamparam-alist
      '(("/home/oleh/Dropbox/org/wiki/dutch.org"
         . "/home/oleh/Dropbox/source/site-lisp/git/dutch.pam")))

pamparam-drill doesn’t know where your repos are located. It can only determine if the current buffer’s file belongs to a repo or not. In case it does, the current repo is used. Otherwise, the default repo is used which is pointed to by pamparam-path.

By default, pamparam-path points to the repo of the provided example master file. Here’s my custom setting:

(setq pamparam-path "/home/oleh/Dropbox/source/site-lisp/git/dutch.pam")

Finally, you can have all key bindings in one place with a hydra:

(global-set-key (kbd "C-c m") 'hydra-pam/body)

More Repositories

1

swiper

Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!
Emacs Lisp
2,284
star
2

hydra

make Emacs bindings that stick around
Emacs Lisp
1,818
star
3

avy

Jump to things in Emacs tree-style
Emacs Lisp
1,704
star
4

lispy

Short and sweet LISP editing
Emacs Lisp
1,195
star
5

org-download

Drag and drop images to Emacs org-mode
Emacs Lisp
1,055
star
6

ace-window

Quickly switch windows in Emacs
Emacs Lisp
968
star
7

oremacs

My Emacs config
Emacs Lisp
296
star
8

auto-yasnippet

quickly create disposable yasnippets
Emacs Lisp
243
star
9

ace-link

Quickly follow links in Emacs
Emacs Lisp
210
star
10

lpy

Minimal Python IDE for GNU Emacs
Emacs Lisp
185
star
11

define-word

Display the definition of word at point in Emacs
Emacs Lisp
154
star
12

tiny

Quickly generate linear ranges in Emacs
Emacs Lisp
143
star
13

worf

vi-like bindings for org-mode
Emacs Lisp
132
star
14

function-args

C++ completion for GNU Emacs
Emacs Lisp
120
star
15

orca

ORg CApture
Emacs Lisp
104
star
16

swiper-helm

Helm version of swiper
Emacs Lisp
79
star
17

helm-make

Select a Makefile target with helm.
Emacs Lisp
62
star
18

plain-org-wiki

Simple jump-to-org-files in a directory package
Emacs Lisp
53
star
19

make-it-so

Transform files with Makefile recipes
Emacs Lisp
47
star
20

org-fu

My org-capture and org-protocol setup
Emacs Lisp
37
star
21

cook

Makefile -> Cookbook.py
Python
36
star
22

whicher

Audit and install the programs that your Emacs config depends on
Emacs Lisp
23
star
23

eclipse-theme

Eclipse theme for Emacs
Emacs Lisp
21
star
24

orly

Additional Org-mode link types and completion for them
Emacs Lisp
18
star
25

helm-j-cheatsheet

Quick J reference for Emacs
Emacs Lisp
17
star
26

zoutline

Emacs library for outlines
Emacs Lisp
16
star
27

gtk-pomodoro-indicator

A simple pomodoro indicator for Unity/GTK tray
Python
16
star
28

elf-mode

Show symbol list when opening a binary file in Emacs
Emacs Lisp
13
star
29

matlab-mode

My fork of matlab-mode
Emacs Lisp
13
star
30

short-lambda

Clojure-style anonymous function literal for Elisp
Emacs Lisp
12
star
31

centimacro

Assign multiple macros as global key bindings in Emacs
Emacs Lisp
12
star
32

xlx

XML <-> LISP converter
Common Lisp
11
star
33

eltex

Write LaTeX in Emacs Lisp
Emacs Lisp
10
star
34

headlong

reckless completion for Emacs
Emacs Lisp
10
star
35

semimap

.Xmodmap that uses semicolon as a modifier
8
star
36

dired-guess

Associate file extensions with programs that can open them for dired
Emacs Lisp
8
star
37

cc-chainsaw

A few tricks to make c++-mode go
Emacs Lisp
7
star
38

ukrainian-holidays

Ukrainian holidays for Emacs calendar
Emacs Lisp
7
star
39

org-mode

http://orgmode.org/org-mode.git
Emacs Lisp
6
star
40

profile-dotemacs

My mirror of http://www.randomsample.de/profile-dotemacs.el
Emacs Lisp
6
star
41

abel

abbrevs for Elisp
Emacs Lisp
5
star
42

touchpad

Toggle touchpad on/off
Python
5
star
43

cedet

My mirror of CEDET (http://cedet.sourceforge.net/).
Emacs Lisp
5
star
44

abo-abo.github.io

HTML
4
star
45

ido-occasional

Use ido where you choose
Emacs Lisp
4
star
46

netherlands-holidays

Netherlands holidays for Emacs calendar
Emacs Lisp
4
star
47

latex-wrap

Wrap selection with a LaTeX environment
Emacs Lisp
4
star
48

simple-benchmark

My notes comparing several PL on a simple benchmark
C++
4
star
49

ciao

Emacs Lisp
4
star
50

xkb-indicator

GTK indicator that allows to run setxkbmap via a keybinding
Python
2
star
51

malk

a simple multi-collection completion demo
Emacs Lisp
1
star
52

soap

Smart Operator a posteriori
Emacs Lisp
1
star