ORPIERC(5)

πŸ“¦
version 1.6.1 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ ORPIERC(5) ✨ β€” the config file for the Orpie calculator, bestie edition πŸ’–

okay so this is orpierc(5), aka the configuration textfile for the orpie(1) console calculator. if you've ever wanted your calculator to obey you, this is the doc, and honestly? iconic. let's get into it 🫢


🌸 NAME 🌸

orpierc β€” it's the configuration textfile for the orpie(1) console calculator. that's the whole vibe. it's where you tell Orpie how to behave πŸ’…


πŸ¦‹ INTRODUCTION πŸ¦‹

CAUTION: while this manpage should be suitable as a quick reference, it may be subject to miscellaneous shortcomings in typesetting. The definitive documentation is the user manual provided with Orpie in PDF format.

so like, this page is great for a quick look-up, no cap β€” but it might have some typesetting quirks here and there 😭. the actual definitive documentation is the user manual that ships with Orpie in PDF format. that's the real one, periodt.

Orpie reads a run-configuration textfile (generally /etc/orpierc or /usr/local/etc/orpierc) to figure out its key and command bindings. and like β€” you can absolutely make your own personalized config file at $HOME/.orpierc and pick bindings that match how you actually use it. main character energy, custom to you ✨

the recommended procedure is to "include" the orpierc file provided with Orpie (peep INCLUDING OTHER RCFILES below for the tea), and then add or remove settings as you like. lowkey the move fr fr.


πŸŽ€ ORPIERC SYNTAX πŸŽ€

ngl you might notice the orpierc syntax is similar to the syntax used in the configuration file for the Mutt email client (muttrc). if you know muttrc, you're already vibing. if not, don't stress, it's giving simple.

within the orpierc file, strings should be enclosed in double quotes ("). a double quote character inside a string may be represented by \". and the backslash character itself must be represented by doubling it (\\). yes bestie, escape your escapes πŸ’…

🌈 INCLUDING OTHER RCFILES

Syntax:

include filename_string

this syntax can be used to include one run-configuration file within another. you could use this command to load the default orpierc file (probably found in /etc/orpierc) within your personalized rcfile, {/.orpierc}. the filename string should be enclosed in quotes πŸŽ€

🌈 SETTING CONFIGURATION VARIABLES

Syntax:

set variable=value_string

several configuration variables can be set using this syntax β€” check the CONFIGURATION VARIABLES description to see the full list. the variables are unquoted, but the values should be quoted strings. so like, variable name: bare. value: dressed up in quotes. slay ✨

🌈 CREATING KEY BINDINGS

Syntax:

bind key_identifier operation

this command will bind a keypress to execute a calculator operation. the various operations, which should not be enclosed in quotes, may be found in the section on CALCULATOR OPERATIONS.

key identifiers may be specified by strings that represent a single keypress, for example "m" (quotes included). the key may be prefixed with "\\C" or "\\M" to represent Control or Meta (Alt) modifiers, respectively β€” note that the backslash must be doubled. okay so a number of special keys lack single-character representations, so the following strings may be used to represent them:

  • "<esc>"
  • "<tab>"
  • "<enter>"
  • "<return>"
  • "<insert>"
  • "<home>"
  • "<end>"
  • "<pageup>"
  • "<pagedown>"
  • "<space>"
  • "<left>"
  • "<right>"
  • "<up>"
  • "<down>"
  • "<f1>" to "<f12>"

due to differences between various terminal emulators, this key identifier syntax may not be adequate to describe every keypress 😭. as a workaround, Orpie will also accept key identifiers in octal notation. for example, you could use \024 (do not enclose it in quotes) to represent Ctrl-T. iykyk 🫢

Orpie includes a secondary executable, orpie-curses-keys, that prints out the key identifiers associated with keypresses. you may find it useful when customizing orpierc β€” it's genuinely such a helper πŸ’–

multiple keys may be bound to the same operation, if desired. no rules, just vibes.

🌈 REMOVING KEY BINDINGS

Syntax:

unbind_function key_identifier
unbind_command key_identifier
unbind_edit key_identifier
unbind_browse key_identifier
unbind_abbrev key_identifier
unbind_variable key_identifier
unbind_integer key_identifier

these commands will remove key bindings associated with the various entry modes (functions, commands, editing operations, etc.). the key identifiers should be defined using the syntax described in the previous section. breaking up with a binding is valid and healthy πŸ’…

🌈 CREATING KEY AUTO-BINDINGS

Syntax:

autobind key_identifier

in order to make repetitive calculations more pleasant, Orpie offers an automatic key binding feature ✨. when a function or command is executed using its abbreviation, one of the keys selected by the autobind syntax will be automatically bound to that operation (unless the operation has already been bound to a key). the current set of autobindings can be viewed in the help panel by executing command_cycle_help (bound to 'h' by default). it's literally doing the work for you, obsessed.

the syntax for the key identifiers is provided in the previous section.

🌈 CREATING OPERATION ABBREVIATIONS

Syntax:

abbrev operation_abbreviation operation

you can use this syntax to set the abbreviations used within Orpie to represent the various functions and commands. a list of available operations may be found in the CALCULATOR OPERATIONS section. the operation abbreviations should be quoted strings, for example "sin" or "log".

Orpie performs autocompletion on these abbreviations, allowing you to type usually just a few letters in order to select the desired command 😌. the order of the autocompletion matches will be the same as the order in which the abbreviations are registered by the rcfile β€” so you may wish to place the more commonly used operation abbreviations earlier in the list. prioritize your faves, bestie.

multiple abbreviations may be bound to the same operation, if desired.

🌈 REMOVING OPERATION ABBREVIATIONS

Syntax:

unabbrev operation_abbreviation

this syntax can be used to remove an operation abbreviation. the operation abbreviations should be quoted strings, as described in the previous section.

🌈 CREATING MACROS

Syntax:

macro key_identifier macro_string

you can use this syntax to cause a single keypress (the key_identifier) to be interpreted as the series of keypresses listed in macro_string. the syntax for defining a keypress is the same as that defined in the section on CREATING KEY BINDINGS. the macro string should be a list of whitespace-separated keypresses, e.g. "2 <return> 2 +" (including quotes). tiny programs, big energy πŸ”₯

this macro syntax provides a way to create small programs; by way of example, the default orpierc file includes macros for the base 2 logarithm and the binary entropy function (bound to L and H, respectively), as well as "register" variable shortcuts (<f1> to <f12>).

heads up: macros may call other macros recursively. however, take care that a macro does not call itself recursively; Orpie will not trap the infinite loop πŸ’€. do not do this. it will simply keep going and going and there is no safety net, fr fr.

note that operation abbreviations may be accessed within macros. for example, macro "A" "' a b o u t <return>" would bind A to display the "about Orpie" screen. cute, right?

🌈 CREATING UNITS

Syntax:

base_unit unit_symbol preferred_prefix
unit unit_symbol unit_definition

units are defined in a two-step process:

  1. Define a set of orthogonal "base units." all other units must be expressible in terms of these base units. the base units can be given a preferred SI prefix, which will be used whenever the units are standardized (e.g. via ustand). the unit symbols and preferred prefixes should all be quoted strings; to prefer no prefix, use the empty string ("").

it is expected that most users will use the fundamental SI units for base units.

  1. Define all other units in terms of either base units or previously-defined units. again, the unit symbol and unit definition should be quoted strings. the definition should take the form of a numeric value followed by a units string, e.g. "2.5_kN*m/s". see the UNITS FORMATTING section for more details on the unit string format.

🌈 CREATING CONSTANTS

Syntax:

constant constant_symbol constant_definition

this syntax can be used to define a physical constant. both the constant symbol and definition must be quoted strings. the constant definition should be a numeric constant followed by a units string e.g. "1.60217733e-19_C". all units used in the constant definition must already have been defined β€” so define your units first, bestie, order matters πŸŽ€


πŸ’– CONFIGURATION VARIABLES πŸ’–

the following configuration variables may be set as described in the SETTING CONFIGURATION VARIABLES section.

  • datadir β€” this variable should be set to the full path of the Orpie data directory, which will contain the calculator state save file, temporary buffers, etc. the default directory is \~/.orpie/.
  • editor β€” this variable may be set to the fullscreen editor of your choice. the default value is "vi". it is recommended that you choose an editor that offers horizontal scrolling in place of word wrapping, so that the columns of large matrices can be properly aligned. (the Vim editor could be used in this fashion by setting editor to "vim -c 'set nowrap'".)
  • hide_help β€” set this variable to "true" to hide the left help/status panel, or leave it on the default of "false" to display the help panel.
  • conserve_memory β€” set this variable to "true" to minimize memory usage, or leave it on the default of "false" to improve rendering performance. (by default, Orpie caches multiple string representations of all stack elements. very large integers in particular require significant computation for string representation, so caching these strings can make display updates much faster.) speed vs. memory, the eternal saga ✨

πŸ‘‘ CALCULATOR OPERATIONS πŸ‘‘

every calculator operation can be made available to the interface using the syntax described in the sections on CREATING KEY BINDINGS and CREATING OPERATION ABBREVIATIONS. the following is a list of every available operation. yes, every. buckle up πŸ’…

🌟 FUNCTIONS 🌟

the following operations are functions β€” that is, they will consume at least one argument from the stack. Orpie will generally abort the computation and provide an informative error message if a function cannot be successfully applied (for example, if you try to compute the transpose of something that is not a matrix). it's not being mean, it's just being honest 😭

for the exact integer data type, basic arithmetic operations will yield an exact integer result. division of two exact integers will yield the quotient of the division. the more complicated functions will generally promote the integer to a real number, and as such the arithmetic will no longer be exact. so like, precision girlies, take note 🫢

  • function_10_x β€” raise 10 to the power of the last stack element (inverse of function_log10).
  • function_abs β€” compute the absolute value of the last stack element.
  • function_acos β€” compute the inverse cosine of the last stack element. for real numbers, the result will be provided either in degrees or radians, depending on the angle mode of the calculator.
  • function_acosh β€” compute the inverse hyperbolic cosine of the last stack element.
  • function_add β€” add last two stack elements.

okay the function list keeps going and going (there are so many more), so catch the rest in part 2 bestie β€” this is only the beginning πŸŒˆπŸ’–

  • function_arg β€” okay so this one computes the argument (aka the phase angle of a complex number) of the last stack element 🌈. The value comes at you in either degrees or radians, depending on the calculator's current angle mode.
  • function_asin β€” computes the inverse sine of the last stack element ✨. For real numbers, the result will be in degrees or radians, depending on the angle mode of the calculator.
  • function_asinh β€” computes the inverse hyperbolic sine of the last stack element πŸ¦‹.
  • function_atan β€” computes the inverse tangent of the last stack element πŸ’«. For real numbers, the result is in degrees or radians, depending on the calculator's angle mode.
  • function_atanh β€” computes the inverse hyperbolic tangent of the last stack element 🌸.
  • function_binomial_coeff β€” computes the binomial coefficient (n choose k) formed by the last two stack elements πŸ‘‘. If those arguments are real, the coefficient is computed using a fast approximation to the log of the gamma function, so the result is subject to rounding errors. For exact integer arguments, the coefficient is computed using exact arithmetic; this has the potential to be a slow operation.
  • function_ceiling β€” computes the ceiling of the last stack element πŸ’….
  • function_convert_units β€” converts stack element 2 to an equivalent expression in the units of element 1 πŸŽ€. Element 1 should be real-valued, and its magnitude will be ignored when computing the conversion.
  • function_cos β€” computes the cosine of the last stack element 🌈. If the argument is real, it will be assumed to be either degrees or radians, depending on the angle mode of the calculator.
  • function_cosh β€” computes the hyperbolic cosine of the last stack element πŸ’–.
  • function_conj β€” computes the complex conjugate of the last stack element ✨.
  • function_div β€” divides element 2 by element 1 πŸ’«.
  • function_erf β€” computes the error function of the last stack element 🧚.
  • function_erfc β€” computes the complementary error function of the last stack element πŸ¦‹.
  • function_eval β€” obtains the contents of the variable in the last stack position 🌸.
  • function_exp β€” evaluates the exponential function of the last stack element πŸ’….
  • function_factorial β€” computes the factorial of the last stack element πŸ‘‘. For a real argument, this is computed using a fast approximation to the gamma function, so the result may be subject to rounding errors (or overflow). For an exact integer argument, the factorial is computed using exact arithmetic; this has the potential to be a slow operation.
  • function_floor β€” computes the floor of the last stack element 🌈.
  • function_gamma β€” computes the Euler gamma function of the last stack element πŸ’–.
  • function_gcd β€” computes the greatest common divisor of the last two stack elements ✨. This operation may be applied only to integer type data.
  • function_im β€” computes the imaginary part of the last stack element πŸ’«.
  • function_inv β€” computes the multiplicative inverse of the last stack element πŸ¦‹.
  • function_lcm β€” computes the least common multiple of the last two stack elements 🌸. This operation may be applied only to integer type data.
  • function_ln β€” computes the natural logarithm of the last stack element πŸ’….
  • function_lngamma β€” computes the natural logarithm of the Euler gamma function of the last stack element πŸ‘‘.
  • function_log10 β€” computes the base-10 logarithm of the last stack element 🌈.
  • function_maximum β€” finds the maximum values of each of the columns of a real NxM matrix, returning a 1xM matrix as a result πŸ’–.
  • function_minimum β€” finds the minimum values of each of the columns of a real NxM matrix, returning a 1xM matrix as a result ✨.
  • function_mean β€” computes the sample means of each of the columns of a real NxM matrix, returning a 1xM matrix as a result πŸ’«.
  • function_mod β€” computes element 2 mod element 1 πŸ¦‹. This operation can be applied only to integer type data.
  • function_mult β€” multiplies the last two stack elements 🌸.
  • function_neg β€” negates the last stack element πŸ’….
  • function_permutation β€” computes the permutation coefficient determined by the last two stack elements 'n' and 'k': the number of ways of obtaining an ordered subset of k elements from a set of n elements πŸ‘‘. If these arguments are real, the coefficient is computed using a fast approximation to the log of the gamma function, so the result is subject to rounding errors. For exact integer arguments, the coefficient is computed using exact arithmetic; this has the potential to be a slow operation.
  • function_pow β€” raises element 2 to the power of element 1 🌈.
  • function_purge β€” deletes the variable in the last stack position πŸ’–.
  • function_re β€” computes the real part of the last stack element ✨.
  • function_sin β€” computes the sine of the last stack element πŸ’«. If the argument is real, it will be assumed to be either degrees or radians, depending on the angle mode of the calculator.
  • function_sinh β€” computes the hyperbolic sine of the last stack element πŸ¦‹.
  • function_solve_linear β€” solves a linear system of the form Ax = b, where A and b are the last two elements on the stack 🌸. A must be a square matrix and b must be a matrix with one column. This function does not compute inv(A), but obtains the solution by a more efficient LU decomposition method. This function is recommended over explicitly computing the inverse, especially when solving linear systems with relatively large dimension or with poorly conditioned matrices.
  • function_sq β€” squares the last stack element πŸ’….
  • function_sqrt β€” computes the square root of the last stack element πŸ‘‘.
  • function_standardize_units β€” converts the last stack element to an equivalent expression using the SI standard base units (kg, m, s, etc.) 🌈.
  • function_stdev_unbiased β€” computes the unbiased sample standard deviation of each of the columns of a real NxM matrix, returning a 1xM matrix as a result πŸ’–. (Compare to HP48's sdev function.)
  • function_stdev_biased β€” computes the biased (population) sample standard deviation of each of the columns of a real NxM matrix, returning a 1xM matrix as a result ✨. (Compare to HP48's psdev function.)
  • function_store β€” stores element 2 in (variable) element 1 πŸ’«.
  • function_sub β€” subtracts element 1 from element 2 πŸ¦‹.
  • function_sumsq β€” sums the squares of each of the columns of a real NxM matrix, returning a 1xM matrix as a result 🌸.
  • function_tan β€” computes the tangent of the last stack element πŸ’…. If the argument is real, it will be assumed to be either degrees or radians, depending on the angle mode of the calculator.
  • function_tanh β€” computes the hyperbolic tangent of the last stack element πŸ‘‘.
  • function_to_int β€” converts a real number to an integer type 🌈.
  • function_to_real β€” converts an integer type to a real number πŸ’–.
  • function_total β€” sums each of the columns of a real NxM matrix, returning a 1xM matrix as a result ✨.
  • function_trace β€” computes the trace of a square matrix πŸ’«.
  • function_transpose β€” computes the matrix transpose of the last stack element πŸ¦‹.
  • function_unit_value β€” drops the units of the last stack element 🌸.
  • function_utpn β€” computes the upper tail probability of a normal distribution πŸ’…. UTPN(m, v, x) = Integrate[ 1/Sqrt[2 Pi v] Exp[-(m-y)^2/(2 v)], {y, x, Infinity}]
  • function_var_unbiased β€” computes the unbiased sample variance of each of the columns of a real NxM matrix, returning a 1xM matrix as a result πŸ‘‘. (Compare to HP48's var function.)
  • function_var_biased β€” computes the biased (population) sample variance of each of the columns of a real NxM matrix, returning a 1xM matrix as a result 🌈. (Compare to HP48's pvar function.)

πŸ’– COMMANDS πŸ’–

Okay so these are the commands β€” they're different from functions because they don't take an argument πŸŽ€. A lot of calculator interface settings are implemented as commands.

  • command_about β€” displays a nifty about Orpie credits screen ✨.
  • command_begin_abbrev β€” begins entry of an operation abbreviation πŸ’«.
  • command_begin_browsing β€” enters stack browsing mode πŸ¦‹.
  • command_begin_constant β€” begins entry of a physical constant 🌸.
  • command_begin_variable β€” begins entry of a variable name πŸ’….
  • command_bin β€” sets the base of exact integer representation to 2 (binary) πŸ‘‘.
  • command_clear β€” clears all elements from the stack 🌈.
  • command_cycle_base β€” cycles the base of exact integer representation between 2, 8, 10, and 16 (bin, oct, dec, and hex) πŸ’–.
  • command_cycle_help β€” cycles through multiple help pages ✨. The first page displays commonly used bindings, and the second page displays the current autobindings.
  • command_dec β€” sets the base of exact integer representation to 10 (decimal) πŸ’«.
  • command_deg β€” sets the angle mode to degrees πŸ¦‹.
  • command_drop β€” drops the last element off the stack 🌸.
  • command_dup β€” duplicates the last stack element πŸ’….
  • command_enter_pi β€” enters 3.1415... on the stack πŸ‘‘.
  • command_hex β€” sets the base of exact integer representation to 16 (hexadecimal) 🌈.
  • command_oct β€” sets the base of exact integer representation to 8 (octal) πŸ’–.
  • command_polar β€” sets the complex display mode to polar ✨.
  • command_rad β€” sets the angle mode to radians πŸ’«.
  • command_rand β€” generates a random real-valued number between 0 (inclusive) and 1 (exclusive) πŸ¦‹. The deviates are uniformly distributed.
  • command_rect β€” sets the complex display mode to rectangular, aka cartesian. πŸ’…
  • command_refresh β€” refreshes the display. That's it, that's the whole job. ✨
  • command_swap β€” swaps stack elements 1 and 2. Just the two of them, bestie, no more.
  • command_quit β€” quits Orpie. bye babe 🫢
  • command_toggle_angle_mode β€” toggles the angle mode between degrees and radians.
  • command_toggle_complex_mode β€” toggles the complex display mode between rectangular and polar.
  • command_undo β€” undoes the last calculator operation. the rewind button of your dreams 😭
  • command_view β€” views the last stack element in an external fullscreen editor.
  • command_edit_input β€” creates a new stack element using an external editor.

✏️ EDIT OPERATIONS ✏️

Okay so these ones are all about editing while you're typing data in. Big heads-up though: these commands cannot be made available as operation abbreviations, because abbreviations just aren't accessible while you're entering data. So what you do instead is make them available as single keypresses using the bind keyword. πŸ‘‘

  • edit_angle β€” starts you entering the phase angle of a complex number. (Orpie will assume that angle is in degrees or in radians, depending on whatever the current angle mode is. it's giving "read the room".)
  • edit_backspace β€” deletes the last character you entered.
  • edit_begin_integer β€” starts you entering an exact integer.
  • edit_begin_units β€” starts you appending units to a numeric expression.
  • edit_complex β€” starts you entering a complex number.
  • edit_enter β€” enters the data you're currently editing. committing, slay ✨
  • edit_matrix β€” starts you entering a matrix, or starts you entering the next row of a matrix.
  • edit_minus β€” enters a minus sign in input.
  • edit_scientific_notation_base β€” starts you entering the scientific notation exponent of a real number, or the base of an exact integer.
  • edit_separator β€” starts you editing the next element of a complex number or a matrix. (It'll insert a comma between elements. cute little comma. πŸŽ€)

πŸ” BROWSING OPERATIONS πŸ”

This whole list only exists in stack browsing mode. And since abbreviations are unavailable while you're browsing the stack, you should bind these to single keypresses with the bind keyword. Same energy as above. πŸ’œ

  • browse_echo β€” echoes the currently selected element to stack level 1.
  • browse_end β€” exits stack browsing mode. the exit door, the escape hatch 🌸
  • browse_drop β€” drops the currently selected stack element.
  • browse_dropn β€” drops all stack elements below the current selection (inclusive).
  • browse_keep β€” drops all stack elements except the current selection. (This one is complementary to browse_drop.)
  • browse_keepn β€” drops all stack elements above the current selection (non-inclusive). (This one is complementary to browse_dropn.)
  • browse_next_line β€” moves the selection cursor down one line.
  • browse_prev_line β€” moves the selection cursor up one line.
  • browse_rolldown β€” cyclically ``roll''s stack elements downward, below the selected element (inclusive).
  • browse_rollup β€” cyclically ``roll''s stack elements upward, below the selected element (inclusive).
  • browse_scroll_left β€” scrolls the selected element to the left (for viewing very large entries, like matrices β€” think main character sized πŸ“).
  • browse_scroll_right β€” scrolls the selected element to the right.
  • browse_view β€” views the currently selected stack element in a fullscreen editor.
  • browse_edit β€” edits the currently selected stack element using an external editor.

🫢 ABBREVIATION ENTRY OPERATIONS 🫢

These only exist while you're entering a function or command abbreviation, or while you're entering a physical constant. They must be bound to single keypresses using the bind keyword. no cap.

  • abbrev_backspace β€” deletes a character from the abbreviation string.
  • abbrev_enter β€” executes the operation associated with the selected abbreviation.
  • abbrev_exit β€” cancels abbreviation entry.

🌈 VARIABLE ENTRY OPERATIONS 🌈

Only available while you're entering a variable name. And since abbreviations are unavailable while entering variables, you should bind these to single keypresses using the bind keyword. iykyk.

  • variable_backspace β€” deletes a character from the variable name.
  • variable_cancel β€” cancels entry of the variable name.
  • variable_complete β€” autocompletes the variable name. we love a shortcut πŸ’…
  • variable_enter β€” enters the variable name on the stack.

πŸ”’ INTEGER ENTRY OPERATIONS πŸ”’

Literally just the one here, bestie. It's only available while you're entering an integer, and you can make it accessible by binding it to a single keypress using the bind keyword.

  • integer_cancel β€” cancels entry of an integer.

πŸ‘€ SEE ALSO πŸ‘€


πŸ’– AUTHOR πŸ’–

This manpage is written by Paul J. Pelzl <pelzlpj@gmail.com>. thank you for your service king 🫑


and that's a wrap on ORPIERC(5) β€” the configuration file for the Orpie RPN calculator, if you were wondering what the truncated title was doing. πŸ““

This lil beauty is dated 28 August 2018 in its footer, and it lives under the versioned source line that reads configuration file for the Or... β€” so that's your source, that's your date, and ORPIERC(5) is the section. Obsessed. Go forth and bind some keys, bestie. πŸ’œβœ¨πŸŽ€