# I am the Watcher. I am your guide through this vast new twtiverse.
#
# Usage:
# https://watcher.sour.is/api/plain/users View list of users and latest twt date.
# https://watcher.sour.is/api/plain/twt View all twts.
# https://watcher.sour.is/api/plain/mentions?uri=:uri View all mentions for uri.
# https://watcher.sour.is/api/plain/conv/:hash View all twts for a conversation subject.
#
# Options:
# uri Filter to show a specific users twts.
# offset Start index for quey.
# limit Count of items to return (going back in time).
#
# twt range = 1 1
# self = https://watcher.sour.is/conv/qmdnp3a
For some reason, I was using calc all this time. I mean, it’s good, but I need to do base conversions (dec, hex, bin) *very* often and you have to type base(2)
or base(16)
in calc to do that. That’s exhausting after a while.
So I now replaced calc with a little Python script which always prints the results in dec/hex/bin, grouped in bytes (if the result is an integer). That’s what I need. It’s basically just a loop around Python’s exec()
.
$ mcalc
> 123
123 0x\n 0b\n
> 1234
1234 0x\n 0b\n
> 0x7C00 + 0x3F + 512
32319 0x\n 0b\n
> a = 10; b = 0x2b; c = 0b1100101
10 0x\n 0b\n
> a + b + 3 * c
356 0x\n 0b\n
> 232 - 1
4294967295 0x\n 0b\n
> 4 * atan(1)
3.141592653589793
> cos(pi)
-1.0=