There seems to be a curveball that makes this not “easy-peasy” — if we pay attention to the fact that you’ve apparently not put the 0 and 1 in their intuitive place at the beginning of the series, but in positions 53 and 54. So 1000 (by that ordering) would cash out to 54*63^3 + 53*63^2 + 53*63 + 53.
But if you meant it to work more like hexadecimal ordering regex [0-9A-Za-z\s], then part 2 gets us a simple 250047.
It’s funny, I didn’t even consider that the regex suggested digit ordering. I just assumed that it was "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ".split('')
I haven’t tried the problem, although I did write JS functions to handle this for the limited range of JS Numbers:
A very minor correction: there should be a space at the end of that string. TiddlyTweeter’s digits included the decimal digits, the capital letters, the lower-case letters, and the space.
This means, for instance, that
toBase63(2708110998568296910813949) //=> "A large number"
fromBase63('A large number') //=> 2708110998568296910813949
To do this with such large numbers in JS, and hence in Tiddlywiki, you’d have to switch from plain numbers to BigInt. That would make it difficult to deal with in TW for large inputs.
Base64, over whatever alphabet, is much easier to deal with, as you can easily compress any length input, replacing every three-byte set with four base-64 digits.
Are you looking to convert only numbers, or arbitrary text? If the latter, can you explain the circumstances where this would do, but base-64 wouldn’t? Because that’s built in.
I am only looking at this from an arbitrary character set for base N, without JavaScript or Regular expressions. I am happy with 10+26+26, 0-9, A-Z, a-Z = 62
The occasion for me to use it was to compress a decimal number so it would make a somewhat large decimal number into a much shorter alphanumeric number, not unlike Decimal to Hexadecimal but on steroids.
The value was to use less bytes than more.
Because the character set can be arbitary I would personally not use space, so there is no need to treat it like a title.
Although you’d mentioned a cipher before, I had basically ignored it, following up on base-63, assuming you meant it like base-2, base-10, or base-16.
I certainly know how Caesarian ciphers work: pretty well the simplest encoding scheme known. But it’s not clear to me what you’re looking to do. Do you simply want to be able to en/decode something using a fixed shift on your alphabet? What do you want to en/decode: the text of a given tiddler, an arbitrary string, something else?