maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   programmer's calculator (https://talk.maemo.org/showthread.php?t=23063)

tlacuache 2008-08-21 22:23

programmer's calculator
 
For a while I've been looking for a simple programmer's calculator. I didn't need graphing capabilities, or even RPN. Just something to allow me to convert numbers from one base to another, do bitwise operations, etc.

Finally I found clarence (sorry, no link, the original programmer's site seems to be down, but you can google it). From its man page:

"Clarence is a programmer's scientific calculator written in Python. It has GUI based on PyGTK, uses all Python's operators, math module functions and constants. It can handle all basic numerical formats including Dec, Hex, Bin, Oct, and ASCII."

Being just a python script, it runs fine on my n800, although the interface is kinda clunky as it's not hildonized or whatever. I'm sure someone with some experience doing python development for the IT could have it working a lot more cleanly in no time.

Anyway, it's been of great use to me as a developer, so I thought I might share and see if anybody else had something else even better.

-SG

tz1 2008-08-22 14:36

Re: programmer's calculator
 
There is also "Pyculator" which I leave on my home panel. It basically does a python eval on typed strings so it works well for this (with hex(int) and oct(int) if needed).

cvmiller 2008-08-22 18:41

Re: programmer's calculator
 
There is also BC which runs in an xterm. To convert bases you would set the input base and the output base, for example:
bc
ibase=8
obase=16
477
18B (bc prints out this answer)

I hope this helps,

Craig...


All times are GMT. The time now is 03:43.

vBulletin® Version 3.8.8