tech.lgbt is one of the many independent Mastodon servers you can use to participate in the fediverse.
We welcome all marginalized identities. This Mastodon instance is generally for folks who are LGBTQIA+ and Allies with an interest in tech work, academics, or technology in general.

Server stats:

2.9K
active users

Public

If you have the character set ' 0123456789' in ASCII/Unicode and you want the digits to be mapped to their numeric values and space to be mapped to zero, then ord(c) & 0xf does the trick.

This feels like something someone would have noticed already, but I have no idea how I could search for this.

@flowblok there's a similar trick for case conversion, also one of the design goals that EBDIC maintained, despite their other... bizarre choices.