-
This is my port of the incredible python code by /u/_DaCoolOne_. It lets you convert ascii text, e.g. python code, to a single Unicode character in a reversible way. This also lets you refactor your code into a single line! Imagine the readability!
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
A similar thing is actually practical in JavaScript which mandates that all strings are UTF-16. You can cram more data into strings in memory if you use base-327168 encoding, and it serializes to equally compact JSON.
-
Twitter Text Obj
Twitter Text Libraries. This code is used at Twitter to tokenize and parse text to meet the expectations for what can be used on the platform.
Given the examples in this article it seems like it could potentially be used for this!
-
Actually, in the case of twitter they do some weird counting. It is mostly based on codepoints, true, but some codepoints are considered "heavy" and are counted twice, see https://github.com/qntm/base2048
-
The first is the totally_safe_transmute crate. I mean, who wouldn't love library code that has .expect("welp") and .expect("oof") as its error handling? But that's not even the really scary part. Issue #2 ("i hate this") remains open to this day, but for obvious reasons there's no chance of resolution. This post has some context and a line-by-line explanation of how it works.
Related posts
-
Why is GPT-3 15.77x more expensive for certain languages?
-
Mini Musk in making
-
Tweet-counter: A module to calculate the length of a tweet
-
[DISC] The Tsunderedere Girl Getting More and More Dere Day by Day | Day - 13 by @yakitomahawk & @kota2comic
-
TIL the assumption that string length does not change when upper-cased is false