notes from /dev/null

by Charles Choi 최민수


Contextual Interfaces in Casual Calc

05 Aug 2024  Charles Choi

A compelling idea in the Transient UI package is the ability to craft interfaces where commands specific to a context can be discovered and used. Such contextual interfaces enable a user to easily orchestrate and repeat such commands, particularly when the interface is raised and persisted. This allows the user to better focus on the task at hand.

The most recent update to Casual Calc v1.11.0 has made changes to be more contextual. In particular:

  1. Menus stay raised until explicitly dismissed.
  2. Basic calculator operation is enabled when a menu is raised.

These UI changes have been applied to nearly all the menus in Casual Calc. To facilitate basic calculator operation algebraic entry is now supported via the ' binding. Arithmetic operators (add, subtract, multiply, divide, modulo) are made available on menus as well.

Shown below is a screenshot of the binary functions menu to illustrate a contextual interface at work. Commands that are common to working with binary and digital radix represented values are provided for and can be repeated or orchestrated with each other.

In the latest release of Casual Calc, all function and arithmetic sections offer their own contextual behavior, each section being akin to a “mini-app” with respect to a functional area of interest such as trigonometry, logarithms, rounding, time, random, conversions, and many others.

Closing Thoughts

Although historically the primary interface for Emacs Calc has been a prompt, it is in many ways an unnatural one. Real calculators offer dedicated buttons for commands. Particularly for the HP-28S calculator (a primary influence on the design of Emacs Calc), it offered soft-key buttons to map to different commands based on a mode. Persisted contextual interfaces in Casual Calc brings it closer to that modal push-button experience of the HP-28S.

If you already use Casual Calc, the update is available now. For those new to it, you can install it from MELPA. Regardless, let me know what you think of it.

Links

emacs

 

AboutMastodonInstagramGitHub

Feeds & TagsGet Captee for macOS

Powered by Pelican