fuck github
parent
55e9aed304
commit
dd39720e3f
129
README-devel.md
129
README-devel.md
|
@ -1,129 +0,0 @@
|
|||
# lerpn - Linux Engineering RPN calculator
|
||||
|
||||
It's a curses RPN calculator written in straight Python. Not actually Linux-dependent,
|
||||
despite the (old) name. Should work on both Python 2 and 3, though I only regularly
|
||||
use/test it in Py3.
|
||||
|
||||
To install the latest release, just do `pip install --user lerpn`.
|
||||
To install the latest devel, clone this repository and run
|
||||
`pip install --user -e .`.
|
||||
To test-drive, you should be able to call `python -m LerpnApp` from the root of the
|
||||
source tree.
|
||||
|
||||
Note: This README is for the development version. To view the README for the last
|
||||
released version, see
|
||||
[`README.md`](https://github.com/alexisvl/lerpn/blob/master/README.md).
|
||||
|
||||
[//]: # (COMMENTED OUT IN THIS VERSION:)
|
||||
[//]: # (Note: This README is for the last released version - the version you'll get if you)
|
||||
[//]: # (install with pip. To view the README for the devel version, see)
|
||||
[//]: # ([`README-devel.md`](https://github.com/alexisvl/lerpn/blob/master/README-devel.md).)
|
||||
|
||||
# Dependencies
|
||||
|
||||
Just Python.
|
||||
|
||||
# Hacking - adding commands
|
||||
|
||||
If you want to add your own commands to lerpn, see
|
||||
[`HACKING.md`](https://github.com/alexisvl/lerpn/blob/master/HACKING.md)
|
||||
for a quick intro.
|
||||
|
||||
# Quick usage notes:
|
||||
|
||||
How to use lerpn should be obvious for those familiar with RPN. The basic commands:
|
||||
|
||||
```
|
||||
+ - * /
|
||||
|
||||
n swap sign
|
||||
enter dup
|
||||
x exchange/swap
|
||||
bksp drop
|
||||
? display help
|
||||
ctrl-C exit
|
||||
```
|
||||
|
||||
For a quick online command reference, see
|
||||
[`COMMANDS-devel.md`](https://github.com/alexisvl/lerpn/blob/master/COMMANDS-devel.md).
|
||||
|
||||
Numbers are displayed in engineering notation with metric prefixes. You can
|
||||
also type them this way - the number and the metric prefix must be separated
|
||||
by an underscore `_` to differentiate from a number followed by a single-key
|
||||
command.
|
||||
|
||||
Not all commands are a single key. Less-used commands begin with a
|
||||
single-quote, then the command name, then 'enter'. For example, the sequence
|
||||
of keys used to compute the sine of 3.14 would be:
|
||||
|
||||
```
|
||||
3 . 1 4 ' s i n <enter>
|
||||
```
|
||||
|
||||
## Alternative radices
|
||||
|
||||
Integers (no floating point or complex) can be input in binary, octal, or hexadecimal
|
||||
by prefixing the number with one of the following:
|
||||
|
||||
```
|
||||
0h hexadecimal
|
||||
0d decimal (redundant, of course)
|
||||
0o octal
|
||||
0b binary
|
||||
```
|
||||
|
||||
Note that `0h` is used for the hexadecimal prefix to avoid ambiguity with the
|
||||
command sequence `0 x` (meaning "push `0`, then swap).
|
||||
|
||||
## Complex numbers
|
||||
|
||||
lerpn supports complex numbers. Enter them like this: `2j3`. For a pure imaginary number,
|
||||
you must type the real part anyway: `0j1`. This is because a leading `j` would be treated
|
||||
as a command rather than a number.
|
||||
|
||||
## Tags
|
||||
|
||||
You can tag numbers to help remember what they are. There are two ways to do
|
||||
this. One is to enter the number with the tag, using a double-quote to
|
||||
delimit:
|
||||
|
||||
```
|
||||
3 . 1 4 " t h i s i s p i
|
||||
|
||||
gives: 3.14 : this is pi
|
||||
```
|
||||
|
||||
Whitespace is acceptable. Alternatively, you can attach a tag to a number
|
||||
already on the stack by pushing the string itself to the stack, then using
|
||||
the lowe-case `t` command to attach:
|
||||
|
||||
```
|
||||
3 . 1 4 <enter>
|
||||
" t h i s i s p i <enter>
|
||||
t
|
||||
```
|
||||
|
||||
This is currently the only application for strings on the stack.
|
||||
|
||||
To remove a tag, use upper-case `T`. The tag will disappear - if this was
|
||||
unintentional, just use lower-case `u` to undo.
|
||||
|
||||
Basic math can be done to numbers while tagged, but if you perform a binary
|
||||
operation on two tagged numbers, lerpn won't know which tag to keep.
|
||||
|
||||
## Shell commands
|
||||
|
||||
lerpn can run shell commands for you, with the `'sh` command. Here's a completely
|
||||
useless example:
|
||||
|
||||
```
|
||||
39
|
||||
'sh dc -e "$N 3+pq"
|
||||
```
|
||||
|
||||
The bottom number on the stack is available as the environment variable `$N`,
|
||||
which holds the number formatted as a standard float.
|
||||
|
||||
The output of the command is regex-searched for anything resembling a float;
|
||||
the first match is parsed and pushed to the stack. The full output is displayed
|
||||
in a scrollbox.
|
|
@ -14,7 +14,7 @@ Just Python.
|
|||
# Hacking - adding commands
|
||||
|
||||
If you want to add your own commands to lerpn, see
|
||||
[`HACKING.md`](https://github.com/alexisvl/lerpn/blob/master/HACKING.md)
|
||||
[`HACKING.md`](https://gitlab.com/alexisvl/lerpn/-/blob/trunk/HACKING.md)
|
||||
for a quick intro.
|
||||
|
||||
# Quick usage notes:
|
||||
|
@ -33,7 +33,7 @@ ctrl-C exit
|
|||
```
|
||||
|
||||
For a quick online command reference, see
|
||||
[`COMMANDS.md`](https://github.com/alexisvl/lerpn/blob/master/COMMANDS.md).
|
||||
[`COMMANDS.md`](https://gitlab.com/alexisvl/lerpn/-/blob/trunk/COMMANDS.md).
|
||||
|
||||
Single-key commands may be used directly if no number is being entered. During
|
||||
number entry, symbolic commands work directly, but alphabeticals require holding
|
||||
|
|
5
setup.py
5
setup.py
|
@ -5,8 +5,7 @@ import sys
|
|||
setup( name='lerpn',
|
||||
version='5',
|
||||
description='Linux? Engineering RPN calculator',
|
||||
url='https://github.com/alexisvl/lerpn',
|
||||
download_url = 'https://github.com/alexisvl/lerpn/tarball/5',
|
||||
url='https://gitlab.com/alexisvl/lerpn',
|
||||
author='Alexis Lockwood',
|
||||
author_email='no@no.no',
|
||||
packages=['LerpnApp'],
|
||||
|
@ -20,5 +19,5 @@ setup( name='lerpn',
|
|||
"Development Status :: 5 - Production/Stable",
|
||||
"Environment :: Console :: Curses",
|
||||
"Topic :: Utilities",
|
||||
"License :: MIT" ]
|
||||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)" ]
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue