Skip to main content

RPN Calculator for Plover

PyPI GitHub

RPN Calculator is a stack-based calculator that you can use to calculate equations directly in-line while writing. It uses reverse polish notation, where operations are written after their arguments, rather than in-between.

Commands

Definition Explanation
{:rpn_put:<characters>} Put characters into buffer.
For example: {:rpn_put:1}
{:rpn_put_ext} Put all characters after the most recent calculator command into buffer. This allows you to use regular number entry strokes rather than rpn_put strokes to put characters into buffer.
{:rpn_del_buff} Delete rightmost character in buffer.
{:rpn_clear_buff} Clear buffer.
{:rpn_clear_all} Clear and delete everything.
{:rpn_push} Parse and push buffer into stack.
{:rpn_push_bin} Parse and push buffer into stack as binary.
{:rpn_push_hex} Parse and push buffer into stack as hexadecimal.
{:rpn_add} Pop (x, y) from stack (where y is at the top) and push x + y.
{:rpn_sub} Subtraction: Pop (x, y), push x - y.
{:rpn_mul} Multiplication: Pop (x, y), push x * y.
{:rpn_div} Division: Pop (x, y), push x / y.
{:rpn_intdiv} Floor division: Pop (x, y), push floor(x, y).
{:rpn_mod} Modulo: Pop (x, y), push x mod y.
{:rpn_pow} Exponent: Pop (x, y), push pow(x, y).
{:rpn_neg} Negation: Pop x, push -x.
{:rpn_and} Bitwise AND: Pop (x, y), push x & y.
{:rpn_or} Bitwise OR: Pop (x, y), push `x
{:rpn_xor} Bitwise XOR: Pop (x, y), push x ^ y.
{:rpn_not} Bitwise NOT: Pop x, push ~x.
{:rpn_lsl} Logical Shift Left: Pop (x, y), push x << y.
{:rpn_lsr} Logical Shift Right: Pop (x, y), push x >> y.
{:rpn_swap} Swap top two stack items.
{:rpn_pop} Remove the topmost item.
{:rpn_dup} Duplicate top stack item.
{:rpn_func:<params>:<return>} Define custom function; parameters are separated by commas, and the return value is written using python syntax.
For example: {:rpn_func:x,y:3*x+2*y}
{:rpn_end} Mark the end of the calculation.

Here are a few things to note when using the plugin:

  • You can chain these definitions in a single stroke. For instance, "{:rpn_clear_buff}{:rpn_dup}{:rpn_put:2}{:rpn_mul}" will let you repeatedly add double the topmost item onto the stack.
  • When the stack has exactly one item, it will be formatted as a bare number, allowing you to quickly move on after calculation.
  • You can use the undo stroke (Typically *) to undo all RPN commands. This is helpful whenever you encounter an error during calculation.
  • Most operations that pop from the stack will push whatever you have in the buffer onto the stack first before popping. This allows you to, for example, use {:rpn_add} to directly add the buffer to the item at the top of the stack, without the need to stroke the rpn_push command.

Metadata

Release files for plover-rpn-calculator 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plover-rpn-calculator 0.0.1
File Size Uploaded Provenance Actions
plover-rpn-calculator-0.0.1.tar.gz 6.0 kB Without provenance Details for plover-rpn-calculator-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for plover-rpn-calculator 0.0.1
File Interpreter ABI Platform Actions
plover_rpn_calculator-0.0.1-py3-none-any.whl Python 3 none any Details for plover_rpn_calculator-0.0.1-py3-none-any.whl

Total release size: 12.4 kB

Release files / plover-rpn-calculator-0.0.1.tar.gz

Download URL plover-rpn-calculator-0.0.1.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ce8dc52e8331ffd543537a0c826a3f2b3c6f9792a41872da8bf488524dfd0ddd
BLAKE2b-256 checksum
How to use checksums
592f3ba75aa1fc198f9fd21643f8d3299f64f9ca49118fee61e2f9f4332859a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.3 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5

Release files / plover_rpn_calculator-0.0.1-py3-none-any.whl

Download URL plover_rpn_calculator-0.0.1-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f46cba6f590bcd4f1706f8778e87f6f710133fd8b7f3267b198bb650d2238f2
BLAKE2b-256 checksum
How to use checksums
bd1feab3d973f6ed851cff4b9557f257be7b47e28f321aafc1423d1378e94770
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.3 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5

Security for plover-rpn-calculator 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page