[OT] Why is it called string?

B

Brian Kelley

I have always been curious about why a construct like:

a = "the quick brown fox jumps over the lazy dog"

is called a string. I have always assumed that it was a reference to a
necklace type construct as in (and I can't resist) a "string of perls".

My curiosity has been rekindled due to recent reports (to laypeople like
myself) of the existance of a Khipu code in which the Incans used
knotted strings as a type of binary code to store information. From
"FreeRepublic.com":

--
http://209.157.64.200/focus/f-news/928058/posts

Researchers take a fresh look at Incan knotted strings and suggest that
they may have been a written language, one that used a binary code to
store information In the late 16th century, Spanish travelers in central
Peru ran into an old Indian man, probably a former official of the Incan
empire, which Francisco Pizarro had conquered in 1532. The Spaniards saw
the Indian try to hide something he was carrying, according to the
account of one traveler, Diego Avalos y Figueroa, so they searched him
and found several bunches of the cryptic knotted strings known as khipu.
Many khipu simply recorded columns of numbers for accounting or census
purposes, but the conquistadors believed that some contained historical
narratives, religious myths, even poems. In this case, the Indian
claimed that his khipu recorded everything the conquerors had done in
the area, "both the good and evil." The leader of the Spanish party,
Avalos y Figueroa reported, immediately "took and burned these accounts
and punished the Indian" for having them. But although the Spanish
considered khipu dangerous, idolatrous objects and destroyed as many as
they could, scholars have long dismissed the notion that khipu (or
quipu, as the term is often spelled) were written documents.
--

The rest of the article is worth a read. The analogies are obviously to
delicious to pass up. Is anyone interested in creating a mechanical
"knotted string" parser?

That being said, what is the programming-centric etymology of "string"?
Having been familiar with buffer overflows, I am familiar with the
entymology of said construct :)
 
R

Richard Brodie

That being said, what is the programming-centric etymology of "string"?

The usage of string as "a sequence of similar objects", appears to be very
old. Dropping the 'character' part is probably much more recent (probably
around the classic Unix/C era: old Pascal documentation tends to say
"character string" explicitly.
 
D

David Opstad

Brian Kelley said:
That being said, what is the programming-centric etymology of "string"?

It goes back at least to 1962, because that's when SNOBOL was invented,
and the 'S' stands for "String" in that acronym.

Dave
 
B

Brian Kelley

Richard said:
The usage of string as "a sequence of similar objects", appears to be very
old. Dropping the 'character' part is probably much more recent (probably
around the classic Unix/C era: old Pascal documentation tends to say
"character string" explicitly.

Isn't this relatively unique to characters though? I haven't seen
"integer string" and some old borland documentation (old memory here)
that had some code to convert from a String of Integers into an Array of
Byte. This usage of string specifically meant the ASCII equivalent of
an integer such as:

a = "1234567890"

More often I have seen "Array of Integers" or "List of Integers" so the
term "string" does appear to mean "human readable" or imply character
based... i.e. EBDIC/ASCII or the appropriate encoding.
 
D

Duncan Booth

I have always been curious about why a construct like:

a = "the quick brown fox jumps over the lazy dog"

is called a string. I have always assumed that it was a reference to a
necklace type construct as in (and I can't resist) a "string of perls".

I think you have that about right. It's a "string of characters" rather
than "pearls".

I could be wrong though, we get so used to our terminology that we don't
ever need to think where it comes from. I was watching an episode of
Mastermind (a UK quiz show) the other day, and one of the questions totally
threw me, it was: "In computing, the word 'bit' is an abbreviation of what
two other words?", and I was sitting there thinking 'is it really an
abbreviation?' long after the contestant had passed on that answer and gone
on to other questions. Yes, I worked it out eventually, and I think the
contestant had as well by the time he got told the answers to the questions
he had passed on.
 
T

Travis Whitton

"In computing, the word 'bit' is an abbreviation of what two other words?"

Wow, I had no idea it was an abbreviation either. Luckily, dict had the answer
waiting for me:

From Jargon File (4.3.0, 30 APR 2001) [jargon]:

bit n. [from the mainstream meaning and `Binary digIT']

It's nice to see the occasional thread on computing history rather than the
endless stream of coding issues.

-Travis
 
B

Brian Kelley

This just goes to show that what is visible is usually the tip of the
iceberg.

It turns out that the term "linguistic string" has been in use for a
long time in the linguistics community to describe language syntax.
Zellig Harris apparently used the term in some of his work (published
around 1936). In 1965 Naomi Sager used "linguistic string" theory to
form the Linguistic String Project mainly used as an application toward
medical documents using a controlled medical vocabulary.

linguistic string
n : a linear sequence of words as spoken or written [syn: string,
string of words, word string]

The earliest paper I can find directly related to Linguistic strings is:

Linguistic String Analysis (1960)
Naomi Sager, NYU

ALthough I'm fairly sure the term was widely used in the liguistic
community in the 1950's.

So it seems that, indeed, the Incan's were first :)
 
P

Peter Hansen

Travis said:
"In computing, the word 'bit' is an abbreviation of what two other words?"

Wow, I had no idea it was an abbreviation either. Luckily, dict had the answer
waiting for me:

From Jargon File (4.3.0, 30 APR 2001) [jargon]:

bit n. [from the mainstream meaning and `Binary digIT']

It's nice to see the occasional thread on computing history rather than the
endless stream of coding issues.

I'm always surprised by the number of people
in computing that don't know this.

bit is a contraction of "Binary digIT"
byte is a pun on the word bit (8 bits)
nibble is a pun on the word byte (4 bits)

And nibble is spelled "nybble", at least around here, continuing
the pun started by byte...
 
B

Brian Kelley

Coloquially (in american-english):

A "bit" used to be half a quarter and therefore there are also 8 bits to
a dollar. Coincidence or a play on words? Some of us here are making
our livings using "pieces of eight", so to speak. Anyway, this brings
up this reather mildly amusing chart for pricing memory (from
http://www.thehumanitarian.org/faq.php)

1 Megabyte 1024 Kilobytes
1 Kilobyte 1024 Bytes
1 Byte 8 Bits
1 Shave and a Haircut 2 Bits
1 Bit $0.125
$1 8 Bits
1 Byte $1
1 Kilobyte $1024
1 Megabyte $1048576
 
R

Roy Smith

The old way to identify newborn babies in hospitals was to make up a
name bracelet with letter beads on a string. This would then be
attached to the baby's wrist or ankle.
 
P

Paul Watson

Travis said:
"In computing, the word 'bit' is an abbreviation of what two other
words?"

Wow, I had no idea it was an abbreviation either. Luckily, dict had the answer
waiting for me:

From Jargon File (4.3.0, 30 APR 2001) [jargon]:

bit n. [from the mainstream meaning and `Binary digIT']

It's nice to see the occasional thread on computing history rather than the
endless stream of coding issues.

I'm always surprised by the number of people
in computing that don't know this.

bit is a contraction of "Binary digIT"
byte is a pun on the word bit (8 bits)
nibble is a pun on the word byte (4 bits)

Pádraig.

My CS professor would insist that a byte is a collection of bits, and not
necessarily eight. There are machines which do not have 8-bit addressable
bytes.
 
A

Andrew Dalke

Paul Watson
My CS professor would insist that a byte is a collection of bits, and not
necessarily eight. There are machines which do not have 8-bit addressable
bytes.

I thought that was called a word, as in "the CDC 6400 had a 60
bit word size"

Andrew
(e-mail address removed)
 
M

Mikael Olofsson

I could swear there where more of these. Isn't there one for 2 bits and
32bits, etc?

I call 2 bits a dibit.

/Mikael Olofsson
Universitetslektor (Associate professor)
Linköpings universitet

-----------------------------------------------------------------------
E-Mail: (e-mail address removed)
WWW: http://www.dtr.isy.liu.se/en/staff/mikael
Phone: +46 - (0)13 - 28 1343
Telefax: +46 - (0)13 - 28 1339
-----------------------------------------------------------------------
Linköpings kammarkör: www.kammarkoren.com
 
J

Jarek Zgoda

Paul Watson said:
My CS professor would insist that a byte is a collection of bits, and not
necessarily eight. There are machines which do not have 8-bit addressable
bytes.

I remember that "byte" in French is expressed as "octet", even if it has
only 7 bits...
 
T

Thomas Bellman

Andrew Dalke said:
Paul Watson
I thought that was called a word, as in "the CDC 6400 had a 60
bit word size"

A word is the natural unit for operation in a machine. The
registers are word sized (if there are registers, that is), reads
and writes to memory use words (at least from the machine code
programmers point of view), and so on. A byte is a, typically
smaller, unit of bits that is semiconvenient to operate on, but
usually requires a bit more work by the hardware to extract and
deposit a single byte in a whole word.

Today many CPUs have a word size of 32 bits, and a byte size of
8 bits; there are instructions for operating on a quarter of a
word. But on a 36 bit machine, 8 bit bytes would not be very
convenient - you'd probably prefer bytes being 6 or 9 bits in
size.

The DEC PDP-10 was a 36 bit machine. Bytes, however, were
variable sized, and could be anywhere between 1 and 36 bits.
The instructions LDB (LoaD Byte) and DPB (DePosit Byte) took,
in addition to the destination/source register and the word
address to load/store from, also an offset (measured in bits)
within the word, and a byte size (also measured in bits).
 
J

John Baxter

Travis said:
"In computing, the word 'bit' is an abbreviation of what two other words?"

Wow, I had no idea it was an abbreviation either. Luckily, dict had the
answer
waiting for me:

From Jargon File (4.3.0, 30 APR 2001) [jargon]:

bit n. [from the mainstream meaning and `Binary digIT']

It's nice to see the occasional thread on computing history rather than the
endless stream of coding issues.

I'm always surprised by the number of people
in computing that don't know this.

bit is a contraction of "Binary digIT"
byte is a pun on the word bit (8 bits)
nibble is a pun on the word byte (4 bits)

And for the NCR C-315 (early 1960s), the 12-bit word was called a
"slab". This was a (near) abbreviation of "syllable" since someone felt
that 12 bits was too small to call a "word". [Compared with IBM's
36-bit words (704, et seq) that made sense.]

Data storage and the accumulator were variable in length, up to a
few--8, I think--slabs. The accumulator grew and shrank as need to
contain what it needed to, with a register named T@ ("tally of the
accumulator") keeping track.

A slab could be considered to hold 3 digits or two characters. (The
machine was decimal, not binary, in the face it presented to the
programmer. Including in memory addressing.)

And that's my yarn for the day, at least in this thread.

--John
 
P

Piet van Oostrum

JZ> I remember that "byte" in French is expressed as "octet", even if it has
JZ> only 7 bits...

Are you sure. Several international organisations use the word 'octet' in
their official specifications, to make sure that an 8-bit byte is meant.
 
J

Jarek Zgoda

Piet van Oostrum said:
JZ> I remember that "byte" in French is expressed as "octet", even if it has
JZ> only 7 bits...

Are you sure. Several international organisations use the word 'octet' in
their official specifications, to make sure that an 8-bit byte is meant.

I cann't recall the machine I'm referring to (it was product of Bull),
but I am sure that lecturer called 7 bit units as "octets".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top