All Top-level Files

Files in the top-level directory in any check-in


A little learning exercise in Joy. It's a "trivial" (It wasn't for me!) programme that takes a list of (two) chainset gears and a list of sprockets and then calculates all the ratios reporting out the results as a sorted list of ratios and gear pairs:

> [34 50] [12 13 15 17 19 21 23 26] joycog.
> [[1.30769 26 34] [1.47826 23 34] [1.61905 21 34] [1.78947 19 34] ... ]

I decided to do this as I was intrigued about what the theoretical progression of gears should be on my bike (you could never shift like this in practice). There is more overlap than I thought.

One possible extension I could do is to discount the ratios at the extremes of chain angle, e.g. biggest front geat and biggest rear sprocket. But wrapping my head around Joy has been hard, so I'll not do that too soon.

Installing / Using

  1. Get and compile Joy from Kevin Albrecht's mirror (I went with "current joy.tar.gz")


  1. Start an interactive Joy session from within the directory where joy was compiled so that usrlib, inilib and agglib are loaded automatically, e.g: ./joy
  2. Import joycog like so: /path/to/ include.
  3. Run as [34 50] [12 13 15 17 19 21 23 26] joycog.

From the Command Line

  1. Edit the relative path in the file
  2. cd to the joy executable directory (so usrlib, inilib and agglib are loaded automatically)
  3. Call as ./joy /path/to/ 34 50 12 13 15 17 19 21 23 26. I.e the first two arguments are the front chainring the rest are the cassette