Skip to content

ConAcademy/hyap7

Repository files navigation

hyap7 — Half Your Age Plus 7

Latest Release GoDoc

Check out the online WASM demo.

hyap7 is a terminal UI for exploring the "Half Your Age Plus 7" dating age rule, allowing exploration of quantitative ethics in the terminal.

hyap7 demo

The folk rule says the youngest person you should date is (your age / 2) + 7. The inverse says the oldest person who should date you is (your age × 2 - 14).

hyap7 lets you explore this interactively with a live chart of the acceptable dating zone.

Features

  • Adjustable age input with real-time range calculation
  • Forward and inverse formula display
  • Two-person compatibility check with pass/fail verdict
  • Braille line chart of the acceptable dating range zone using NTCharts
  • Integral mode — cumulative person-years of dating eligibility with instantaneous rate
  • Vim-style keyboard controls

Installation

brew install ConAcademy/homebrew-tap/hyap7

Usage

hyap7 [my-age [other-age]]
Key Action
/ h l Adjust age by 1
Shift+← Shift+→ / H L Adjust age by 5
Tab Switch between your age and partner age
Backspace Clear partner age
i Toggle integral mode
q / Ctrl+C Quit

Building from Source

Requires Go 1.26+.

go build -o hyap7 .

Or with Task:

task build

Available Tasks

Task Description
task build Build the binary (runs tests first)
task test Run tests
task run Run directly via go run
task tidy Run go mod tidy
task clean Remove build artifacts

The Math

The half-your-age-plus-7 rule defines an acceptable dating age range:

  • Minimum partner age: age / 2 + 7
  • Maximum partner age: age × 2 - 14 (the inverse)

This creates an asymmetric range that widens with age. At 20 your range is 17–26; at 50 it's 32–86.

Integral Mode

The range width at age x is w(x) = 3x/2 - 21. Integrating from age 14 (where the range is zero) to your current age gives cumulative person-years of dating eligibility:

∫w(x)dx = 3x²/4 - 21x + 147

Press i to toggle integral mode, which charts the cumulative curve and shows the instantaneous rate — how many more person-years you gain next birthday.

Dependencies

Open Collaboration

We welcome contributions and feedback.

License

Released under the MIT License, see LICENSE.txt.

Copyright (c) 2026 Neomantra BV.


Made with ❤️ and 🔥 by the team at ConAcademy.

About

Half Your Age Minus Seven TUI

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors