Page 1 of 2

Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 1:34 am
by jcb
The octothorpe (#, aka "number sign" or "hash") is a strange character, because it has many various, unrelated uses, and that despite this irregularity, it's even in ASCII, and on every keyboard. I've recorded the following:

General Use:
- number sign : #1 (read as "number one")
- abbreviation for "lb" (I've never seen this irl, but wikipedia says it was used this way at one point: https://en.wikipedia.org/wiki/Number_sign )
- (hash)tag marker (on twitter and other websites) (note that this is derived from IRC using it as a channel marker)

Programming Languages:
- heading marker (in markdown) (Maybe this is derived from IRC too ?)
- comment marker (in some programming languages)

Other Uses:
- checkmate marker (in chess algebraic notation)
- end of string marker : At my last job, I had to enter a number code on a 12-button keypad to open the door to the building, and the last button pressed was always the octothorpe.

Has anybody here run into any other uses of the octothorpe ?

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 1:49 am
by bradrn
jcb wrote: Mon Sep 04, 2023 1:34 am Programming Languages:
- heading marker (in markdown) (Maybe this is derived from IRC too ?)
- comment marker (in some programming languages)
Also in shebang lines in Unix scripts.

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 2:55 am
by alice
bradrn wrote: Mon Sep 04, 2023 1:49 am
jcb wrote: Mon Sep 04, 2023 1:34 am Programming Languages:
- heading marker (in markdown) (Maybe this is derived from IRC too ?)
- comment marker (in some programming languages)
Also in shebang lines in Unix scripts.
And comments in Unix scripts generally.

Also:

- C and C++ preprocessor directives
- catenation in C macros
- length operator in Lua
- "pound sign" in daily life in some countries
- beginning and end of word in sound changes
- raising of a musical note by a semitone (yes, this is pushing it a bit)
- prefix denoting hexadecimal numbers in some assembly languages

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 3:00 am
by bradrn
alice wrote: Mon Sep 04, 2023 2:55 am
bradrn wrote: Mon Sep 04, 2023 1:49 am
jcb wrote: Mon Sep 04, 2023 1:34 am Programming Languages:
- heading marker (in markdown) (Maybe this is derived from IRC too ?)
- comment marker (in some programming languages)
Also in shebang lines in Unix scripts.
And comments in Unix scripts generally.
jcb already said that…
- raising of a musical note by a semitone (yes, this is pushing it a bit)
No, that’s very specifically a sharp sign ♯, not a hash #.

(It’s vitally important to get these things right, you know!)

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 3:20 am
by zompist
Er, you guys know there was once a thing called a "typewriter", right?

Image

Typewriters had a # sign because they were used in business for "number" and "pounds".

The ASCII table includes all the (US) typewriter symbols. All the computer uses arose because these symbols were available and not needed for ordinary text.

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 3:42 am
by bradrn
zompist wrote: Mon Sep 04, 2023 3:20 am The ASCII table includes all the (US) typewriter symbols. All the computer uses arose because these symbols were available and not needed for ordinary text.
I don’t see how that contradicts any of what we said.

(The octothorp isn’t even the most egregious example of this. `~^\ barely existed at all before ASCII summoned them into being.)

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 3:46 am
by Man in Space
Has anybody here run into any other uses of the octothorpe ? # Yes, in the capacity I’ve used it in this comment.

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 4:15 am
by zompist
bradrn wrote: Mon Sep 04, 2023 3:42 am
zompist wrote: Mon Sep 04, 2023 3:20 am The ASCII table includes all the (US) typewriter symbols. All the computer uses arose because these symbols were available and not needed for ordinary text.
I don’t see how that contradicts any of what we said.
I was grumping "kids these days", not contradicting.

But I do have a point, and it's that jcb got the cause and effect wrong. It's not "there are so many uses of # that they put it in ASCII." It's "They put # in ASCII, so there are many uses."

BTW, for more uses: # is sometimes used in phonology to mark word boundaries, which is why I support that in the SCA.

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 4:38 am
by Raphael
zompist wrote: Mon Sep 04, 2023 3:20 am Er, you guys know there was once a thing called a "typewriter", right?

Image

Off-topic, but now I wonder when they stopped writing "USA" as "U.S.A.".

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 8:11 am
by LingEarth
I mean, programming languages repurpose existing symbols for all sorts of things anyway--see the use of a period for struct fields / object methods / etc.
bradrn wrote: Mon Sep 04, 2023 3:00 am
- raising of a musical note by a semitone (yes, this is pushing it a bit)
No, that’s very specifically a sharp sign ♯, not a hash #.
And yet, there is the programming language C# (C-sharp)!

Anyway, besides having multiple uses, I'm pretty sure this symbol has more names than any other symbol. The ones that come to mind include...
  • Pound sign
  • Hash sign
  • Number sign
  • Octothorpe
Did I miss any?

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 8:26 am
by Ketsuban
The programming language INTERCAL (which gives new names to everything, in line with its goal to, to the greatest degree possible, use only constructions not found in any other language) calls it a mesh.

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 9:08 am
by Raphael
LingEarth wrote: Mon Sep 04, 2023 8:11 am Anyway, besides having multiple uses, I'm pretty sure this symbol has more names than any other symbol. The ones that come to mind include...
  • Pound sign
Why "Pound sign"? Isn't the Pound sign this: £ ?

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 9:56 am
by WeepingElf
Raphael wrote: Mon Sep 04, 2023 9:08 am
LingEarth wrote: Mon Sep 04, 2023 8:11 am Anyway, besides having multiple uses, I'm pretty sure this symbol has more names than any other symbol. The ones that come to mind include...
  • Pound sign
Why "Pound sign"? Isn't the Pound sign this: £ ?
Because it apparently has been used as an abbreviation for lb., though I have only heard of that and never seen it, but it has been mentioned in this thread.

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 1:51 pm
by Man in Space
Raphael wrote: Mon Sep 04, 2023 9:08 am
LingEarth wrote: Mon Sep 04, 2023 8:11 am Anyway, besides having multiple uses, I'm pretty sure this symbol has more names than any other symbol. The ones that come to mind include...
  • Pound sign
Why "Pound sign"? Isn't the Pound sign this: £ ?
Weight, not currency.

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 2:22 pm
by alice
zompist wrote: Mon Sep 04, 2023 4:15 am BTW, for more uses: # is sometimes used in phonology to mark word boundaries, which is why I support that in the SCA.
I did actually already say that :-)

For those who were confused by zompist's reference to the "typewriter", it was a mechanical device somewhat like a laptop with a built-in printer but no screen.

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 2:35 pm
by Travis B.
alice wrote: Mon Sep 04, 2023 2:22 pm
zompist wrote: Mon Sep 04, 2023 4:15 am BTW, for more uses: # is sometimes used in phonology to mark word boundaries, which is why I support that in the SCA.
I did actually already say that :-)

For those who were confused by zompist's reference to the "typewriter", it was a mechanical device somewhat like a laptop with a built-in printer but no screen.
Now I feel old in that my family had a typewriter... and not an electric one either... when I was a kid.

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 2:36 pm
by jcb
But I do have a point, and it's that jcb got the cause and effect wrong. It's not "there are so many uses of # that they put it in ASCII." It's "They put # in ASCII, so there are many uses."
I didn't mean to imply the former; I know that it's the latter.

I now realize I explained this poorly. I should've said something like: It's somewhat surprising that they put it in ASCII despite the few use cases (marking numbers and pounds). The use cases increased because people needed more symbols for things, but didn't have many to choose from in a pre-unicode era, but the octothorpe was there and available to be used. So now in 2023 we have this diversely (but still comparatively rarely, compared to other ASCII characters) used symbol in ASCII, the most basic of encodings.

I mean, compare this to a section break symbol ( https://en.wikipedia.org/wiki/Section_(typography) ). Why didn't the asterism (⁂) or fleuron (❦) get put onto typewriters (and then into ASCII) ?
BTW, for more uses: # is sometimes used in phonology to mark word boundaries, which is why I support that in the SCA.
I didn't know that you derived this from some linguistics standard. I thought that you introduced that use yourself.
Has anybody here run into any other uses of the octothorpe ? # Yes, in the capacity I’ve used it in this comment.
So, as an answer to a question ? Interesting.

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 5:31 pm
by Richard W
Pedantically, what do you mean by 'on every keyboard'? It's not in the Thai (software) keyboard layout, which does have the four characters /-.,. (On the other hand, physical Thai computer keyboards do have the ASCII characters 'engraved' on them.)

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 5:39 pm
by Man in Space
jcb wrote: Mon Sep 04, 2023 2:36 pm
Has anybody here run into any other uses of the octothorpe ? # Yes, in the capacity I’ve used it in this comment.
So, as an answer to a question ? Interesting.
Not quite. It’s in response to some comment. Somebody says X; you quote them directly, place an octothorp, and then provide your own comment.

Re: Uses of the octothorp. (#)

Posted: Mon Sep 04, 2023 6:48 pm
by zompist
jcb wrote: Mon Sep 04, 2023 2:36 pm I now realize I explained this poorly. I should've said something like: It's somewhat surprising that they put it in ASCII despite the few use cases (marking numbers and pounds).
But that's why I brought up the typewriter. They put it in ASCII because it was on the typewriter.
I mean, compare this to a section break symbol ( https://en.wikipedia.org/wiki/Section_(typography) ). Why didn't the asterism (⁂) or fleuron (❦) get put onto typewriters (and then into ASCII) ?
That I can't say for sure, but # had uses in business, which was the first market for typewriters. Both your examples are what are apparently called dinkuses, which are the domain of printers, not writers.

Edit: smh at Google, which is now convinced I'm in the market for an old typewriter.