Show HN: While the world builds AI Agents, I'm just building calculators (calcverse.live)

191 points by adi_hn07 ↗ HN
I figured I needed to work on my coding skills before building the next groundbreaking AI app, so I started working on this free tool site. Its basically just an aggregation of various commonly used calculators and unit convertors.

Link: https://www.calcverse.live

Tech Stack: Next, React, Typescript, shadcn UI, Tailwind CSS

Would greatly appreciate your feedback on the UI/UX and accessibilty. I struggled the most with navigation. I've added a search box, a sidebar, breadcrumbs and pages with grids of cards leading to the respective calculator or unit convertor, but not sure if this is good enough.

117 comments

[ 3.1 ms ] story [ 235 ms ] thread
(comment deleted)
While the world does AI I learn assembly
Really! Is it part of your profession or study?
Hobby, I am a data engineer and definitely I will need to encounter AI. But assembly gives a different perspective of machines, make my brain hard-working and in case of societal collapse you need an assembler. We need more assemblers more cross-platform frameworks (collections of macros) and more emphasis on the way things work, like guides, articles. Not less.
What a coincidence, I used to be a data engineer too! Then I switched to building websites with NextJS. Totally agree with your point, I feel the same reasoning applies to higher level coding too, the best AI coding agents out there are at most a force multiplier, which means knowing how to code has even more leverage in the age of AI, allowing one person to do the work of an entire team.
fellow data engineer -- yeah i've spent the last 6 months reverse engineering binary data files for the elektron octatrack as a hobby project while waiting to see how the hype cycle plays out. deffo gives a new understanding of how the machine's internals work getting to grips with the underlying stuff.

edit -- i've looked at some assembly posts on here before and they often hurt my brain, so respect to you for digging into it.

I really feel this, and I wonder whether it's us humans trying to reaffirm our higher reasoning, or whether it's a regression to trying to recapture a simpler age.
For me it's also the joy of working with a deterministic system.
Hi noduerme, I'm the guy who wrote the original 'Kaos'. I stumbled upon the discussion about it, and have no idea how to contact you besides commenting here.

BTW assembly rocks :-).

Same. But mine was an android app. github.com/crouther
Where’s the math actually done, on device or on your server?

Feedback: the compound interest calculator doesn’t support continual compounding? That’s surprising, and also the easiest to compute.

I must admit I still don't understand continual compounding
Explained in a terrible way, it's integrals for interest if "compound daily/monthly/yearly" was an estimation using discrete intervals
you didn't really improve by hiding behind "integrals"; this is why so many kids are afraid of calculus.
The explanation worked for me. I learned basic calculus but didn't know about continual compounding interest.
this isn’t kindergarten. if something is described concisely by analysis then that’s how I want it explained to me too.
There's a reason I prefaced it with "explained in a terrible way". It clicks that way in my head, might for others
Sibling’s explanation is a great starting point! If you understand annual, weekly, and daily compounding, continuous compounding is the limit of what happens when the time you compound over becomes ever shorter. It’s not obvious without calculus, but it’s a well-defined function.
Imagine that instead of compounding the interest every day, you wanted to calculate it every nanosecond. And then, every billionth of a nanosecond. If you keep dividing that until it’s an infinite number of infinitely small compounding, you get a super simple equation:

  interest = e^(years*rate)
10% interest for 5 years?

  e^(5*.1) = 1.649
3% for 8 years?

  e^(8*.03) = 1.271
You can plug any numbers into that and get the end result in 1 step.
(comment deleted)
You're not the only one. I recently took up running and didn't particularly like any of the existing running pace calculators, so I made my own: https://calcubest.com/health/runningpace

And then kinda realized that there were others I wanted to have, and a few I thought others might want, so I added more.

A calculator is simple enough that it's fun to work on one when I need a break from something more complex but want to be able to do something other than doom scrolling. So now every couple of weeks I add another one.

To anyone thinking of starting running but either doesn't know where to start or thinks he can't do it, look up "couch to 5k".

It's a free NHS audio program that guides your phase so that in 9 weeks you can do a 5k run.

I can second this. That's the program I started with. I'm now training for a half marathon using https://www.baa.org/races/baa-half-marathon/train/leveltwo and I've shaved like a minute off my mile pace while increasing my milage from 6 mile runs to 12 mile runs.

There's lots of programs for running and most of them seem good for improving performance.

No strength training in this?? I have been training legs for years along with runs (treadmill runs/uphill runs etc)... only problem my timing for the half marathon has gone down from 2h35 to 2h38 and then I had an accident last year which made me unable to run most of the second half of last year which has made things a lot tougher for me to train :(
I like `units` for unit conversion. It's in the default install of MacOS, so readily accessible for most people.
One calculator I’ve come to love over the years is Numi. I keep it open all day every day and it does a pretty good job of bridging the gap between the typical skewmorphic calculator app and scilab or python. It’s a text based calculator that allows you to declare variables and do unit and base conversions and save and load your work. No graphing though unfortunately and i dont think it really has much in the way of plugin support.

Anyway not to say your calculators arent useful op, i just think that something that can be open on the desktop is more useful than something that is hidden in a chrome browser tab.

Haven't tried Numi, but I made a calculator with variables as a side project on a whim: https://calc.li/ - it is online, but there is no backend and you can save the whole page as an offline file if you want, using localStorage for state.
Typing “2”, “+”, “3” on an iPhone in Safari gets it to display “23+”, which doesn’t appear correct to me ? Looks cute otherwise.
If you're taking suggestions, I have a frequent need to do basic arithmetic on fractions and not many "app" calculators do that well or at all.
On the desktop, if you keep a Scheme interpreter installed, you can use it as a quick arbitrary-precision calculator, including support for fractions.

Guile is the most easily available one on a Linux system, though some others will give better REPL out of the box.

    $ guile
    GNU Guile 3.0.8
    Copyright (C) 1995-2021 Free Software Foundation, Inc.

    Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
    This program is free software, and you are welcome to redistribute it
    under certain conditions; type `,show c' for details.

    Enter `,help' for help.
    scheme@(guile-user)> (+ 1/2 1/8 1/8)     
    $1 = 3/4
    scheme@(guile-user)> (* $1 1/2)
    $2 = 3/8
    scheme@(guile-user)> (define rate 42)
    scheme@(guile-user)> (* rate $2)
    $3 = 63/4
    scheme@(guile-user)> (define (foo x) (- x 1/32))              
    scheme@(guile-user)> (foo $3)
    $4 = 503/32
    scheme@(guile-user)> (exact->inexact $4)
    $5 = 15.71875
    scheme@(guile-user)> 
You can also run a Scheme REPL within Emacs, with `M-x run-scheme RET`. Optionally with Quack. https://www.neilvandyke.org/quack/
(comment deleted)
Heh, I hated writing arithmetic in lisp even when I used it fulltime with paredit.

Fortunately, many languages have a rational type, even Python, which might be more ergonomic even if ratio literals aren't supported:

    $ python
    from fractions import Fraction as f
    f(1, 2) + f(1, 8) + f(1, 8) 
    # 3/4
You didn't like the parentheses and prefix operator syntax?

Syntax-wise, you could use Racket (or another Scheme, with a little more difficulty) to make a very thin layer over normal Scheme, and package it into a program called `calc`, like this:

    user@computer:~$ calc

    > 1/2 + 1/8 + 1/8
    $1 = 3/4
    >
Or do you want a bigger library of off-the-shelf numeric tools, like Python, Julia, or R?
I'm just showing that a more accessible language like Python has a repl with a ratio type.
Buy a handheld calculator. Many scientifics since the mid 80s handle compound fractions via the "a b/c" key.
I have a couple, they work fine, but there don't seem to be that many options for apps/web.
On the topic of calculators. I discovered Figr[1] on HN a while ago, and it really helps when doing one off multi variable thing, like helping a customer estimate their bill etc.

Kudos on building this. I occasionally search for these on Google and am always disappointed by the mess. Bookmarked.

[1] https://www.figr.app/

Thank you so much for the bookmark! Means a lot. Figr looks great, will take inspiration and guidance from it. Thanks for the suggestion.
A random dimensional analysis that I find amusing about fuel consumption units:

liters / 100 km => m^3 / m => m^2

(volume) / (distance) => (area)

This can be interpreted as the cross-sectional area of a hypothetical trough of fuel running alongside the road, whose contents you slurp up and consume in your engine as you pass (in lieu of using fuel stored in an onboard reservoir).

Another really fun one, though slightly less literal than L/100km, is charging rates in electric vehicles, which often present charge state as range (km), rather than energy stored (kWh); and so if it takes you one hour to gain 300km of range, well… you were charging at a rate of 300km/h.

(With in-flight refueling, you could potentially refuel an aeroplane at 300km/h at 300km/h…)

Related: Uncanceled Units <https://xkcd.com/3038/>. (“50 gallons per square foot” especially is similar to your L/100km: volume ÷ area = length.)

This is great. I really think that having a theme to iterate on is the best way of revisiting coding/math skills and learning new ones. And building things from scratch is so much more rewarding than snapping parts together. My free time right now is trying to rewrite 90s screensavers down to the rasterizer level, without consulting anything for how to do stuff like antialiasing.

One little note, just checking out your loan calculator: On my phone, the total interest div is cut off at the decimal point, and the total payment overflows the nice round rect holder. You could dial in the font size scaling with a bit of custom Javascript there. They stand out, too, because they're bottom line figures.

Thanks a lot for the feedback! I have fixed the issue, please let me know if you want any further changes.
Can't Wolfram Alpha do this?
If I calculate something, hit back in my history, and then return, what I had entered is wiped out.

If I enter text into this HN comment box, hit back in my history, and then return, what I've typed is maintained.

A suggestion for your speed converter: different sports use different units which your converter could support as well.

A few examples:

Running usually measures pace in minutes per kilometer or mile. That will be extra fun for you since it wouldn't be 4.33333 min/km but would be written as sth like 4:20 min/km.

Swimming uses min/100m or sec/100m.

Rowing uses min/500m.

If you add these then I'd be using this a lot!

Thanks for the great feedback! I've added pace units to the speed convertor, do check it out and let me know if you need any changes. You can send all requests at the contact form on the site too: https://www.calcverse.live/contact

Will aim to implement it within 24 hrs. Thanks again!

AI can't calculate anyway, so, you're doing good.
Loved the title! XD
Loser. I bet you missed out on the metaverse. And blockchain.

Seriously, this is great - solving problems for users seems to be hugely underrated here.

Good thing I missed out on metaverse and blockchain, or I'd be in debt. Seriously, I have optimism about them too, just not jumping on that train yet. Thanks for the feedback :)
inspiring in a weird way. maybe there is hope for engineering afterall.
Happy to fight for engineering, any day :)
Some comments, based purely on https://www.calcverse.live/calculators/bmi.

• Keyboard accessibility is suffering, because the buttons aren’t associated with a form. Most notably, pressing Enter when one of the text boxes is selected doesn’t do anything. You should put everything inside a <form> element, and then if you’re using <button>, decide whether it’s type=button or type=submit.

• A tad more subjective, but actual radio buttons are better than the buttons you’ve used for Metric/Imperial.

• As it stands, they lack a keyboard focus indication. (And the submit button has poor focus indication.)

• People don’t talk about heights in inches. They talk about them in feet and inches. You want to be able to accept feet and inches as two separate inputs. Not everyone who knows that their height is X′Y″ knows that means 12X+Y inches, and even more will make a mistake in calculating that, or just give up.

• If you switch between metric and imperial, and there’s a number in height or weight, it should probably convert the number to the chosen scale.

• If you just recalculated on input rather than on submit click, the experience would probably be smoother.

• Colour contrast on “Category: Overweight” is definitely too low. “Category: Normal weight” is also a little too low; underweight and obese are fine.

• Consider sometimes what related information might be useful. Every BMI calculator lists the categories, but something I somehow haven’t ever seen and yet which would be very useful for giving someone something to aim for is a mapping: for a given height, what weights do the categories correspond to? e.g. for 200cm, underweight = 0–74kg, normal weight = 74–100kg, overweight = 100–120kg, obese = 120–∞kg. Consider visualisations too. And mentioning what the calculation actually is that is being performed. Calculations are simple. Presenting them well is the harder bit.

Thank you so much for the detailed feedback! I'll take some time to go through these points and fix the issues, and will revert back here asap.
I have implemented most points, except the 2nd and last ones. I felt its better to have buttons as they are easier to click. I'm figuring out how to implement the last point.