1ORPIERC(5)       configuration file for the Orpie calculator        ORPIERC(5)
2
3
4

NAME

6       orpierc is the configuration textfile for the orpie(1) console calcula‐
7       tor.
8

INTRODUCTION

10       CAUTION: while this manpage should be suitable as a quick reference, it
11       may be subject to miscellaneous shortcomings in typesetting. The defin‐
12       itive documentation is the user manual provided with Orpie in PDF  for‐
13       mat.
14
15       Orpie  reads  a  run-configuration  textfile (generally /etc/orpierc or
16       /usr/local/etc/orpierc) to determine key and command bindings. You  can
17       create  a personalized configuration file in $HOME/.orpierc, and select
18       bindings that match your usage patterns. The recommended  procedure  is
19       to  ``include''  the  orpierc  file  provided with Orpie (see INCLUDING
20       OTHER RCFILES), and add or remove settings as desired.
21

ORPIERC SYNTAX

23       You may notice that the orpierc syntax is similar to the syntax used in
24       the configuration file for the Mutt email client (muttrc).
25
26       Within  the  orpierc  file, strings should be enclosed in double quotes
27       (").  A double quote character inside a string may be represented by \"
28       .  The backslash character must be represented by doubling it (\\).
29
30   INCLUDING OTHER RCFILES
31       Syntax: include filename_string
32       This  syntax  can  be used to include one run-configuration file within
33       another.  This command could be used to load the default  orpierc  file
34       (probably found in /etc/orpierc) within your personalized rcfile,
35        {/.orpierc}. The filename string should be enclosed in quotes.
36
37   SETTING CONFIGURATION VARIABLES
38       Syntax: set variable=value_string
39       Several configuration variables can be set using this syntax; check the
40       CONFIGURATION VARIABLES description to see a list.  The  variables  are
41       unquoted, but the values should be quoted strings.
42
43   CREATING KEY BINDINGS
44       Syntax: bind key_identifier operation
45       This  command  will  bind a keypress to execute a calculator operation.
46       The various operations, which should not be enclosed in quotes, may  be
47       found  in the section on CALCULATOR OPERATIONS.  Key identifiers may be
48       specified by strings that represent a single keypress, for example  "m"
49       (quotes  included). The key may be prefixed with "\\C" or "\\M" to rep‐
50       resent Control or Meta (Alt) modifiers,  respectively;  note  that  the
51       backslash must be doubled. A number of special keys lack single-charac‐
52       ter representations, so the following strings may be used to  represent
53       them:
54
55       *      "<esc>"
56
57       *      "<tab>"
58
59       *      "<enter>"
60
61       *      "<return>"
62
63       *      "<insert>"
64
65       *      "<home>"
66
67       *      "<end>"
68
69       *      "<pageup>"
70
71       *      "<pagedown>"
72
73       *      "<space>"
74
75       *      "<left>"
76
77       *      "<right>"
78
79       *      "<up>"
80
81       *      "<down>"
82
83       *      "<f1>" to "<f12>"
84
85       Due to differences between various terminal emulators, this key identi‐
86       fier syntax may not be adequate to describe every keypress. As a  work‐
87       around, Orpie will also accept key identifiers in octal notation. As an
88       example, you could use \024 (do not enclose it in quotes) to  represent
89       Ctrl-T.
90
91       Orpie  includes  a secondary executable, orpie-curses-keys, that prints
92       out the key identifiers associated with keypresses.  You  may  find  it
93       useful when customizing orpierc.
94
95       Multiple keys may be bound to the same operation, if desired.
96
97   REMOVING KEY BINDINGS
98       Syntax:
99       unbind_function key_identifier
100       unbind_command key_identifier
101       unbind_edit key_identifier
102       unbind_browse key_identifier
103       unbind_abbrev key_identifier
104       unbind_variable key_identifier
105       unbind_integer key_identifier
106       These  commands  will  remove  key bindings associated with the various
107       entry modes (functions, commands, editing operations,  etc.).  The  key
108       identifiers  should be defined using the syntax described in the previ‐
109       ous section.
110
111   CREATING KEY AUTO-BINDINGS
112       Syntax: autobind key_identifier
113       In order to make repetitive calculations more pleasant, Orpie offers an
114       automatic  key  binding feature. When a function or command is executed
115       using its abbreviation, one of the keys selected by the autobind syntax
116       will be automatically bound to that operation (unless the operation has
117       already been bound to a key). The current set of  autobindings  can  be
118       viewed  in the help panel by executing command_cycle_help (bound to 'h'
119       by default).
120
121       The syntax for the key identifiers is provided in the previous section.
122
123   CREATING OPERATION ABBREVIATIONS
124       Syntax: abbrev operation_abbreviation operation
125       You can use this syntax to set the abbreviations used within  Orpie  to
126       represent the various functions and commands. A list of available oper‐
127       ations may be found in the CALCULATOR OPERATIONS section.   The  opera‐
128       tion  abbreviations  should  be  quoted  strings,  for example "sin" or
129       "log".
130
131       Orpie performs autocompletion on these abbreviations, allowing  you  to
132       type usually just a few letters in order to select the desired command.
133       The order of the autocompletion matches will be the same as  the  order
134       in  which  the  abbreviations  are registered by the rcfile--so you may
135       wish to place the more commonly used operation abbreviations earlier in
136       the list.
137
138       Multiple abbreviations may be bound to the same operation, if desired.
139
140   REMOVING OPERATION ABBREVIATIONS
141       Syntax: unabbrev operation_abbreviation
142       This syntax can be used to remove an operation abbreviation. The opera‐
143       tion abbreviations should be quoted strings, as described in the previ‐
144       ous section.
145
146   CREATING MACROS
147       Syntax: macro key_identifier macro_string
148       You can use this syntax to cause a single keypress (the key_identifier)
149       to be interpreted as the series of keypresses listed  in  macro_string.
150       The  syntax  for defining a keypress is the same as that defined in the
151       section on CREATING KEY BINDINGS.  The macro string should be a list of
152       whitespace-separated  keypresses,  e.g.   "2  <return>  2 +" (including
153       quotes).
154
155       This macro syntax provides a way to create small programs;  by  way  of
156       example,  the default orpierc file includes macros for the base 2 loga‐
157       rithm and the binary entropy function (bound to L and H, respectively),
158       as well as ``register'' variable shortcuts (<f1> to <f12>).
159
160       Macros  may  call  other  macros recursively. However, take care that a
161       macro does not call itself recursively; Orpie will not trap  the  infi‐
162       nite loop.
163
164       Note  that  operation  abbreviations may be accessed within macros. For
165       example, macro "A" "' a b o u t <return>" would bind A to  display  the
166       ``about Orpie'' screen.
167

CONFIGURATION VARIABLES

169       The  following  configuration  variables may be set as described in the
170       SETTING CONFIGURATION VARIABLES section.
171
172       *      datadir
173              This variable should be set to the full path of the  Orpie  data
174              directory,  which  will  contain the calculator state save file,
175              temporary buffers, etc.  The default directory is "\~/.orpie/".
176
177       *      editor
178              This variable may be  set  to  the  fullscreen  editor  of  your
179              choice.  The  default  value is "vi". It is recommended that you
180              choose an editor that offers horizontal scrolling  in  place  of
181              word  wrapping,  so  that  the  columns of large matrices can be
182              properly aligned. (The Vim editor could be used in this  fashion
183              by setting editor to "vim -c 'set nowrap'".)
184
185       *      hide_help
186              Set  this variable to "true" to hide the left help/status panel,
187              or leave it on the default of "false" to display the help panel.
188
189       *      conserve_memory
190              Set this variable to "true" to minimize memory usage,  or  leave
191              it  on  the default of "false" to improve rendering performance.
192              (By default, Orpie caches multiple string representations of all
193              stack  elements.  Very large integers in particular require sig‐
194              nificant computation for string representation, so caching these
195              strings can make display updates much faster.)
196

CALCULATOR OPERATIONS

198       Every calculator operation can be made available to the interface using
199       the syntax described in the sections on CREATING KEY BINDINGS and  CRE‐
200       ATING OPERATION ABBREVIATIONS.  The following is a list of every avail‐
201       able operation.
202
203   FUNCTIONS
204       The following operations are functions--that is, they will  consume  at
205       least  one argument from the stack. Orpie will generally abort the com‐
206       putation and provide an informative error message if a function  cannot
207       be  successfully applied (for example, if you try to compute the trans‐
208       pose of something that is not a matrix).
209
210       For the integer constant data type, basic  arithmetic  operations  will
211       yield  an  exact  integer constant result. Division of two integer con‐
212       stants will yield the quotient of the division.  The  more  complicated
213       functions will generally promote the integer constant to a real number,
214       and as such the arithmetic will no longer be exact.
215
216       *      function_10_x
217              Raise 10 to the power of the  last  stack  element  (inverse  of
218              function_log10).
219
220       *      function_abs
221              Compute the absolute value of the last stack element.
222
223       *      function_acos
224              Compute  the  inverse cosine of the last stack element. For real
225              numbers, The result will be provided either in degrees or  radi‐
226              ans, depending on the angle mode of the calculator.
227
228       *      function_acosh
229              Compute the inverse hyperbolic cosine of the last stack element.
230
231       *      function_add
232              Add last two stack elements.
233
234       *      function_arg
235              Compute the argument (phase angle of complex number) of the last
236              stack element. The value will be provided in either  degrees  or
237              radians, depending on the current angle mode of the calculator.
238
239       *      function_asin
240              Compute  the  inverse  sine  of the last stack element. For real
241              numbers, The result will be provided either in degrees or  radi‐
242              ans, depending on the angle mode of the calculator.
243
244       *      function_asinh
245              Compute the inverse hyperbolic sine of the last stack element.
246
247       *      function_atan
248              Compute  the inverse tangent of the last stack element. For real
249              numbers, The result will be provided either in degrees or  radi‐
250              ans, depending on the angle mode of the calculator.
251
252       *      function_atanh
253              Compute  the  inverse  hyperbolic tangent of the last stack ele‐
254              ment.
255
256       *      function_binomial_coeff
257              Compute the binomial coefficient (``n choose k'') formed by  the
258              last  two stack elements. If these arguments are real, the coef‐
259              ficient is computed using a fast approximation to the log of the
260              gamma  function, and therefore the result is subject to rounding
261              errors. For integer constant arguments, the coefficient is  com‐
262              puted  using  exact  arithmetic;  this has the potential to be a
263              slow operation.
264
265       *      function_ceiling
266              Compute the ceiling of the last stack element.
267
268       *      function_convert_units
269              Convert stack element 2 to an equivalent expression in the units
270              of element 1. Element 1 should be real-valued, and its magnitude
271              will be ignored when computing the conversion.
272
273       *      function_cos
274              Compute the cosine of the last stack element. If the argument is
275              real,  it  will  be  assumed  to  be  either degrees or radians,
276              depending on the angle mode of the calculator.
277
278       *      function_cosh
279              Compute the hyperbolic cosine of the last stack element.
280
281       *      function_conj
282              Compute the complex conjugate of the last stack element.
283
284       *      function_div
285              Divide element 2 by element 1.
286
287       *      function_erf
288              Compute the error function of the last stack element.
289
290       *      function_erfc
291              Compute the complementary error function of the last stack  ele‐
292              ment.
293
294       *      function_eval
295              Obtain the contents of the variable in the last stack position.
296
297       *      function_exp
298              Evaluate the exponential function of the last stack element.
299
300       *      function_factorial
301              Compute  the  factorial  of  the  last stack element. For a real
302              argument, this is computed using a  fast  approximation  to  the
303              gamma  function,  and  therefore  the  result  may be subject to
304              rounding errors (or overflow). For an integer constant argument,
305              the  factorial  is computed using exact arithmetic; this has the
306              potential to be a slow operation.
307
308       *      function_floor
309              Compute the floor of the last stack element.
310
311       *      function_gamma
312              Compute the Euler gamma function of the last stack element.
313
314       *      function_gcd
315              Compute the greatest common divisor of the last two  stack  ele‐
316              ments. This operation may be applied only to integer type data.
317
318       *      function_im
319              Compute the imaginary part of the last stack element.
320
321       *      function_inv
322              Compute the multiplicative inverse of the last stack element.
323
324       *      function_lcm
325              Compute  the  least  common  multiple of the last two stack ele‐
326              ments. This operation may be applied only to integer type data.
327
328       *      function_ln
329              Compute the natural logarithm of the last stack element.
330
331       *      function_lngamma
332              Compute the natural logarithm of the Euler gamma function of the
333              last stack element.
334
335       *      function_log10
336              Compute the base-10 logarithm of the last stack element.
337
338       *      function_maximum
339              Find  the  maximum  values  of each of the columns of a real NxM
340              matrix, returning a 1xM matrix as a result.
341
342       *      function_minimum
343              Find the minimum values of each of the columns  of  a  real  NxM
344              matrix, returning a 1xM matrix as a result.
345
346       *      function_mean
347              Compute  the  sample  means of each of the columns of a real NxM
348              matrix, returning a 1xM matrix as a result.
349
350       *      function_mod
351              Compute element 2 mod element 1. This operation can  be  applied
352              only to integer type data.
353
354       *      function_mult
355              Multiply last two stack elements.
356
357       *      function_neg
358              Negate last stack element.
359
360       *      function_permutation
361              Compute  the  permutation coefficient determined by the last two
362              stack elements 'n' and 'k': the number of ways of  obtaining  an
363              ordered subset of k elements from a set of n elements.  If these
364              arguments are real, the coefficient is  computed  using  a  fast
365              approximation  to  the  log of the gamma function, and therefore
366              the result is subject to rounding errors. For  integer  constant
367              arguments,  the  coefficient is computed using exact arithmetic;
368              this has the potential to be a slow operation.
369
370       *      function_pow
371              Raise element 2 to the power of element 1.
372
373       *      function_purge
374              Delete the variable in the last stack position.
375
376       *      function_re
377              Compute the real part of the last stack element.
378
379       *      function_sin
380              Compute the sine of the last stack element. If the  argument  is
381              real,  it  will  be  assumed  to  be  either degrees or radians,
382              depending on the angle mode of the calculator.
383
384       *      function_sinh
385              Compute the hyperbolic sine of the last stack element.
386
387       *      function_solve_linear
388              Solve a linear system of the form Ax = b, where A and b are  the
389              last  two elements on the stack. A must be a square matrix and b
390              must be a matrix with one column. This function does not compute
391              inv(A), but obtains the solution by a more efficient LU decompo‐
392              sition method.  This function  is  recommended  over  explicitly
393              computing  the  inverse,  especially when solving linear systems
394              with relatively  large  dimension  or  with  poorly  conditioned
395              matrices.
396
397       *      function_sq
398              Square the last stack element.
399
400       *      function_sqrt
401              Compute the square root of the last stack element.
402
403       *      function_standardize_units
404              Convert the last stack element to an equivalent expression using
405              the SI standard base units (kg, m, s, etc.).
406
407       *      function_stdev_unbiased
408              Compute the unbiased sample standard deviation of  each  of  the
409              columns  of  a  real  NxM  matrix,  returning  a 1xM matrix as a
410              result. (Compare to HP48's sdev function.)
411
412       *      function_stdev_biased
413              Compute the biased (population)  sample  standard  deviation  of
414              each of the columns of a real NxM matrix, returning a 1xM matrix
415              as a result. (Compare to HP48's psdev function.)
416
417       *      function_store
418              Store element 2 in (variable) element 1.
419
420       *      function_sub
421              Subtract element 1 from element 2.
422
423       *      function_sumsq
424              Sum the squares of each of the columns of  a  real  NxM  matrix,
425              returning a 1xM matrix as a result.
426
427       *      function_tan
428              Compute  the  tangent of the last stack element. If the argument
429              is real, it will be assumed to be  either  degrees  or  radians,
430              depending on the angle mode of the calculator.
431
432       *      function_tanh
433              Compute the hyperbolic tangent of the last stack element.
434
435       *      function_to_int
436              Convert a real number to an integer type.
437
438       *      function_to_real
439              Convert an integer type to a real number.
440
441       *      function_total
442              Sum  each  of  the columns of a real NxM matrix, returning a 1xM
443              matrix as a result.
444
445       *      function_trace
446              Compute the trace of a square matrix.
447
448       *      function_transpose
449              Compute the matrix transpose of the last stack element.
450
451       *      function_unit_value
452              Drop the units of the last stack element.
453
454       *      function_utpn
455              Compute the upper tail probability of a normal distribution.
456              UTPN(m, v, x) = Integrate[ 1/Sqrt[2 Pi v]  Exp[-(m-y)^2/(2  v)],
457              {y, x, Infinity}]
458
459       *      function_var_unbiased
460              Compute the unbiased sample variance of each of the columns of a
461              real NxM matrix, returning a 1xM matrix as a result. (Compare to
462              HP48's var function.)
463
464       *      function_var_biased
465              Compute  the  biased (population) sample variance of each of the
466              columns of a real NxM  matrix,  returning  a  1xM  matrix  as  a
467              result. (Compare to HP48's pvar function.)
468
469   COMMANDS
470       The  following operations are referred to as commands; they differ from
471       functions because they do not take an argument. Many calculator  inter‐
472       face settings are implemented as commands.
473
474       *      command_about
475              Display a nifty ``about Orpie'' credits screen.
476
477       *      command_begin_browsing
478              Enter stack browsing mode.
479
480       *      command_begin_abbrev
481              Begin entry of an operation abbreviation.
482
483       *      command_begin_variable
484              Begin entry of a variable name.
485
486       *      command_bin
487              Set the base of integer constant representation to 2 (binary).
488
489       *      command_clear
490              Clear all elements from the stack.
491
492       *      command_cycle_base
493              Cycle  the base of integer constant representation between 2, 8,
494              10, and 16 (bin, oct, dec, and hex).
495
496       *      command_cycle_help
497              Cycle through multiple help pages. The first page displays  com‐
498              monly  used  bindings,  and the second page displays the current
499              autobindings.
500
501       *      command_dec
502              Set the base of integer constant representation to 10 (decimal).
503
504       *      command_deg
505              Set the angle mode to degrees.
506
507       *      command_drop
508              Drop the last element off the stack.
509
510       *      command_dup
511              Duplicate the last stack element.
512
513       *      command_enter_pi
514              Enter 3.1415...  on the stack.
515
516       *      command_hex
517              Set the base of integer constant representation to 16 (hexadeci‐
518              mal).
519
520       *      command_oct
521              Set the base of integer constant representation to 8 (octal).
522
523       *      command_polar
524              Set the complex display mode to polar.
525
526       *      command_rad
527              Set the angle mode to radians.
528
529       *      command_rand
530              Generate a random real-valued number between 0 (inclusive) and 1
531              (exclusive). The deviates are uniformly distributed.
532
533       *      command_rect
534              Set the complex display mode to rectangular (cartesian).
535
536       *      command_refresh
537              Refresh the display.
538
539       *      command_swap
540              Swap stack elements 1 and 2.
541
542       *      command_quit
543              Quit Orpie.
544
545       *      command_toggle_angle_mode
546              Toggle the angle mode between degrees and radians.
547
548       *      command_toggle_complex_mode
549              Toggle the complex display mode between rectangular and polar.
550
551       *      command_undo
552              Undo the last calculator operation.
553
554       *      command_view
555              View the last stack element in an external fullscreen editor.
556
557       *      command_edit_input
558              Create a new stack element using an external editor.
559
560   EDIT OPERATIONS
561       The following operations are related  to  editing  during  data  entry.
562       These  commands  cannot  be  made available as operation abbreviations,
563       since abbreviations are not accessible while entering data. These oper‐
564       ations  should  be  made  available as single keypresses using the bind
565       keyword.
566
567       *      edit_angle
568              Begin entering the phase angle of a complex number. (Orpie  will
569              assume  the  angle is in either degrees or radians, depending on
570              the current angle mode.)
571
572       *      edit_backspace
573              Delete the last character entered.
574
575       *      edit_begin_integer
576              Begin entering an integer constant.
577
578       *      edit_begin_units
579              Begin appending units to a numeric expression.
580
581       *      edit_complex
582              Begin entering a complex number.
583
584       *      edit_enter
585              Enter the data that is currently being edited.
586
587       *      edit_matrix
588              Begin entering a matrix, or begin entering the  next  row  of  a
589              matrix.
590
591       *      edit_minus
592              Enter a minus sign in input.
593
594       *      edit_scientific_notation_base
595              Begin  entering  the scientific notation exponent of a real num‐
596              ber, or the base of an integer constant.
597
598       *      edit_separator
599              Begin editing the next element of a complex  number  or  matrix.
600              (This will insert a comma between elements.)
601
602   BROWSING OPERATIONS
603       The  following  list  of operations is available only in stack browsing
604       mode.  As abbreviations are unavailable while browsing the stack, these
605       operations should be bound to single keypresses using the bind keyword.
606
607       *      browse_echo
608              Echo the currently selected element to stack level 1.
609
610       *      browse_end
611              Exit stack browsing mode.
612
613       *      browse_drop
614              Drop the currently selected stack element.
615
616       *      browse_dropn
617              Drop all stack elements below the current selection (inclusive).
618
619       *      browse_keep
620              Drop  all  stack elements except the current selection. (This is
621              complementary to browse_drop.
622
623       *      browse_keepn
624              Drop all stack elements above the current selection  (non-inclu‐
625              sive). (This is complementary to browse_dropn.
626
627       *      browse_next_line
628              Move the selection cursor down one line.
629
630       *      browse_prev_line
631              Move the selection cursor up one line.
632
633       *      browse_rolldown
634              Cyclically  ``roll'' stack elements downward, below the selected
635              element (inclusive).
636
637       *      browse_rollup
638              Cyclically ``roll'' stack elements upward,  below  the  selected
639              element (inclusive) .
640
641       *      browse_scroll_left
642              Scroll  the selected element to the left (for viewing very large
643              entries such as matrices).
644
645       *      browse_scroll_right
646              Scroll the selected element to the right.
647
648       *      browse_view
649              View the currently selected stack element in a  fullscreen  edi‐
650              tor.
651
652       *      browse_edit
653              Edit the currently selected stack element using an external edi‐
654              tor.
655
656   ABBREVIATION ENTRY OPERATIONS
657       The following list of operations is available  only  while  entering  a
658       function  or  command  abbreviation.  These operations must be bound to
659       single keypresses using the bind keyword.
660
661       *      abbrev_backspace
662              Delete a character from the abbreviation string.
663
664       *      abbrev_enter
665              Execute the operation associated with the selected abbreviation.
666
667       *      abbrev_exit
668              Cancel abbreviation entry.
669
670   VARIABLE ENTRY OPERATIONS
671       The following list of operations is available  only  while  entering  a
672       variable  name.  As  abbreviations are unavailable while entering vari‐
673       ables, these operations should be bound to single keypresses using  the
674       bind keyword.
675
676       *      variable_backspace
677              Delete a character from the variable name.
678
679       *      variable_cancel
680              Cancel entry of the variable name.
681
682       *      variable_complete
683              Autocomplete the variable name.
684
685       *      variable_enter
686              Enter the variable name on the stack.
687
688   INTEGER ENTRY OPERATIONS
689       The following operation is available only while entering an integer; it
690       can be made accessible by binding it to a  single  keypress  using  the
691       bind keyword.
692
693       *      integer_cancel
694              Cancel entry of an integer.
695

SEE ALSO

697       orpie(1), orpie-curses-keys(1)
698

AUTHOR

700       This manpage is written by Paul J. Pelzl <pelzlpj@eecs.umich.edu>.
701
702
703
704configuration file for the Orpie3c1alOccutloabteorr2005                     ORPIERC(5)
Impressum