Live data from Hacker News

A Love Letter to Plain Text

blog.afoolishmanifesto.com

21–30 of 39 posts

Re: A Love Letter to Plain Text

#21

What is 'plain text' ? Is it ASCII ? 7 or 8 bit ? EBCDIC ? UTF-8 ?

Encodings do not make text a binary format. This pedantry is uncalled for.

I’m not sure the text/binary distinction is that useful.

ASCII is much simpler than Unicode encodings, to the point where text can even become an attack vector. A fully featured UTF-8 parsing and rendering engine is a sophisticated thing.

Does it matter whether one or the other is classified as text or binary? Not as much as it matters which requires the more complex code to process.

Re: A Love Letter to Plain Text

#23
This is not just Plain Text. Hugo is not that good for a bunch of text/markdown files. My advice is to look more into mkdocs which is a bunch of markdown files in a directory structure presented nicely (even implements js search).

Re: A Love Letter to Plain Text

#24
post #5

Earlier quoted context omitted.

"Find A Way To Call TFA Author A Hypocrite" seems to be a whole genre of news aggregator comment

Only for articles with pretentious titles.

Yeah, "love letter to plain text" -- who does he think he is? Such gall! /s

Re: A Love Letter to Plain Text

#25

Earlier quoted context omitted.

Encodings do not make text a binary format. This pedantry is uncalled for.

I'm just saying there is no such thing as 'plain text'. I also think that plain text is a bad idea, binary files are much easier to parse.

>I'm just saying there is no such thing as 'plain text'.

And yet, everyone agrees there is, and has no problem telling its case from other formats, even if they're all 0s and 1s underneath.

Re: A Love Letter to Plain Text

#26
post #21

Earlier quoted context omitted.

Encodings do not make text a binary format. This pedantry is uncalled for.

I’m not sure the text/binary distinction is that useful. ASCII is much simpler than Unicode encodings, to the point where text can even become an attack vector. A fully featured UTF-8 parsing and rendering engine is a sophisticated thing. Does it matter whether one or the other is classified as text or binary? Not as much as it matters which requires the more complex code to process.

> A fully featured UTF-8 parsing and rendering engine is a sophisticated thing.

No, UTF8 decoding is trivial, you can do it in a few dozen lines in just about any language. It's Unicode that is a complex and moving target. But you can also just choose to implement a sane subset of Unicode for your application.

Recommended reading: http://cat-v.org/, https://github.com/cls/libutf

Re: A Love Letter to Plain Text

#27

What is 'plain text' ? Is it ASCII ? 7 or 8 bit ? EBCDIC ? UTF-8 ?

The distinction you are missing is what is generally meant by (and is actually valuable about) plain text is, "simultaneously human and machine readable data".

Many "plain text" formats, like markdown or INI files or json, actually have very strict formatting requirements and character set constraints, but the value-add comes from a human's ability to examine the on-file-system object, examine it with well-known and reliable tools (grep, awk, text editor, etc.), figure out what it's supposed to mean, then feed it to the machine, and compare the machine's behavior with their expectations.

With non-human-readable data, this is much harder, you pretty much need a tool to convert the binary data to readable text to distinguish between "my program is broken" and "my program works but is getting bad input."

Note that even structured ASCII can still make this hard, XML is nominally human-readable, but as a practical matter this can be difficult.

Re: A Love Letter to Plain Text

#28
post #2

A love letter to plain text would be a bit more lovely without so much unnecessary formatting (colors, borders, and other embellishments).

Your browser should have a 'no style' option tucked away somewhere. Presentation is - according to the original web spec, not the present monstrosity - mostly the job of the client.

In Firefox, you can select View > Page Style > None.

Of course there is also the reader mode.

Re: A Love Letter to Plain Text

#29
post #25

Earlier quoted context omitted.

I'm just saying there is no such thing as 'plain text'. I also think that plain text is a bad idea, binary files are much easier to parse.

> I'm just saying there is no such thing as 'plain text'. And yet, everyone agrees there is, and has no problem telling its case from other formats, even if they're all 0s and 1s underneath.

That is not true. Guessing encoding is really, really difficult, and you can easily end up reading a file with an uncommon Japanese encoding as an Chinese encoding and end up with subtitle errors.

Plain text is anything but plain.

Re: A Love Letter to Plain Text

#30
post #25

Earlier quoted context omitted.

I'm just saying there is no such thing as 'plain text'. I also think that plain text is a bad idea, binary files are much easier to parse.

> I'm just saying there is no such thing as 'plain text'. And yet, everyone agrees there is, and has no problem telling its case from other formats, even if they're all 0s and 1s underneath.

American programmers with little exposure to the world beyond their personal milieu agree that there is. The rest of the world stringently disagrees.
Post reply on HN