Talk:SNOBOL

message: This is possible, I guess... has anyone verified this with the creators of SNOBOL?
The story I heard (from Polonsky, as I recall, who I knew at Bell Labs), was that the name came from "a snowball's chance in hell," which was said (by whom I don't know) about the prospects for the language succeeding (or, perhaps, being implemented). -- wrote someone on 26 April 2005 without signing the post
I heard this, too, around 1971 or so, I think from Jim Gimpel. Or maybe Polonsky, who I also talked with sometimes.Rochkind (talk) 19:36, 15 March 2010 (UTC)
replies: text: My apologies to Rochkind. I was misled by this link in the page history. -- Derek Ross | Talk 20:50, 16 March 2010 (UTC)
thread_title:  Regarding the "jocular reference to COBOL" 

message: It is NOT accurate that languages like AWK and Perl are "more efficient".  Notably,
well-written programs compiled using the SPITBOL implementation (at least) of the SNOBOL4 programming language are often ten or more times faster in execution than a corresponding Perl program.
Also, while regular-expression-type pattern matching has undoubtedly been made POPULAR by Perl et al, it is a mind-numbingly braindead approach to pattern matching compared to the much richer and more powerful pattern matching capabilites offered by SNOBOL4 and SPITBOL. (If you ever want anyone to take you seriously about this, can the crap and provide examples that demonstrate your way is better. It should be real easy if what you say is actually true.)
Also, Ralph Griswold has stated that the original implementation of the SNOBOL programming language was implemented before the IBM 360, for the IBM 7090.  (There is an ACM SNOBOL page from a 1981 ACM talk where Griswold talks about the creation of SNOBOL;  ref. http://tennessee.cc.vt.edu/~hopl/Snobol_files/snobol.html )
Gep2 05:19, 28 September 2005 (UTC)
thread_title:  Regarding the original article 

message: in the article is credited to the 360, but one of the references cited (http://www.snobol4.org/history.html) has the first implementation on the 7090.
:That seems like good enough reason to change it, so I will... Dpbsmith (talk) 16:40, 20 December 2005 (UTC)
replies: text: The first implementation of SNOBOL was on the IBM 7090 in 1962. However the first implementation of SNOBOL4 (which is the language you are thinking of when you say SNOBOL) was started on the IBM 7094 in early 1966 but was abandoned in mid 1966. That was because development was switched to the IBM 360 at that time and the first prototype was completed on that machine in mid 1967. -- Derek Ross | Talk 04:37, 10 March 2010 (UTC)
thread_title: First Implementation

message: I am sure that this article could be improved—and if I can find my printout of the manual (DEC 20, SPITBOL or possibly Macro SPITBOL) and my copy of Susan Hockey’s book, and then switch my mind back by a couple of decades, I might even be able to contribute to that. (Sadly, I didn’t have the foresight to steal the computer centre’s copy of Griswold et al, which I am sure has not been used since. It struck me as a fine book.) In the meantime, however, I notice that whoever posted the template message failed to provide the indicated rationale on this talk page. That seems to me to be verging upon spam and I propose therefore to remove it. Any objections? 
By the way, the key thing that seems to me to be missing in regexp, as opposed to SNOBOL, is not so much power as human-readability. Ian Spackman 02:34, 16 February 2006 (UTC)
replies: text: According to the SNOBOL wiki there is rather more to SNOBOL pattern matching.  Not least, the ability to create pattern matching "functions" which can be used within new patterns. --24.205.91.162 18:58, 19 October 2006 (UTC)
thread_title: CleanUp Template

message: This page could really do with some examples ... Richard W.M. Jones 09:10, 15 July 2007 (UTC)
thread_title:  Examples? 

message: SNOBOL is a strongly-typed language, in that the system always knows what data type a variable contains, although you can change any variable's type at any time by simpy assigning a value of a different data type to it.  The first-class 
data types include:
   INTEGER
   REAL
   STRING
   PATTERN
   CODE
   ARRAY
   TABLE
   EXPRESSION
   USER-DEFINED DATATYPE
Explicit declaration of variables is not required.  All undefined variables default to the value of a null string.  
An asterisk in column 1 of a line indicates that the rest of the line is a comment.
All statements in SNOBOL syntactically consist of five parts, although all five parts are optional.  The basic syntax is:
label   subject   pattern   =  object           :(goto)
The special label "end" signifies the end of the program.
Operations in SNOBOL generally SUCCEED, and produce a value (which might be the null string) or FAIL and produce NO value at all).  Success and Failure are the basis of all (explicit) conditional transfers of control.
Gotos can be unconditional:                    :(label)
  or based on success:                         :s(label)
  or based on failure:                         :f(label)
  or can specify for both:                     :s(label1)f(label2)
The evaluation of a SNOBOL4 statement generally proceeds as follows:
  1.  The subject is evaluated.
  2.  If a pattern is present, it is evaluated.
  3.  The evaluated pattern is matched against the subject.
  4.  The object is evaluated.
  5.  The value of the object (if there is no pattern) is assigned to the subject, or (if there is a pattern) replaces the portion of the subject that was matched by the pattern.
  6.  If "failure" occurs at any point in the above process, and in the absence of successful alternatives, execution of the statement terminates and goes to the appropriate unconditional or "failure" goto (if any) or else to the next statement in sequence.  If the statement succeeds completely, execution continues with the unconditional or "success" goto, or with the next statement in sequence.
The statement:
    x = 1
simply sets the type of X to INTEGER and assigns it a value of 1. 
A trivial pattern match would be (if the initial value of STR is "ABCDEF"):
    STR  "CD" = "WXYZ"
That statement would succeed, and the value of STR would now be "ABWXYZEF".
Input and output in SNOBOL work by associating variables with files, and subsequently the variable works like a "magic can".  Whenever something is stored into an output-associated variable, it is ALSO written to the associated output file.  Whenever the value of an input-associated variable is accessed, the next record of the associated input file is read and returned as the new value of that variable (or FAILURE, and NO value returned. if the input file is at EOF).
The variable INPUT by default is associated with the standard input file.  OUTPUT by default is associated with the standard output file.  TERMINAL by default is output-associated with the screen, and input-associated with the keyboard.
Therefore, a simple program which copies standard input to standard output is simply:
 somelabel   output = input     :s(somelabel)
 end
The classical "Hello, world" program is simply:
       terminal = "Hello, world!"
 end
It is obviously beyond the scope of this section to describe the entire language, but hopefully this gives at least a brief look.
Gep2 (talk) 03:35, 26 December 2008 (UTC)
replies: text: Well spotted. It shouldn't have been there. I've removed it. -- Derek Ross | Talk 17:23, 29 April 2014 (UTC)
thread_title:  Examples 

message: Dave Farber read this entry, was somewhat annoyed by it and wrote up the story of now SNOBOL was named. w00t :-) - David Gerard (talk) 14:42, 26 December 2008 (UTC)
replies: text: Of course this is more useful to people who might want to correct the page by providing a link to David's history of SNOBOL. --BenFranske (talk) 16:31, 26 December 2008 (UTC)
replies: text: Yes, I didn't post it on this talk page until I'd edited the article ;-) - David Gerard (talk) 16:47, 26 December 2008 (UTC)
thread_title:  The story of the naming! 

message: Maybe its just me, but the section comparing it to regex seems a bit one-sided. I don't know that much about SNOBOL, so perhaps it realy isn't, but thought i'd mention. Bawolff (talk) 20:43, 18 September 2009 (UTC)
replies: text: I have rewritten it: is it any better? JamesBWatson (talk) 13:47, 25 September 2009 (UTC)
thread_title:  Neutrality 

message: The SNOBOL#SNOBOL and Python section does not seem appropriate; it has an advertising flavor. Is the extension worth mentioning or is it WP:UNDUE? Glrx (talk) 18:00, 16 November 2012 (UTC)
thread_title:  SNOBOL and Python 

message: I knew little about Snobol when I came to this page, and I still know little.  There is not a single example program  (not even a "Hello World") or even an example line.  We told that the language consists of "patterns" that can be manipulated, but there are no examples of either patterns or manipulation.  Instead we get tiresome arguments about whether Snobol or its patterns are "better than"  Perl and Awk and their regular expressions.  Without some concrete examples, it is impossible for me to evaluate the arguments, nor do I really care; the big question is, which languages are more useful for a given task and why?  The article really needs a rewrite. CharlesTheBold (talk) 03:50, 10 May 2013 (UTC)
thread_title:  details and examples? 

message: Some old page history that used to be at the title "SNOBOL" is now at Talk:SNOBOL/Old history. Graham87 12:01, 30 June 2013 (UTC)
thread_title:  Old page history 

message: Viktor Berstis's version is the most accurate PC implementation? I don't know if this was true at any point but for the last years Phil Budne's port of SNOBOL4 to UNIX and UNIX-like OS clearly wins. It is not a new implementation, it's a port of the original SNOBOL4 code. I have compared it to the IBM version from 1969 which I have running on IBM mainframe hardware and I have not found a difference in behavior. Phil has added features for UNIX but the base language has not been changed. It is very hard to understand why this excellent free implementation is not listed on this page. See http://www.snobol4.org for the code.77.125.14.124 (talk) 11:04, 20 October 2013 (UTC)
replies: text: We do have a link to http://www.snobol4.org in the article. However any version which codes the original macro implementation should be basically identical on any operating system for the same reasons that Java or BCPL is basically identical on any operating system. So I'm not sure why we are bothering to make this judgement on which is most like the OS 360 original. -- Derek Ross | Talk 15:25, 20 October 2013 (UTC)

text: Fair enough -- Derek Ross | Talk 20:13, 24 November 2013 (UTC)
thread_title:  Implementations 

message: This article (like many) uses an unbound reference to the time of its writing: "...these implementations are now available free from Catspaw"
Can the article be edited to say specifically when such implementations are or were available?
Something like: in 2009 implementations were available free from Catspaw"
216.239.45.222 (talk) 19:11, 11 January 2016 (UTC)
thread_title:  Question about "now" 

message: Convert:
          OUTPUT = "This program will ask you for personal names"
          OUTPUT = "until you press return without giving it one"
          NameCount = 0                                            :(GETINPUT)
AGAIN     NameCount = NameCount + 1
          OUTPUT = "Name " NameCount ": " PersonalName
GETINPUT  OUTPUT = "Please give me name " NameCount + 1 
          PersonalName = INPUT
          PersonalName LEN(1)                                      :S(AGAIN)
          OUTPUT = "Finished. " NameCount " names requested."
END
To:
          OUTPUT = "This program will ask you for personal names"
          OUTPUT = "until you press return without giving it one"
          NameCount = 0                                            :(GETINPUT)
AGAIN     OUTPUT = "Name " NameCount ": " PersonalName
GETINPUT  NameCount = NameCount + 1
          OUTPUT = "Please give me name " NameCount
          PersonalName = INPUT
          PersonalName LEN(1)                                      :S(AGAIN)
          OUTPUT = "Finished. " NameCount " names requested."
END  — Preceding unsigned comment added by NorthernComfort (talk • contribs) 03:38, 29 September 2019 (UTC)
thread_title:  Slightly more optimal example?  Integer arithmetic in Snobol4 was very expensive, so avoiding an extra increment would be better. 

message: I disagree with your assessment of SNOBOL as being of "low" importance to computer science. SNOBOL was a pioneering language in an important area of computer science, namely string and language processing, although it was preceded by COMIT. Among other things, it invented the idea of a pattern as a first-class object. As the lead of the article says, it was widely taught. Wexelblat's History of programming languages  includes a full chapter on it. Although it is not important today, it is an important part of the history of computer science. --Macrakis (talk) 14:22, 5 April 2023 (UTC)
replies: text: Re-rated to 'Mid' importance. Feel free to set the importance parameter to whatever you prefer. I'm on a WikiProject Computing rating spree, and while I have a decent feel for the impact factor for most of these topics I do misjudge sometimes. Looking back to the lede the impact factor seems rather obvious, and I'm not sure why I didn't see that; apologies. DigitalIceAge (talk) 14:43, 5 April 2023 (UTC)
thread_title: Importance