Draft:Hyperbolic cotangent

From Esolanging
Jump to navigationJump to search

Hyperbolic cotangent is an esoteric programming language by User:AnalysisOfVariance in 2026 designed for code golfing.

Overview

Hyperbolic cotangent was made to address a problem with Sclipting, which is that CJK characters take 3-4 bytes when encoded with UTF-8. Though there are thousands of CJK characters available in Unicode allowing for a massive command set, their much heavier encodings make them impractical for golfing smaller programs.

Hyperbolic cotangent solves this problem by packing multiple instructions into one CJK character. The way command bundles are assigned to CJK characters is dependent on the frequency; for example, more common operations like addition and I/O will be assigned to more common characters while less common operations will be assigned to less common characters.

Cotangent

Hyperbolic cotangent can be considered a compression of another language, Cotangent. Cotangent is quite non-esoteric like Uiua.

Cotangent is purely a theoretical language designed to express Hyperbolic cotangent. As such, it has quite a plain syntax.

Examples

Hyperbolic cotangent

Cotangent

ROT13

print(map((\x :
    if 'A' <= ord(x) <= 'Z' then 'A' + (x - 'A') % 26
    elif 'a' <= ord(x) <= 'z' then 'a' + (x - 'a') % 26
    else x
    ), INPUT))

See also