Comment on Show HN: While the world builds AI Agents, I'm just building calculatorsparentComments−hombre_fatal1yHeh, 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−neilv1yYou 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?−hombre_fatal1yI'm just showing that a more accessible language like Python has a repl with a ratio type.
Comments
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:
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:
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.