M-ary to n-ary number (or numeral?) converter

It works for positive integers, and both base numbers (m and n) must not be higher than 62.
Digits 0 .. 9 are used for, well, numbers from 0 .. 9.
Characters A .. Z signify numbers 10 .. 35.
Characters a .. z signify numbers 36 .. 61.
E.g. 12 base 16 = C; 41 base 16 = 29; 101 base 60 = 1f.
Recursion applied, of course.

https://snap.berkeley.edu/snap/snap.html#present:Username=qw23&ProjectName=m-ary%20to%20n-ary%20number%20converter

I wonder if anyone can find a fault? (other than: no error catching).

The link you provided links to an empty project.

Thanks! I have repaired it.

Your code is fine, apart from being case-sensitive. You're thinking I'm being fanatic about this, and yeah, it doesn't really matter what choices you make about base 37 representation, which nobody uses anyway. But I point out that 0x00FF00 and 0x00ff00 are both green, and I've seen both of them in the wild.

But the thing that I am fanatic about is that every instance of "decimal" in your block titles should say "number" instead. The easiest way for you to convince yourself about this is to read your code, and note that you always use text functions (UNICODE __ AS LETTER, LETTER 1 OF __, and so on) on arbitrary-base numerals, but you always, without fail, use numeric functions (+, MOD, etc.) on the so-called decimal numbers. Those are just numbers, and that's why you do arithmetic on them. (If you have a small enough number you may do an explicit type conversion from number to digit character, and similarly for single-letter words.)

The algorithms you use do type conversions between number and numeral. It doesn't look like that, because Snap! does automatic conversion between numbers and decimal numerals. This makes programming with numbers easier to do, but harder to reason about.

What makes you suspect I do? (The only person claiming your being fanatic is yourself - in the next paragraph :wink:)

The Sumerians and Babylonians used to (well, sexagesimal numbers / numerals, anyway), as did the Mayans - though I’m sure their representations were different.
Besides, the whole thing is a just-for-fun exercise, of course.

OK, thanks, I’ve fixed that now (I think).

BTW: what does your new armchair icon signify?

Oh, everyone I know rolls their eyes at me when I talk about case insensitive comparison.

Of course. Your project, you can design it how you want. But a lot of people make projects that emulate some real thing, and really work hard to make it a close emulation. So I think it's relevant to point out that real-world letters-as-digits aren't case-sensitive.

Ah, I've put way too much time and effort into solving the problem of needing chairs in the living room.

More...

There's never anyplace to sit when people visit.

I grew up at a time (1950s-60s) when everyone wanted Danish Modern furniture (which is now called Danish Midcentury Modern because there's something more recent called Danish Modern that has nothing to do with the old kind), and also, nobody knew anything about rainforests back then so everyone wanted their furniture in teak. So I was looking around for Danish Modern chairs in teak and fell in love with these:

https://www.etsy.com/listing/1292325963/arne-hovmand-olsen-for-p-mikkelsen-mid?frs=1

Genuine used chairs from the actual period, and I fell in love with the curve of the back legs, and I still lust after them, but can't really afford $5K for two chairs. Turns out there is a company that holds the copyright on this design and still makes new ones:

Lean Back – Warm nordic EN

but that's $4K for one chair. They claim they use sustainably forested teak. (For a while around the '90s you couldn't get new teak furniture at all, but it's starting to come back now that people are planting new teak forests.)

So instead I grudgingly bought these chairs:

Gagan Lewiston Accent Chair – Lexicon Home

which have kinda that shape back leg, although the proportions are wrong and it's thick and stolid, with generic wood stained walnut (i.e. very very dark brown) but nothing like walnut grain, let alone teak grain, but 1/10 the price of the real ones. They came yesterday and they're okay, comfortable seat, rather stiff back even though it's designed to look like the seat -- not just the fabric, but the curve, as if it's an upholstered cushion -- which isn't awful, they're not too bad to sit in, at least for short times; I haven't tried it for hours yet.

TL;DR: All I've been thinking about for the past month is chairs.

I hope they will grow on you.

In my experience, opting for the more anffordable alternative may spawn regrets. Not all of the time, of course, and 4K is a lot of money for any chair. I happen to have a decent lookalike of Poul Henningsen’s “artichoke” lamp at home - the Real McCoy costing 8K or something. I’m quite happy with the copy.

BTW Are you aware “sitting is the new smoking”? :chair: :skull_and_crossbones: :grin:

Oh yes. My body and I have never gotten along, from early childhood. I regret it, but I'm not sure I could have done anything differently.