Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

UTF-8LE - a more efficient, saner version of UTF-8

Name: Cudder !MhMRSATORI 2014-08-29 12:03

I just realised that UTF-8 is stupidly defined as big-endian!

U+20AC = 0010 000010 101100
In UTF-8 -> 11100010 10000010 10101100

...Meaning that to convert a codepoint into a series of bytes you have to shift the value before anding/adding the offset, viz.

b0 = (n >> 12) + 0xe0;
b1 = ((n >> 6) & 63) + 0x80;
b2 = (n & 63) + 0x80;


Just looking at the expression it doesn't seem so bad, but shifting right before means throwing away perfectly good bits in a register! The worst thing is, the bits thrown away are exactly the ones needed in the upcoming computations, so you have to needlessly waste storage to preserve the entire value of the codepoint throughout the computation. Observe:

push eax
shr eax, 12
add al, 224
stosb
pop eax
push eax
shr eax, 6
and al, 63
add al, 128
stosb
pop eax
and al, 63
add al, 128
stosb


14 instructions, 23 bytes. Not so bad, but what if we stored the pieces the other way around, i.e. "UTF-8LE"?

U+20AC = 001000 001010 1100
In UTF-8LE -> 11101100 10001010 10001000

b0 = (n&15) + 224;
b1 = ((n>>6)&63) + 128;
b2 = (n>>12) + 128;


Observe that each time bits are picked off n, the next step's shift removes them, so there is no need to keep around another copy of n (including bits that wouldn't be used anymore).

shl eax, 4
shr al, 4
add al, 224
stosb
mov al, ah
and al, 63
add al, 128
stosb
shr eax, 14
add al, 128
stosb


11 instructions, 22 bytes. Clearly superior.

The UTF-8 BOM is EF BB BF; the UTF-8LE BOM similarly will be EF AF BF.

Name: Anonymous 2025-02-24 15:10

>>79
Normies don't like cute little virgin girls.
They are castrated faggots and women.
They like to send men to die in wars.

Name: EMOJI PROGRAMMER 2025-02-25 11:22

(defun EMOJI-QUALITY-PARENTHESES-READER (stream char)
(declare (ignore char))
(read-delimited-list #\🫷 stream))
(set-macro-character #\🫸 'EMOJI-QUALITY-PARENTHESES-READER)
(set-syntax-from-char #\🫷 #\))
🫸setf 🫸fdefinition 'πŸ—£πŸ«· #'print🫷
(defparameter πŸ”₯ "i'm the renegade dog with the twelve inch dick
prostitutes pay me for a little sniff
never paid a dollar nor a single dime
for a fuckin' or a suckin' having a good time")

πŸ«ΈπŸ—£ πŸ”₯🫷
=> "i'm the renegade dog with the twelve inch dick
prostitutes pay me for a little sniff
never paid a dollar nor a single dime
for a fuckin' or a suckin' having a good time"

Name: Anonymous 2025-03-02 17:50

>Can you stop and think out of the box for two seconds about your behavior,
What "behaviour". This is the internet, nothing takes place here.
The only "behavior" that is occuring is the pressing of square buttons.

>or are you a psychopath incapable of reasoning?
"If you don't agree with me you are a psychopath"
A very reasonable argument.

>Why are you so obsessed with torture?
You said people in europe came after you, including police.
You indicated you feared prison and consequences.
The solution is the make the consequences for your adversary far worse than what they could ever inflict upon you:
because they will.

Don't ask a question you do not want answered.
Not even by omission.

>Do you watch gore and snuff in your free time?
Nope. You sound like a woman. Are you a woman?
Your way of arguing is not like a mans.
It leans heavily on emotional manipulation and shaming,
and shys away from contemplating direct physical conflict,
or any direct action at all.
It imagines consequences from third parties, instead of the first party or the principael itself.

>From the moment we start talking,
I've been silent this whole time, are you hearing things?
>these words are in your mouth,
I haven't spoken a word to you.

>it's repulsive.
I'm not trying to fuck you, bitch.

>It's no wonder that no one wants to associate with you,
Again: we've never met, and I have never met any of these "others".
Do you have any map formats in hand that you will graciously donate to this GPL'd project?
If not; what value is it to me to "associate" with you (whatever that means)?
Why would I seek out this "association"?
Additionally: I did not email you: you emailed me: remeber?

Again another womanly characteristic: blaming me for what you "initiated"

>your behavior is fucking creepy.
No behavior has taken place.
Save for the rhytmic up and down motions of a number of depressed keys, not exceeding 128.

>Do you worship the devil?
YHWH.
The Dragon.

>Do you want to drink the blood of your victims and harvest adrenochrome too?
I want to marry cute little girl virgins.
Same as any man.

>How many corpses do you hide in your basement?
Zero. The basement is a night club.
You should know this.

>Can you stop and think out of the box for two seconds about your behavior, or are you a psychopath incapable of reasoning? Why are you so obsessed with torture? Do you watch gore and snuff in your free time? From the moment we start talking, these words are in your mouth, it's repulsive. It's no wonder that no one wants to associate with you, your behavior is fucking creepy. Do you worship the devil? Do you want to drink the blood of your victims and harvest adrenochrome too? How many corpses do you hide in your basement?

Name: Anonymous 2025-08-26 14:00

πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©πŸ’©

Name: Anonymous 2025-09-14 22:45

but network order is big endian as decreed by the bearded old men at IEEE. Appeal to tradition

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List