2023 in Base 37
01-07-2023, 09:59 PM (This post was last modified: 01-08-2023 01:34 AM by mfleming.)
Post: #12
 mfleming Senior Member Posts: 937 Joined: Jul 2015
RE: 2023 in Base 37
Another approach, using Albert's base conversion function and indexing, we could have

Code:
       base←⊥⍣¯1       digits←'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'       37 base 2023 1 17 25       digits[1+37 base 2023] 1HP

Extending the range of digits and encapsulating the operation as a function gives

Code:
       +digits←digits,'abcdefghijklmnopqrstuvwxyz' 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz       digits[1+62 base 257175174] HP50g       tochar←{digits[1+⍺ base ⍵]}       37 tochar 2023 1HP       62 tochar 257175174 HP50g

Now just need the reverse conversion to see a season's greeting!

~Mark

 Oops! Function base corrected per Albert [/edit]

Remember kids, "In a democracy, you get the government you deserve."
 « Next Oldest | Next Newest »

 Messages In This Thread 2023 in Base 37 - Joe Horn - 01-06-2023, 12:21 PM RE: 2023 in Base 37 - pier4r - 01-06-2023, 12:58 PM RE: 2023 in Base 37 - John Keith - 01-06-2023, 06:34 PM RE: 2023 in Base 37 - Maximilian Hohmann - 01-06-2023, 01:05 PM RE: 2023 in Base 37 - toml_12953 - 01-06-2023, 08:07 PM RE: 2023 in Base 37 - pier4r - 01-06-2023, 07:58 PM RE: 2023 in Base 37 - John Keith - 01-06-2023, 08:25 PM RE: 2023 in Base 37 for the 28's users - C.Ret - 01-07-2023, 11:17 AM RE: 2023 in Base 37 - pier4r - 01-07-2023, 11:39 AM RE: 2023 in Base 37 - Gerald H - 01-07-2023, 04:06 AM RE: 2023 in Base 37 - brouhaha - 01-07-2023, 06:23 AM RE: 2023 in Base 37 - mfleming - 01-07-2023 09:59 PM RE: 2023 in Base 37 - John Keith - 01-20-2023, 07:41 PM

User(s) browsing this thread: 1 Guest(s)