mathypad 0.1.14

A smart TUI calculator that understands units and makes complex calculations simple.
Documentation
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Mathypad - Smart Calculator with Units & Variables</title>
    <meta name="description" content="A powerful command-line calculator that understands units, variables, and natural language. Convert between data units, assign variables, and perform complex calculations within text."
    
    <!-- Open Graph / Facebook -->
    <meta property="og:type" content="website">
    <meta property="og:url" content="https://mathypad.app">
    <meta property="og:title" content="Mathypad - Smart Calculator with Units & Variables">
    <meta property="og:description" content="A powerful command-line calculator that understands units, variables, and natural language. Perfect for DevOps, capacity planning, and reusable calculations."
    <meta property="og:image" content="https://mathypad.app/screenshots/screen1.png">
    <meta property="og:image:width" content="1200">
    <meta property="og:image:height" content="630">
    <meta property="og:image:alt" content="Mathypad terminal interface showing unit-aware calculations like 50 GiB in MiB and network speed conversions">
    <meta property="og:site_name" content="Mathypad">
    <meta property="og:locale" content="en_US">

    <!-- Twitter -->
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:url" content="https://mathypad.app">
    <meta name="twitter:title" content="Mathypad - Smart Calculator with Units & Variables">
    <meta name="twitter:description" content="A powerful command-line calculator that understands units, variables, and natural language. Perfect for DevOps, capacity planning, and reusable calculations."
    <meta name="twitter:image" content="https://mathypad.app/screenshots/screen1.png">
    <meta name="twitter:image:alt" content="Mathypad terminal interface showing unit-aware calculations">

    <!-- Additional meta tags for better SEO and sharing -->
    <meta name="keywords" content="calculator, unit conversion, command line, terminal, rust, devops, variables, natural language, capacity planning, data units, gbps, mbps, storage calculator">
    <meta name="author" content="Mathypad">
    <meta name="robots" content="index, follow">
    <link rel="canonical" href="https://mathypad.app">
    
    <!-- Favicon -->
    <link rel="icon" type="image/x-icon" href="/favicon.ico">
    <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
    
    <!-- Theme colors for mobile browsers -->
    <meta name="theme-color" content="#667eea">
    <meta name="msapplication-TileColor" content="#667eea">
    
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            line-height: 1.6;
            color: #333;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 2rem;
        }

        .hero {
            text-align: center;
            margin-bottom: 4rem;
            color: white;
        }

        .hero h1 {
            font-size: 3.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
            text-shadow: 0 2px 4px rgba(0,0,0,0.3);
        }

        .hero .tagline {
            font-size: 1.3rem;
            font-weight: 300;
            margin-bottom: 2rem;
            opacity: 0.95;
        }

        .cta-section {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 16px;
            padding: 2rem;
            margin-bottom: 3rem;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }

        .install-code {
            background: #1a1a1a;
            color: #fff;
            padding: 1rem 1.5rem;
            border-radius: 8px;
            font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
            font-size: 1.1rem;
            margin: 1rem 0;
            display: inline-block;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }

        .main-content {
            background: white;
            border-radius: 16px;
            padding: 3rem;
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
            margin-bottom: 2rem;
        }

        .screenshot {
            width: 100%;
            max-width: 100%;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            margin: 2rem 0;
        }

        .features {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            margin: 3rem 0;
        }

        .feature {
            padding: 2rem;
            background: #f8f9fa;
            border-radius: 12px;
            border-left: 4px solid #667eea;
        }

        .feature h3 {
            color: #333;
            margin-bottom: 1rem;
            font-size: 1.3rem;
        }

        .feature p {
            color: #666;
            line-height: 1.6;
        }

        .examples {
            background: #f8f9fa;
            padding: 2rem;
            border-radius: 12px;
            margin: 2rem 0;
        }

        .examples h3 {
            margin-bottom: 1rem;
            color: #333;
        }

        .example-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1rem;
        }

        .example {
            background: white;
            padding: 1rem;
            border-radius: 8px;
            font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
            font-size: 0.9rem;
            border-left: 3px solid #667eea;
        }

        .input {
            color: #333;
            margin-bottom: 0.5rem;
        }

        .output {
            color: #28a745;
            font-weight: bold;
        }

        .footer {
            text-align: center;
            color: rgba(255, 255, 255, 0.8);
            margin-top: 3rem;
        }

        .footer a {
            color: rgba(255, 255, 255, 0.9);
            text-decoration: none;
        }

        .footer a:hover {
            text-decoration: underline;
        }

        @media (max-width: 768px) {
            .hero h1 {
                font-size: 2.5rem;
            }
            
            .hero .tagline {
                font-size: 1.1rem;
            }
            
            .container {
                padding: 1rem;
            }
            
            .main-content {
                padding: 2rem;
            }
        }

        /* GitHub corner styles */
        .github-corner:hover .octo-arm {
            animation: octocat-wave 560ms ease-in-out;
        }
        
        @keyframes octocat-wave {
            0%, 100% {
                transform: rotate(0);
            }
            20%, 60% {
                transform: rotate(-25deg);
            }
            40%, 80% {
                transform: rotate(10deg);
            }
        }
        
        @media (max-width: 500px) {
            .github-corner:hover .octo-arm {
                animation: none;
            }
            .github-corner .octo-arm {
                animation: octocat-wave 560ms ease-in-out;
            }
        }
    </style>
</head>
<body>
    <a href="https://github.com/pato/mathypad" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"/><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"/><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"/></svg></a>
    <div class="container">
        <div class="hero">
            <h1>mathypad</h1>
            <div class="tagline">Terminal calculator for capacity planning, performance analysis, and infrastructure math</div>
            
            <div class="cta-section">
                <div class="install-code">cargo install mathypad</div>
                <p style="color: rgba(255,255,255,0.9); margin-top: 1rem;">Rust-powered TUI calculator for engineers. Unit-aware, scriptable, with vim keybindings.</p>
                <p style="color: rgba(255,255,255,0.8); margin-top: 1rem;">
                    ✨ <a href="/web" style="color: rgba(255,255,255,0.95); text-decoration: underline;">Try the web version</a> - No installation required!
                </p>
            </div>
        </div>

        <div class="main-content">
            <img src="screenshots/screen1.png" alt="Mathypad terminal interface showing unit-aware calculations" class="screenshot">

            <div class="examples">
                <h3>🔧 Real engineering calculations</h3>
                <div class="example-grid">
                    <div class="example">
                        <div class="input">Download: 4.5 TB at 1 Gbps</div>
                        <div class="output">→ 10 h</div>
                    </div>
                    <div class="example">
                        <div class="input">50 GiB + 2 TB to MiB</div>
                        <div class="output">→ 2,101,248 MiB</div>
                    </div>
                    <div class="example">
                        <div class="input">API load: 500 QPS * 24 hours</div>
                        <div class="output">→ 43,200,000 query</div>
                    </div>
                    <div class="example">
                        <div class="input">line1 + 30% overhead</div>
                        <div class="output">→ 56,160,000 query</div>
                    </div>
                    <div class="example">
                        <div class="input">Backup: 10 TB / (100 Mbps * 0.8)</div>
                        <div class="output">→ 27.778 h</div>
                    </div>
                    <div class="example">
                        <div class="input">Storage: line3 * 365 days to PB</div>
                        <div class="output">→ 15.768 PB</div>
                    </div>
                </div>
            </div>

            <div class="features">
                <div class="feature">
                    <h3>📊 Variables</h3>
                    <p>Store intermediate results and reference previous calculations. Build complex infrastructure models step-by-step with automatic dependency tracking.</p>
                </div>

                <div class="feature">
                    <h3>💬 Context-Aware Parsing</h3>
                    <p>Embed calculations in documentation: "Database: 5 TB + 2 TB" or "Memory: 16 GiB per node". Extracts and evaluates expressions from technical specs and comments.</p>
                </div>

                <div class="feature">
                    <h3>🔄 Unit System</h3>
                    <p>Handles binary vs decimal units correctly (GiB vs GB), bandwidth vs throughput (Mbps vs MB/s), and rate calculations. No more unit conversion bugs in capacity planning.</p>
                </div>

                <div class="feature">
                    <h3>🧮 Dimensional Analysis</h3>
                    <p>Type-safe unit arithmetic prevents errors. Mix storage, bandwidth, time, and rate units naturally. The compiler ensures your math makes physical sense.</p>
                </div>

                <div class="feature">
                    <h3>🔗 Line references</h3>
                    <p>Reference previous results with line1, line2 syntax. Build infrastructure models where later calculations automatically update when inputs change.</p>
                </div>

                <div class="feature">
                    <h3>💾 Calculation Notebooks</h3>
                    <p> Mathypad files. Save capacity models, performance benchmarks, and infrastructure specs. Share reproducible calculations with your team.</p>
                </div>

                <div class="feature">
                    <h3>⌨️ Terminal-Native Interface</h3>
                    <p>Full vim keybindings: hjkl navigation, w/b word movement, dd line deletion, modal editing. Integrates into your existing terminal workflow.</p>
                </div>

                <div class="feature">
                    <h3>⏱️ Performance & Capacity Math</h3>
                    <p>Time-series calculations, rate conversions, and throughput analysis. Model API performance, estimate migration times, and plan infrastructure scaling.</p>
                </div>

                <div class="feature">
                    <h3>🌐 Production Infrastructure</h3>
                    <p>Built for SRE and DevOps workflows. Model production capacity, estimate costs, calculate SLA requirements, and validate infrastructure specs before deployment.</p>
                </div>
            </div>

            <div style="text-align: center; margin: 3rem 0;">
                <h2 style="margin-bottom: 1rem;">Ready to get started?</h2>
                
                <!-- Web version CTA -->
                <div style="margin-bottom: 2rem; padding: 1.5rem; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; color: white;">
                    <h3 style="margin-bottom: 1rem; color: white;">🌐 Try it now in your browser</h3>
                    <a href="/web" style="display: inline-block; background: rgba(255,255,255,0.2); color: white; padding: 12px 24px; border-radius: 8px; text-decoration: none; font-weight: bold; border: 2px solid rgba(255,255,255,0.3); transition: all 0.3s ease;" 
                       onmouseover="this.style.background='rgba(255,255,255,0.3)'; this.style.borderColor='rgba(255,255,255,0.5)'"
                       onmouseout="this.style.background='rgba(255,255,255,0.2)'; this.style.borderColor='rgba(255,255,255,0.3)'">
                        Launch Web App →
                    </a>
                    <p style="margin-top: 1rem; color: rgba(255,255,255,0.9); font-size: 0.9rem;">No installation required • Works on any device</p>
                </div>
                
                <!-- Terminal installation -->
                <div>
                    <h3 style="margin-bottom: 1rem;">💻 Or install the terminal version</h3>
                    <div class="install-code" style="background: #1a1a1a; color: #fff;">cargo install mathypad</div>
                    <p style="margin-top: 1rem; color: #666;">Launch with <code style="background: #f1f1f1; padding: 0.2rem 0.5rem; border-radius: 4px;">mathypad</code> for interactive mode or <code style="background: #f1f1f1; padding: 0.2rem 0.5rem; border-radius: 4px;">mathypad -- "100 GB / 10 Mbps"</code> for scripting and automation</p>
                </div>
            </div>
        </div>

        <div class="footer">
            <p>Built with ❤️ in Rust • <a href="https://github.com/pato/mathypad">View on GitHub</a></p>
        </div>
    </div>
</body>
</html>