Live data from Hacker News

The Elegance of the ASCII Table

danq.me

101–110 of 189 posts

Re: The Elegance of the ASCII Table

#101
post #34

I wish the author had included the full ascii chart in 4 bits across / 4 bits down. You can mask a single bit to change case and that is super obvious that way. The charts that simply show you the assignments in hex and octal obscure the elegance of the design.

The third and fourth columns of the table are only a single bit apart from each other. If you mentally swap the first two columns, you get a Gray code ordering of the most significant bits, which is pretty close to what you're looking for.

Found it: https://en.wikipedia.org/wiki/ASCII#/media/File:USASCII_code...

Re: The Elegance of the ASCII Table

#103
post #13

I heard someone describe the ASCII table as a state machine. Guess I could understand that as a state machine needed to parse it? This is surprisingly hard to search for but I was wondering if anyone knows what they were talking about.

It was originally implemented in actual hardware (rods and bars). Just look inside a teletype, like a KSR-23 (pre ascii, but similar)

Re: The Elegance of the ASCII Table

#104

> That, I’m afraid, is because ASCII was based not on modern computer keyboards but on the shifted positions of a Remington No. 2 mechanical typewriter – whose shifted layout was the closest compromise we could find as a standard at the time, I imagine. According to Wikipedia¹, American typewriters were pretty consistent with keyboard layout until the IBM Selectric electric typewriter. Apparently "small" characters (…

I never realized my first computer used ascii directly for the shifted number keys. https://en.wikipedia.org/wiki/TRS-80_Color_Computer#/media/F...

So many things on the CoCo turned out to be the way they were for cost saving reasons. Tandy was good at saving pennies everywhere it could. When I took 'Typing' in high school, my muscle memory was in a constant fight between the IBM Selectric layout of the typewriters at school and the CoCo at home.

Re: The Elegance of the ASCII Table

#105
post #3

The encodings we use today have a surprisingly deep and complex history. For more, see: "The Evolution of Character Codes, 1874-1968" https://ia800606.us.archive.org/17/items/enf-ascii/ascii.pdf

Thanks for posting that.

People tend to overlook that the technologies we use today have a much older history.

Re: The Elegance of the ASCII Table

#106
post #77
post #65

I think that adopting ASCII as the general purpose text encoding was one of the great mistakes of early computing. It originated as control interface for teletypes and such, and that's arguably where it should have remained. For storing and processing (plain) text ASCII doesn't really fit that well, control characters are a hindrance and the code space would have been useful for additional characters. The ASCII set o…

No way! No amount of extra characters was going to address what Unicode did. ASCII was not a mistake at all. Adopting it unified what was surely going to be a real mess. At the time it made sense, and the control functions were needed. Still are.

> At the time it made sense, and the control functions were needed. Still are.

Control characters were needed for terminals. They never made sense for text. Mixing the two matters is the problem.

Re: The Elegance of the ASCII Table

#107
post #14
post #10

> So when you’re reading 7-bit ASCII, if it starts with 00, it’s a non-printing character. Otherwise it’s a printing character. > The first printing character is space; it’s an invisible character, but it’s still one that has meaning to humans, so it’s not a control character (this sounds obvious today, but it was actually the source of some semantic argument when the ASCII standard was first being discussed). Hmm..…

You also have to keep in mind the "interface" for 1962-1968. The printer teletype machine. The "control codes" were to "control" the printhead. So "carriage return" meant move the "print carriage" back to the left margin. "New line" meant move the paper platen one line height of rotation to move the paper to the next line. In that context, "back space" was "move print head one space left" (rather more like a "reverse…

[dead]

Re: The Elegance of the ASCII Table

#108

You might be familiar with carriage return (0D) and line feed (10) You mean 0D and 0A, or 13 and 10, but that mix of base really stood out to me in an otherwise good article. I'm one of numerous others who have memorised most of the base ASCII table, and quite a few of the symbols as well as extended ASCII (CP437), mainly because it comes in handy for reading programs without needing a disassembler. Those who do a lo…

> You mean 0D and 0A, or 13 and 10

He fixed it.

Re: The Elegance of the ASCII Table

#109

Too bad we now have Unicode, an elegant castle covered with ugly graffiti and ramshackle addons. For example: 1. normalization 2. backwards running text (hey, why not add spiral running text?) 3. fonts 4. invisible characters 5. multiple code points with the same glyph 6. glyphs defined by multiple code points (gee, I thought Unicode was to get away with that mess from code pages!) 7. made up languages (Elvish? Come…

> covered with ugly graffiti and ramshackle addons

Unfortunately there is plently of precendent for this ramshacklism. Like ACK/NAK - those are protocol signals, not characters! ENQ? What even is Shift In/Shift Out (SI/SO)? Then the database characters toward the end there FS, RS, GS, US.

> backwards running text (hey, why not add spiral running text?)

You jest, but you do have cursor positioning ANSI sequences which are designed to let text draw anywhere on your screen. And make it blink! You also don't find it weird to have a destructive "clear-screen" sequence?

> glyphs defined by multiple code points

I wonder when they started putting the slash across the 0 to differentiate from the O.

> you vote for my made-up emoticon, and I'll vote for yours!

I mean you do have the private Unicode range where you can actually do that. But before that, SIXEL graphics.

Post reply on HN