ORPIERC(5)
β¨ 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:
- 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.
- 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 settingeditorto"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 offunction_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 realNxMmatrix, returning a1xMmatrix as a result π.function_minimumβ finds the minimum values of each of the columns of a realNxMmatrix, returning a1xMmatrix as a result β¨.function_meanβ computes the sample means of each of the columns of a realNxMmatrix, returning a1xMmatrix 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 ofkelements from a set ofnelements π. 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 formAx = b, whereAandbare the last two elements on the stack πΈ.Amust be a square matrix andbmust be a matrix with one column. This function does not computeinv(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 realNxMmatrix, returning a1xMmatrix as a result π. (Compare to HP48'ssdevfunction.)function_stdev_biasedβ computes the biased (population) sample standard deviation of each of the columns of a realNxMmatrix, returning a1xMmatrix as a result β¨. (Compare to HP48'spsdevfunction.)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 realNxMmatrix, returning a1xMmatrix 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 realNxMmatrix, returning a1xMmatrix 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 realNxMmatrix, returning a1xMmatrix as a result π. (Compare to HP48'svarfunction.)function_var_biasedβ computes the biased (population) sample variance of each of the columns of a realNxMmatrix, returning a1xMmatrix as a result π. (Compare to HP48'spvarfunction.)
π 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 niftyabout Orpiecredits 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 to2(binary) π.command_clearβ clears all elements from the stack π.command_cycle_baseβ cycles the base of exact integer representation between2,8,10, and16(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 to10(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β enters3.1415...on the stack π.command_hexβ sets the base of exact integer representation to16(hexadecimal) π.command_octβ sets the base of exact integer representation to8(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 between0(inclusive) and1(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 tobrowse_drop.)browse_keepnβ drops all stack elements above the current selection (non-inclusive). (This one is complementary tobrowse_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. πβ¨π
π¦ where this page comes from
- debian bookworm: orpie 1.6.1-1+b2
- debian trixie: orpie 1.6.1-2.1
- ubuntu jammy: orpie 1.6.1-1build1
- ubuntu noble: orpie 1.6.1-2
- ubuntu questing: orpie 1.6.1-2.1
- ubuntu resolute: orpie 1.6.1-2.2
- ubuntu stonking: orpie 1.6.1-3 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms