kim@amdahl.amdahl.com (Kim DeVaughn) (11/27/87)
In article <2034@ulowell.cs.ulowell.edu>, page@ulowell.cs.ulowell.edu (Bob Page) writes: > kim@amdahl.amdahl.com (Kim DeVaughn) wrote: > >[Catspaw, Inc porting their MS-DOS SNOBOL to the Amiga] > >I thought I'd let all of you who are interested in text and string > >processing know that such an animal is on the way. > > How does it compare with ICON, available on a Fish Disk? I'm not really sure ... haven't tried Icon out yet. All I know about Icon is from a July 1986 article in "Computer Language" magazine, and what I've attached below. My *impression* is that is more well-structured than is SNOBOL4, although the pattern matching capabilities (per se), are a bit more limited. Mike's 2nd comment on this (below) seems to confirm this. Guess I'll have to tryout Icon and see ... rats, this means yet another book to buy :-)! BTW, I had misread the note from Catspaw ... it *is* SPITBOL that they are porting to the Amiga (they already have versions available for 680x0 based UNIX(R) boxes like Apollo's, Sun's, NCR Tower, Convergent, etc.) They also have a port of SPITBOL in progress for the Mac, and are considering a port for the ST (they imply they're looking for a person with the right experience to do such a port, if you're interested). Oh, and they do have a version of Icon available of MS-DOS machines, too. A few people emailed me for their address, so .... Catspaw, Inc. PO Box 1123 Salida, Colorado 81201 303-539-3884 (voice) [Area code 303 becomes 719 on 3/5/88] 303-539-4830 (BBS) I've no connection with them, except as a satisfied customer of their SNOBOL4 for my MS-DOS box. They deliver a good product, at a reasonable price, provide good support, reaasonable updates, and of course DO NOT copy-protect their software. /kim vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv From: uunet!violet.berkeley.edu!mwm%mica.Berkeley.EDU Date: Fri, 20 Nov 87 01:22:18 PST Subject: Re: SNOBOL for Amy Organization: Missionaria Phonibalonica Unless you're really hooked on SNOBOL as SNOBOL, you might want to look at Icon (it's on one of the Fish disks). Icon is what Griswold did after he got tired of SNOBOL. It's got more powerful string parsing/pattern matching capabilities than SNOBOL. They're also better integrated into the language. <mike ============================================================================ Date: Sun, 22 Nov 87 20:41:12 MST From: "Rob McConeghy" <malibo@arizona.edu> Subject: Re: SNOBOL for Amy News-Path: arizona!noao!hao!ames!amdahl!kim In reference to your recent posting that Catspaw is working on a port for SNOBOL for the Amiga, you may be interested to know that the more recent successor to SNOBOL, the Icon programming language which was developed at the University of Arizona by Ralph Griswold, one of the original authors of SNOBOL, is currently available in versions for MSDOS machines, the Atari, and the Amiga as well as for UNIX. These are all available from the Icon Project at the Computer Science Dept. at the University of Arizona in Tucson in both binary and source code form. They are all public domain and may be obtained for a nominal fee. ============================================================================ Subject: Re: SNOBOL for Amy Ultrix: Just say No! Date: Sun, 22 Nov 87 23:57:51 PST From: Mike (My watch has windows) Meyer <uunet!violet.Berkeley.EDU!mwm> If what you want to do in SNOBOL is primarily string and pattern matching, with little or no processing, you'd be better off with SNOBOL. Mostly because the pattern matching in SNOBOL is more compact than it is in Icon. The reason for that extra compactness is that the SNOBOL pattern matching is a seperate sub-language embedded in SNOBOL. In Icon, there are some primitives for scanning part of a string, and operators in the language for combining these into full-fledged patterns. This results in 1) pattern-matching facilities that work on things other than strings - like game trees, or directed graphs, and 2) slightly more powerfull pattern matching, as you don't have to obey the restrictions on patterns in SNOBOL. Those combining operations are "generators" and operators for dealing with them. A generator is an expression that returns a value, and can be later resumed to generate a new value, etc. Examples: ARB isn't a builtin, but you can write it as a procedure: procedure arb() suspend &subject[.&pos : &pos <- &pos to *&subject + 1] end I've forgotten much of my SNOBOL, but you can match the regexp .*load.*r6.* with arb() || ="load" || arb() || ="r6" || is string catenation, except that if the right-hand expression fails, you resume the left-hand expression and then try the right-hand one again.. It's related to |, which just executes the two expresions. For instance, if you can print all the integers by doing something like: n +:= 1 | print n | fail The language is worth a look, but you'll need to buy the book that goes with it: The Icon Programming Language, by Griswold and Griswold. <mike ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- UUCP: kim@amdahl.amdahl.com or: {sun,decwrl,hplabs,pyramid,ihnp4,uunet,oliveb,cbosgd,ames}!amdahl!kim DDD: 408-746-8462 USPS: Amdahl Corp. M/S 249, 1250 E. Arques Av, Sunnyvale, CA 94086 CIS: 76535,25
wheels@mks.UUCP (Gerry Wheeler) (11/27/87)
[This discussion has been cross-posted to about a million newsgroups. I was going to edit some out, but there may be people out there following the conversation, so I left it.] In article <18763@amdahl.amdahl.com>, kim@amdahl.amdahl.com (Kim DeVaughn) writes: > In article <2034@ulowell.cs.ulowell.edu>, page@ulowell.cs.ulowell.edu (Bob Page) writes: > > kim@amdahl.amdahl.com (Kim DeVaughn) wrote: > > >[Catspaw, Inc porting their MS-DOS SNOBOL to the Amiga] > > >I thought I'd let all of you who are interested in text and string > > >processing know that such an animal is on the way. > > > > How does it compare with ICON, available on a Fish Disk? > > I'm not really sure ... haven't tried Icon out yet. All I know about Icon > is from a July 1986 article in "Computer Language" magazine, and what I've > attached below. How do SNOBOL and Icon compare to Awk? I did use SNOBOL for a class in programming, but that was several years ago and I've forgotten it. I haven't used Icon at all. For those who don't know Awk, is was written by Aho, Weinberger and Kernighan (hence its name). The basic outline of a program is a sequence of pattern/action pairs. As the data file is read, each pattern (regular expression) is compared to the current line, and the action is executed if there is a match. The action parts bear a strong resemblance to C, not surprisingly. As I recall SNOBOL, it was very easy to end up with spaghetti code. Awk seems to be fairly easy to read. Mr's A., W., and K. have just published a book about the latest version of Awk, for those who are interested. -- Gerry Wheeler Phone: (519)884-2251 Mortice Kern Systems Inc. UUCP: uunet!watmath!mks!wheels 43 Bridgeport Rd. E. BIX: mks Waterloo, Ontario N2J 2J4 CompuServe: 73260,1043
lindsay@K.GP.CS.CMU.EDU (Donald Lindsay) (11/29/87)
Gee, that's a hefty list of newsgroups. I promise not to do it again. Summary: I've used Snobol, AWK, and Icon. I don't use Snobol or AWK any more. Reason: versus Snobol - Icon is structured: it has local variables, and so on. It feels much more like a conventional language, without giving up (much) in the pattern matching side. Versus AWK: more powerful - more data types, more constructs. Versus both: zippo features like generators ( a language construct based on coroutine execution ). Separate compilation and linking - essential for any large effort, and fast enough to be OK for those five-liners. Also, this allows you to link in programs written in other languages, hence, reuse previsous code, or do any obscure system calls. My experience: I've booted two successive Icon distribution tapes, each on both a Vax (4.2BSD) and a Sun-3. No sweat. Fast enough compilation for short quickies, fast enough execution for munging big input files. One bug found: Arizona gave me a writearound very quickly and fixed it in the next release. -- Don lindsay@k.gp.cs.cmu.edu CMU Computer Science
sbw@naucse.UUCP (Steve Wampler) (11/30/87)
Just as a comment, the Icon code for SNOBOL4's ARB pattern can be written more cleanly as: procedure ARB() suspend move(0 to (*&subject - &pos)) end The earlier example was given in the Icon book as a way to use the low-level string-scanning facillities to develop more complex ones. In fact, if you're willing to burn a little extra cpu time at the end, the suspend given above can be written: suspend move(0 to *&subject)