Elixir Function of the Day - a start page for alchemists!

I had this silly idea the other night and face rolled a quick & dirty prototype today: https://elixirfunctionoftheday.com/

The idea is to preload all the most significant apps out there (standard library, ecto, phoenix etc.) and render a documentation page for one random function. Those rotate on 24h basis. Given they’re random, there is a chance to stumble upon something interesting.

I have some improvements stuck in the pipeline, stay tuned.

Please share it if you like it :slight_smile: Cheers.


This is a great idea! :023:

I wonder if we can do something with it on the forum? Maybe a new section (that people can mute if they prefer) which mirrors what you post on the site - so people can comment, post example usage or maybe even ask questions or seek clarification in using the function? You could also include the link to the forum thread on your site then :003:

If this interests you we could create an ElixirFunctionOfTheDay account and give it an API key which would allow you to post new threads using the standard markdown. No probs if you’d rather not - just thought it would be cool! :smiley:

1 Like

Neat idea! Are you able to add a link to the documentation/hex package as well?


Thanks! Most certainly, coming soon! Apart from just linking directly to hexdocs I want to make sure all the linkable symbols in the documentation section itself are also properly recognized. This is doable with ExDoc.Formatter.HTML.Autolink but I haven’t fully figured out that interface yet.


Thanks for feedback and an awesome idea. I think you’re on something bigger here though.

Having meta threads on per-function basis is totally something we could look into. In my opinion that would warrant a separate tool set. Here’s why:

I’m considering the following aspects:

  • Docs and interfaces are subject to change per release. Forum (sub)section(s) would have to account for that.
  • Function clauses need to be grouped together, there is no point in having separate threads for Enum.zip/1 and Enum.zip/2 for instance.
  • What about undocumented, yet public functions?
  • Is there any value in creating new posts on semi-daily basis vs a full sweep? Is tracking the “already posted” state worth it? IMO the “full provisioning” variant is nicer as it could be possibly integrated with hexdocs in the future (hexdocs linking to forum threads).

that people can mute if they prefer

This is super important and perhaps could be done as an “opt-in” rather than “opt-out”? No one likes noise.

With regards to this tiny website - for now I’m considering adding a button/link that enables users to create a “function” forum thread, using their own credentials. Would love to get a 2nd (and 3rd, and…) opinion before diving into it. Cheers!

1 Like

FWIW I made some improvements live since the original posting:

  • the function always links to hexdocs.pm
  • there’s a “share on twitter” button now, I hope it works. I wanted to avoid vendor’s JS spyware so I came up with a custom button; can’t really tell whether that’s good enough - someone with twitter, please use it for science :slight_smile:
  • added a “roll the dice” link that lets you explore random functions on demand
  • everything should feel significantly snappier, went from 0.1s to 0.007s max in my microbenchmark for random access

Many people suggested tightly coupled twitter/RSS integration. I’m not a fan but I’ll look into it soon-ish.

Coming up next:

The closest priorities are not really user-facing. I need to figure out how to deploy the site with proper erlang release/container (possibly docker), so that:

  • loaded apps (and thus, functions in the pool) are somewhat constant and determined by the release configuration (embedded release, currently ecto and postgrex do not seem to be included due to some misconfiguration - to be investigated)
  • I can develop a deployment pipeline that enables me to push it to a random ubuntu host I already own, rather than throwing :money_with_wings: at heroku

If there’s anyone out there willing to help - kindly consider this a call for action :stuck_out_tongue_winking_eye:

The repo is at https://github.com/aerosol/fotd