~arivigo/scalc-devel

The road to scalc 0.1

Details
Message ID
<20210329233404.emn7b2izzlnz6dhe@arch>
DKIM signature
pass
Download raw message
Hi!
Ariadna here :) I'm inaugurating this mailing list with a very loose
idea of where this project seems to be going to. I usually start things
following an intuition, trying out things, until things start to get
more and more solid as time (and commits) pass.

So, it appears that at least in the short term, scalc will remain an
RPN-based calculator. I do have a bit of the temptation to make this
a mathematic language somehow, by adding an addressing/jump system and 
some sort of memory storage... but if that ever happens, it'll be in a
distant future.

For now, I think some memory registers like all pocket calculators seem
to have would be great as "milestone" for releasing a 0.1 version of
scalc. That with a couple of more built-in operations like:

* Trig: sin, cos, tan, and inverses 
* Modulo
* Factorial, nPr, and nCr

Other improvements maybe for 0.1 could include defining mathematical
constants like pi and e and make them available at runtime?

There's the question about the supported syntax(es). RPN is great 
because it's easy to implement, but maybe having an optional infix 
notation also available would be nice? I'm not totally sure. It
wouldn't be too hard to implement: just stack a call to an 
implementation of Dijkstra's "Shunting yard" algorithm before calling
rpn_calc() and we're set to fly... but is it worth doing? If it is, why 
not also support a Lisp-like prefix notation as well? I mean, start
supporting one and you may get drawn straight into the rabbit hole.

I'll be adding a sourcehut tracker (now that I've learned how to use 
them properly) very soon with a couple of features I think are short
term 'musts.' Meanwhile, I'll be reading any replies to this thread 
with your great ideas or... hey, why not?, some patches! \o/

xoxo,
Ari

-- 
Ariadna Vigo
(she/her)
Web: <https://ariadnavigo.xyz>
PGP: 0xA3B1324836A669BD
Reply to thread Export thread (mbox)