Fork me on GitHub
#off-topic
<
2019-06-10
>
henrik07:06:57

Parsing academic article fulltexts is a wild ride. In an article from one publisher, the HTML entity for ASCII code 7, "bell" has been inserted. Apparently they want the computer to beep as you read the text. For web display, I guess I'll have to find a way to play a sound file in its place. ๐Ÿ””

๐Ÿ”” 4
henrik07:06:23

The proper handling of code 7 for printers is to print nothing for the character, but beep instead.

henrik07:06:55

This is useful, because it alerts nearby researchers that a fresh article has been printed (presumably).

valtteri07:06:20

I assume that some very dusted professor somewhere is waiting by his 1890'โ€™s printer and relying hard on that feature.

dominicm07:06:29

How does it know when I'm reading that particular part?

dominicm07:06:44

Does it guess based on my scroll position and how long I've been looking at the page?

henrik09:06:41

I think it's probably an error or omission. For printers, it would beep when it hit the particular character. In a terminal, I think it would beep as soon as it is printed on screen.

henrik09:06:25

Also, it's an illegal character for XML 1.0 (which the document is encoded as), which speaks to it being an error. I think it's a by-product of injecting serialized HTML directly from an SQL query into an XML structure.

henrik09:06:00

I see plenty of examples of articles trying to sneak in <bold> and <italic> in titles and text bodies by encoding them as entities in in the string.

reborg07:06:36

Thanks @drewverlee hope youโ€™ll find the rest equally useful!

3Jane08:06:05

^ studying the important questions ๐Ÿ˜„

valtteri09:06:06

Omg this is important. I once read about a guy who is a professional ice cream taster and he uses a golden spoon because normal spoon tastes too much like spoon. I had to get myself a golden spoon for ice cream after that.

didibus09:06:53

My favorite spoons are wooden. I find if conveys the taste best

valtteri10:06:17

Donโ€™t they taste like wood? :thinking_face:

didibus18:06:11

Probably, but maybe I like the taste of wood โ˜บ๏ธ

didibus18:06:51

They don't convey heat or cold as much as well

3Jane18:06:19

hey! and does it taste better when you use a golden spoon? asking for a friend ๐Ÿ˜„

rovanion13:06:05

Can anyone recall an article, perhaps scientific, comparing the frequency of the most used names/symbols/phrases between different programming languages? By extension the article argued that some languages could be easier to learn as the number of symbols the programmer needs to learn to understand the average program is lower.

rovanion13:06:02

I remember the article having histograms over the most frequently used words in different languages.

john17:06:23

just google "zipf's law 'programming language'"

rovanion18:06:35

Interesting, thank you!

john19:06:00

Seems like a zipfian distribution in programming languages would imply that having less symbols doesn't help as much as having the more common ones be highly composable with the less common ones, with a gradual exponential tradeoff in utility from more common to less common symbols, allowing for dense compositions of more common and less common words.

john19:06:09

Zipfian distributions seem to be the most generally "expressive" from a generic compression standpoint. By giving shorter symbols to more common things, evolving languages are like compression schemes, able to better express domains. And for specific domains, you can get more compression/expressibility by aligning naming semantics closer to that domain.

vemv20:06:52

is there a known abbrev for "hundred"? e.g. 3k -> 3000, 3<letter> -> 300

neupsh20:06:17

@vemv "h"? may be for hecto

vemv20:06:15

sounds adoptable ๐Ÿ˜„

seancorfield20:06:22

I think if I saw 4h I'd assume hours...

๐Ÿ‘ 12
๐Ÿ˜ž 4