Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > [OT] Why is it called string?

Reply
Thread Tools

[OT] Why is it called string?

 
 
Brian Kelley
Guest
Posts: n/a
 
      08-21-2003
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

--
Brian Kelley http://www.velocityreviews.com/forums/(E-Mail Removed)
Whitehead Institute for Biomedical Research 617 258-6191

 
Reply With Quote
 
 
 
 
Richard Brodie
Guest
Posts: n/a
 
      08-21-2003

"Brian Kelley" <(E-Mail Removed)> wrote in message
news:3f44ce77$0$556$(E-Mail Removed)...

> 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.


 
Reply With Quote
 
 
 
 
David Opstad
Guest
Posts: n/a
 
      08-21-2003
In article <3f44ce77$0$556$(E-Mail Removed)>,
Brian Kelley <(E-Mail Removed)> wrote:

> 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
 
Reply With Quote
 
Brian Kelley
Guest
Posts: n/a
 
      08-21-2003
Richard Brodie wrote:

> "Brian Kelley" <(E-Mail Removed)> wrote in message
> news:3f44ce77$0$556$(E-Mail Removed)...
>
>
>>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.
>


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.

--
Brian Kelley (E-Mail Removed)
Whitehead Institute for Biomedical Research 617 258-6191

 
Reply With Quote
 
Duncan Booth
Guest
Posts: n/a
 
      08-21-2003
Brian Kelley <(E-Mail Removed)> wrote in
news:3f44ce77$0$556$(E-Mail Removed):

> 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.

--
Duncan Booth (E-Mail Removed)
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?
 
Reply With Quote
 
Travis Whitton
Guest
Posts: n/a
 
      08-21-2003
> "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

 
Reply With Quote
 
Brian Kelley
Guest
Posts: n/a
 
      08-21-2003
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

--
Brian Kelley (E-Mail Removed)
Whitehead Institute for Biomedical Research 617 258-6191


 
Reply With Quote
 
Peter Hansen
Guest
Posts: n/a
 
      08-21-2003
(E-Mail Removed) wrote:
>
> Travis Whitton wrote:
> >>"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...
 
Reply With Quote
 
Brian Kelley
Guest
Posts: n/a
 
      08-21-2003
Istvan Albert wrote:
> (E-Mail Removed) wrote:
>
>> I'm always surprised by the number of people
>> in computing that don't know this.


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

--
Brian Kelley (E-Mail Removed)
Whitehead Institute for Biomedical Research 617 258-6191

 
Reply With Quote
 
Greg Krohn
Guest
Posts: n/a
 
      08-21-2003

<(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
....
> 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)


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

While using [http://labs.google.com/sets] to see if I could find any others,
I ran across [http://www.intuitor.com/counting/HandCounter.html]. Look at
the represenation of 4 in binary. I hope that's just a joke.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is a button Click event also called when a textbox TextChanged event is called??? S_K ASP .Net 6 11-08-2007 07:44 PM
What is called carry chain structure in FPGA is called in IC? Weng Tianxiang VHDL 6 09-12-2007 07:19 AM
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
three times copy ctor called, one ctor called, why? Apricot C++ 4 04-16-2004 07:55 AM



Advertisments