abreujp

abreujp

Hello Elixir community,

I’d like to share an Anki flashcard deck I’ve created containing 1,610 cards covering functions from Elixir version 1.19.0-dev.

About the Project

The deck was created as part of a weekend project where I developed a formatter for the ex_doc library that generates Elixir function definitions in CSV format, which can be directly imported into the Anki app.

What is Anki?

For those unfamiliar, Anki is a flashcard application that uses spaced repetition to help with memorization and learning - perfect for remembering programming language functions!

Download

You can download the deck here: Elixir 1.19.0-dev Functions Anki Deck

Feedback and suggestions are welcome!

Showing Posts 1 to 2

raulrpearson

raulrpearson

Great minds think alike! I also did this recently and have been memorizing functions and macros from the Kernel module. I wasn’t sure how it’d work out, concerned that the auto-generated cards would be not easy to memorize or boring to learn, but it’s been mostly fine and worth it, I think.

I’m only doing the first sentence of each function or macro, not the whole doc string, though. I think that helps with parsing and going through the spaced reps.

I also structure my notes with a few fields. I extracted data using a Livebook and this hastily coded snippet:

defmodule Ankify do
  def extract_deck(module) do
    Code.fetch_docs(module)
    |> elem(6)
    |> Enum.reject(fn {_, _, _, doc, _} -> doc == :hidden end)
    |> Enum.map(&parse_doc(&1, module))
    # |> Enum.map(fn note -> Map.values(note) |> Enum.join("\t") end)
    # |> then(fn notes -> Enum.join(notes, "\n") end)
  end

  def parse_doc({{kind, name, arity}, _, [signature], %{"en" => item_doc}, _}, parent) do
    [description | _] = String.split(item_doc, "\n\n")
    description = String.replace(description, ~r"\n+", " ")
    parent = Atom.to_string(parent)

    %{
      id: "#{parent}.#{name}/#{arity}",
      parent: parent,
      type: Atom.to_string(kind) |> String.capitalize(),
      signature: signature,
      description: description
    }
  end
end

This then has two cards, one to recall the description from the signature and one to recall the signature from the description.


I was planning to polish this up and share as a script but never got around to it.

abreujp

abreujp OP

Nice way you did it. I hope to make improvements to my code which is still very simple, and when it’s more professional I intend to think of a way to share it on GitHub. I believe that for ex_doc it doesn’t need to have this format. I want to do it in a way that makes it simple to generate decks for any Elixir library. Thank you for your response.

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 92995 915
New
caslu
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
GES233
I’m posting this in response to Jose’s recent tweet (Cr. link) : People are sleeping on Elixir for a coding harness: Hot-code swappi...
New
_mfierro
Hello, I wrote Stop My Hand, a Scattergories-like web application using Phoenix/LiveView as my learning project for Elixir (after readin...
New
marciol
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
durvia
Anyone running long-lived stateful processes on BEAM? We’re building an AI agent runtime and would love to compare notes. We’re a small ...
New

Other Trending Topics Top

whathappenedtoicabod
Looking for an elixir job. James Schiiller Detroit, Michigan Travel/relocate or work remotely Over 20 years of professional programming...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews