
* Michael Schierl schierlm-public@gmx.de [20061102 23:06]:
Ulrich Dangel schrieb:
Try python. Just enter 0xfa or something and you get the corresponding decimal value.
If you want the hex value of a decimal number, use hex($numer) and it works.
and (how) can I reference previous outputs? I can name them beforehand but if I do it is lots more to type. Using screen or gdm to copy the value is not better either.
0xAFFE
45054
previous * 2
Traceback (most recent call last): File "<stdin>", line 1, in ? NameError: name 'previous' is not defined
I can strongly recommend using ipython for interactive use of python (and irb for interactive ruby).
,---- [ demo ] | % ipython | Python 2.4.4 (#2, Oct 20 2006, 00:23:25) | Type "copyright", "credits" or "license" for more information. | | IPython 0.7.2 -- An enhanced Interactive Python. | ? -> Introduction to IPython's features. | %magic -> Information about IPython's 'magic' % functions. | help -> Python's own help system. | object? -> Details about 'object'. ?object also works, ?? prints more. | | In [1]: 0xAFFE | Out[1]: 45054 | | In [2]: _ * 2 | Out[2]: 90108 `----
There is no orpie (great console RPN calculator) and GNU Calculator for Emacs is not there either. Okay, dc/bc is there, but I don't know (and could not figure out by grepping the man page) how they can handle hex numbers...
Hm, i just tried orpie and i think python is much nicer, especially if you use ipython.
in my experience orpie is nice just because it needs very few key strokes (no parentheses, no return, short forms for most extended functions) like on a real calculator. GNU Emacs Calculator is similar, but a bit larger (and much more powerful). But that does not mean orpie is powerless, it has arbitrary-precision integers and matrices as well (I am missing fractions in orpie, but can live without, since gcd is there; so I can do all fraction calculations "manually").
orpie depends on ocaml-stuff and would require 41.5MB of additional disk space. So it's not an option for inclusion in grml, sorry.
regards, -mika-