From icon-group-sender Thu Jan 6 22:46:36 1994 Received: by cheltenham.cs.arizona.edu; Thu, 6 Jan 1994 21:31:46 MST Date: 6 Jan 94 22:46:36 GMT From: walter!news@rutgers.edu (Darren New) Organization: Bellcore Subject: Re: Icon and sockets Message-Id: Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu > To write servers, the best alternative may be to write a C program > that uses accept(2) and then forks an Icon program once a connection > is established. Actually, what I wanted was to manage several sockets simultaneously, handling connects and disconnects dynamically. I chose to go with a C process that managed the sockets and wrote to a file which I just poled. Any better ideas? From icon-group-sender Fri Jan 7 13:29:34 1994 Received: by cheltenham.cs.arizona.edu; Sun, 9 Jan 1994 19:06:01 MST Date: 7 Jan 94 13:29:34 GMT From: agate!howland.reston.ans.net!pipex!pipex!not-for-mail@ucbvax.Berkeley.EDU (Ian Phillipps) Organization: PIPEX Ltd, Cambridge, UK. Subject: Re: Icon and sockets Message-Id: <2gjo3u$213@tank.pipex.net> References: Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu In article , >Actually, what I wanted was to manage several sockets simultaneously, >handling connects and disconnects dynamically. I chose to go with a C >process that managed the sockets and wrote to a file which I just poled. >Any better ideas? Not sure if I'm allowed to say this here :-) but that sounds like more of a job for Perl, if you want the flexibility of a high-level interpreted language. Horses for courses, and all that.... [See comp.lang.perl - versions for Unix + other systems from various FTP sites] Ian From icon-group-sender Wed Jan 5 18:38:58 1994 Received: by cheltenham.cs.arizona.edu; Sun, 9 Jan 1994 19:06:26 MST Date: 5 Jan 94 18:38:58 GMT From: cis.ohio-state.edu!math.ohio-state.edu!cyber2.cyberstore.ca!nntp.cs.ubc.ca!cs.ubc.ca!ubc-cs!lili@ucbvax.Berkeley.EDU (Lili Liu) Organization: University of British Columbia, Vancouver, B.C., Canada Subject: ICON compiler Message-Id: <2gf1g2$c6@cs.ubc.ca> Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu Hi, I need to get the compiler for ICON language. Does anyone know the ftp site number and the directory to get it? Thanks. From icon-group-sender Wed Jan 5 23:44:05 1994 Received: by cheltenham.cs.arizona.edu; Sun, 9 Jan 1994 19:06:40 MST Date: 5 Jan 94 23:44:05 GMT From: pipex!bnr.co.uk!corpgate!crchh327.bnr.ca!eaglesto@uunet.uu.net (Robert Eaglestone) Organization: Bell Northern Research, Richardson, TX Subject: ICON FAQ, or just plain info! Message-Id: <2gfjc5$qv4@crchh972.bnr.ca> Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu Greetings! What is ICON, and what does it resemble, and is there a shareware compiler, and is it fun, interesting, easy, strongly typed, powerful, useful, wonderful? Any other adjectives? regards, rob --- i don't speak for BNR. From icon-group-sender Thu Jan 6 10:19:55 1994 Received: by cheltenham.cs.arizona.edu; Mon, 10 Jan 1994 09:48:34 MST Date: 6 Jan 94 10:19:55 GMT From: cis.ohio-state.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!sdd.hp.com!caen!usenet.coe.montana.edu!netnews.nwnet.net!henson!markline@ucbvax.Berkeley.EDU (Mark Line) Organization: Western Washington University Subject: Re: ICON FAQ, or just plain info! Message-Id: <1994Jan6.101955.23906@henson.cc.wwu.edu> References: <2gfjc5$qv4@crchh972.bnr.ca> Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu eaglesto@bnr.ca (Robert Eaglestone) writes: >Greetings! What is ICON, and what does it resemble, and is there a shareware >compiler, >and is it fun, Yes. >interesting, Yes. >easy, Yes. >strongly typed, You must be joking. >powerful, Yes. >useful, Yes. >wonderful? Yes. >Any other adjectives? Yes. -- Mark -------------------------------------------------------------------- Mark P. Line Phone: +1-206-733-6040 Open Pathways Fax: +1-206-733-6040 P.O. Box F Email: markline@henson.cc.wwu.edu Bellingham, WA 98227-0296 -------------------------------------------------------------------- From icon-group-sender Thu Jan 6 13:46:30 1994 Received: by cheltenham.cs.arizona.edu; Mon, 10 Jan 1994 09:49:00 MST Date: 6 Jan 94 13:46:30 GMT From: walter!news@uunet.uu.net (Darren New) Organization: Bellcore Subject: Re: ICON FAQ, or just plain info! Message-Id: Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu Just to clarify... > >Greetings! What is ICON, > >and what does it resemble, It's a procedural language with backtracking, dynamic data typing, GC and all that goes with that, co-routines (but not threads, unfortunately) and many powerful built-in functions. > >and is there a shareware > >compiler, There are many free or shareware compilers and interpreters for it. > >and is it fun, Yes. > >interesting, Yes. > >easy, Yes. > >strongly typed, You must be joking. Yes, it's strongly typed. Dynamically typed, but strongly typed. That is, variables don't have types, but data does. > >powerful, Yes. > >useful, Yes. > >wonderful? Yes. > >Any other adjectives? Yes. You can add portable, on-some-platforms-extensible, logical, (mostly) consistant, fairly fast, graphics-supporting, easy to debug, supported, mature, hmmm.... You can delete, unfortunately, easy low-level nonportable access to OS features. It's non-trivial to use sockets, for example, from inside Icon, I've found. But for doing programs you could use stdio to do in C, it wins hands down. The best reference I've found, BTW, is "The Icon Programming Language" by Ralph and Madge Griswold. I have the second edition, which is (c) 1990, ISBN 0-13-447889-4, Prentice-Hall. -- Darren -- 445 South St/MRE 2E-279/Morristown NJ 07960 USA/(201)829-4833 Delivery of Electronic Multimedia over Networks (DEMON) Also, formal description techniques, programming languages. ``Your fault: Core dumped.'' EFF#846 ``Sometimes, you just have to bite the silver bullet.'' From icon-group-sender Thu Jan 6 20:11:01 1994 Received: by cheltenham.cs.arizona.edu; Mon, 10 Jan 1994 09:49:12 MST Date: 6 Jan 94 20:11:01 GMT From: cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!agate!msuinfo!uchinews!quads!goer@ucbvax.Berkeley.EDU (Richard L. Goerwitz) Organization: University of Chicago Subject: Re: ICON FAQ, or just plain info! Message-Id: <1994Jan6.201101.25901@midway.uchicago.edu> References: <2gfjc5$qv4@crchh972.bnr.ca>, <1994Jan6.101955.23906@henson.cc.wwu.edu> Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu >>Greetings! What is ICON, and what does it resemble, and is there a shareware >>compiler, > >>and is it fun, Yes. >>interesting, Yes. >>easy, Yes. >>strongly typed, You must be joking. Icon is very strongly typed. At any given time the type of a given variable or value is always known. Type conversions are done in a relatively high-level and sophisticated fashion. Static typing and strong typing are different things. Mine is just an opinion of another user, so don't take this as gospel! -- -Richard L. Goerwitz goer%midway@uchicago.bitnet goer@midway.uchicago.edu rutgers!oddjob!ellis!goer From icon-group-sender Thu Jan 6 01:23:00 1994 Received: by cheltenham.cs.arizona.edu; Mon, 10 Jan 1994 12:05:36 MST Date: 6 Jan 94 01:23:00 GMT From: world!sgmlsh@uunet.uu.net (Sam Hunting) Organization: The World Public Access UNIX, Brookline, MA Subject: SNOBOL/Spitbol Message-Id: Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu Is anyone out there using SNOBOL/SPitbol? Archives? FAQs? Bulletin boards? Mailing lists? I'd like to hear from you! Thanks, and Happy New Year. -- 8 Ahem. Check out #define IconCalling in config/.../define.h. It's normally left turned off according to the documentation, because it incurs overhead in order to support recursive calls from C to Icon and vice versa. ---It also warns that this requires linking the entire Icon interpreter and runtime system into the C program, so to that extent you are correct. (Heavyweight Tcl, anyone? :-) | an Icon parser into an application! (Hmmm, maybe someone should write an 'Icon | Server' that can handle parsing and interpreting from multiple Icon clients...) +------------->8 Been there, done that... except it was for Prolog, not Icon. I could probably dig it up and change it to an Icon server if I had the time and the inclination. The biggest problem here is maintaining separate execution contexts for all clients. For the Prolog one I didn't need to; it was essentially a "Prolog database server" which arbitrated access to a common rulebase. Had I needed a general *language* server mechanism it would have been more difficult. ++Brandon -- Brandon S. Allbery kf8nh@kf8nh.ampr.org bsa@kf8nh.wariat.org "MSDOS didn't get as bad as it is overnight -- it took over ten years of careful development." ---dmeggins@aix1.uottawa.ca From icon-group-sender Wed Feb 16 14:23:37 1994 Received: by cheltenham.cs.arizona.edu; Wed, 16 Feb 1994 15:39:16 MST Date: Wed, 16 Feb 94 14:23:37 CST From: jeffery@ringer.cs.utsa.edu (Clinton L. Jeffery) Message-Id: <9402162023.AA10013@ringer.cs.utsa.edu.sunset> To: kf8nh@kf8nh.ampr.org Cc: icon-group@cs.arizona.edu In-Reply-To: (Brandon S. Allbery's message of 12 Feb 94 18:59:50 GMT <1994Feb12.185950.447@kf8nh.wariat.org> Subject: wishing for an Icon-like embedded language Content-Length: 629 Status: R Errors-To: icon-group-errors@cs.arizona.edu Brandon Allbery writes: > The biggest problem here is maintaining separate execution contexts for all > clients. For the Prolog one I didn't need to; it was essentially a "Prolog > database server" which arbitrated access to a common rulebase. Well, the Icon interpreter has code (under yet another #ifdef that is turned off by default) that supports separate execution contexts. In fact, if we could just settle on a few network interface functions, y'all could almost write this heyah suhver y'all are talkin about in Ahcon. Clint Jeffery jeffery@ringer.cs.utsa.edu Deep in the heart of Texas, no one can hear you scream. From icon-group-sender Sat Feb 5 00:23:26 1994 Received: by cheltenham.cs.arizona.edu; Thu, 17 Feb 1994 09:17:06 MST Date: 5 Feb 94 00:23:26 GMT From: cis.ohio-state.edu!pacific.mps.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!pipex!uknet!festival!eddie@ucbvax.Berkeley.EDU (Eddie Corns) Organization: Edinburgh University Subject: RadioButtons in WIT Message-Id: Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu Hi, I've just been playing about with WIT via XIB. I've constructed a simple program with a RadioButton. What I want to do is set the value before letting the user get at it. So I do VSet (radio_button1, type_v) | write ("oops") and it always fails. Having a look at vradio.icn I think someone forgot to finish the set code because it doesn't seem to call the draw routine or the callback and falls off the end (hence the failure). As far as I can see the sources to WIT are not stored seperately on arizona and I simply don't have the space to hold the entire distribution without overwriting the current one. So does anyone know if I'm talking nonsense and simply not using it right or if it's been fixed? I have a timestamp of Apr 5 on my source but I can't remember if that's when I unpacked it or if it came like that. If it's not been fixed I will have a go but I have a sneaky suspicion there are other bits of that file that are also incomplete. Other than this little quirk the two systems look pretty neat, could do with a spot more descriptive text though. Thanks, Eddie From icon-group-sender Sat Feb 5 00:23:26 1994 Received: by cheltenham.cs.arizona.edu; Thu, 17 Feb 1994 09:14:56 MST Date: 5 Feb 94 00:23:26 GMT From: cis.ohio-state.edu!pacific.mps.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!pipex!uknet!festival!eddie@ucbvax.Berkeley.EDU (Eddie Corns) Organization: Edinburgh University Subject: RadioButtons in WIT Message-Id: Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu Hi, I've just been playing about with WIT via XIB. I've constructed a simple program with a RadioButton. What I want to do is set the value before letting the user get at it. So I do VSet (radio_button1, type_v) | write ("oops") and it always fails. Having a look at vradio.icn I think someone forgot to finish the set code because it doesn't seem to call the draw routine or the callback and falls off the end (hence the failure). As far as I can see the sources to WIT are not stored seperately on arizona and I simply don't have the space to hold the entire distribution without overwriting the current one. So does anyone know if I'm talking nonsense and simply not using it right or if it's been fixed? I have a timestamp of Apr 5 on my source but I can't remember if that's when I unpacked it or if it came like that. If it's not been fixed I will have a go but I have a sneaky suspicion there are other bits of that file that are also incomplete. Other than this little quirk the two systems look pretty neat, could do with a spot more descriptive text though. Thanks, Eddie From icon-group-sender Sat Feb 12 18:01:33 1994 Received: by cheltenham.cs.arizona.edu; Thu, 17 Feb 1994 13:32:38 MST Date: 12 Feb 94 18:01:33 GMT From: dog.ee.lbl.gov!agate!howland.reston.ans.net!vixen.cso.uiuc.edu!news.eecs.uic.edu!uicvm.uic.edu!wheaton.wheaton.edu!not-for-mail@ucbvax.Berkeley.EDU (Glauber Ribeiro) Organization: The Bossa Nova University Subject: Re: Icon functions reference card? Message-Id: <2jj5ht$qvn@david.wheaton.edu> References: , <2jg1pfINN9vm@uwm.edu> Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu In article <2jg1pfINN9vm@uwm.edu>, Alan D Corre wrote: & In article forb0004@gold.tc.umn.edu (Eric J. Forbis) writes: & >Is there a "quick function reference card" for Icon? & & ProIcon for the Mac has an online help function that acts as a programming & card. Might be nice if other versions did too. I believe there is an "online help" program in the icon archives. I'm sorry i don't remember the file name, but should not be impossible to find. Now if i could only remember the name of the archive site... ftp.cica.indiana.edu, maybe? Whatever is the official Icon site also has a large library of Icon stuff. Glauber -- glauber ribeiro glauber@david.wheaton.edu ------------------------- practice random kindness and senseless acts of beauty From icon-group-sender Thu Feb 17 14:33:53 1994 Received: by cheltenham.cs.arizona.edu; Thu, 17 Feb 1994 15:08:09 MST Date: Thu, 17 Feb 1994 14:33:53 MST From: "Cliff Hathaway" Message-Id: <199402172133.AA25134@cheltenham.cs.arizona.edu> To: icon-group@cs.arizona.edu Subject: Re: Icon functions reference card Status: R Errors-To: icon-group-errors@cs.arizona.edu The online help program is "ihelp.icn", and is part of the Icon program library, available from ftp.cs.arizona.edu, in the /icon/library directory. A description of the Icon program library is available in the /icon/doc directory, in both text and compressed Postscript form: ipd211.doc and ipd211.ps.Z, respectively. This document has a listing of the contents of the program library, with a brief description of each entry. It should be noted that the most recent versions of all Icon material will be found at this ftp site. I'm always surprised when I get a call saying "I just downloaded Icon version 6.2 from site xxx and I was wondering ...". Cliff Hathaway, Icon Project Dept. of Computer Science (602)621-4291 University of Arizona cliff@cs.arizona.edu (internet) Tucson, Ariz. 85721 {cmcl2,noao,uunet}!arizona!cliff (uucp) From icon-group-sender Thu Feb 17 20:43:27 1994 Received: by cheltenham.cs.arizona.edu; Thu, 17 Feb 1994 18:01:19 MST Date: 17 Feb 94 20:43:27 GMT From: agate!howland.reston.ans.net!math.ohio-state.edu!cs.utexas.edu!swrinde!sgiblab!pacbell.com!att-out!walter!flaubert!norman@ucbvax.Berkeley.EDU (Norman Ramsey) Organization: Bellcore Subject: Icon is not *that* much bigger than tcl Message-Id: Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu I looked that the numbers, and I may actually try using Icon as an embedded language. Here's the size of executable and library versions of the tcl stuff: -rwxr-xr-x 1 norman 212992 Jan 31 15:16 /usr/public/bin/tclsh -rw-r--r-- 1 norman 220690 Jan 31 15:01 /usr/public/pkg/tcl/lib/libtcl.a And for Icon we have -rwxr-xr-x 1 norman 327680 Sep 8 22:36 /usr/public/pkg/icon/lib/iconx -rw-r--r-- 1 norman 390918 Sep 8 22:34 /usr/public/pkg/icon/lib/rt.a Of course, this is a little unfair since Icon is not usable without a separate translation step, whereas that's included in the size of the tcl goo. But icont is not that big either: -rwxr-xr-x 1 norman 122880 Sep 8 22:36 /usr/public/pkg/icon/bin/icont The fast turnaround of tcl is one of its advantages, but the Icon experiment might be worth trying. If I learn anything interesting, I'll report it here... -- Norman Ramsey norman@bellcore.com From icon-group-sender Thu Feb 17 23:03:55 1994 Received: by cheltenham.cs.arizona.edu; Fri, 18 Feb 1994 10:10:32 MST Date: 17 Feb 94 23:03:55 GMT From: psinntp!newstand.syr.edu!npac.syr.edu!tolson@uunet.uu.net (Todd Olson) Organization: NPAC, Syracuse University - Syracuse, New York Subject: Re: wishing for an Icon-like embedded language Message-Id: References: , <1994Feb12.032054.26100@cs.rit.edu>, <1994Feb12.142953.9522@noao.edu> Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu In <1994Feb12.142953.9522@noao.edu> swampler@noao.edu () writes: >an Icon parser into an application! (Hmmm, maybe someone should write an 'Icon >Server' that can handle parsing and interpreting from multiple Icon clients...) >-- >Steve Wampler >swampler@noao.edu >Gemini Project (under AURA) Actually, on Macs there is a ready a server of sort in the idea of AppleScript. I have been having idle thoughts of figuring out how to make Icon be a "script" that works with the AppleScript system. Then I could control my Mac via Icon. Todd Olson tolson@npac.syr.edu From icon-group-sender Fri Feb 18 10:12:03 1994 Received: by cheltenham.cs.arizona.edu; Fri, 18 Feb 1994 10:14:10 MST Date: Fri, 18 Feb 1994 10:12:03 +0700 From: gmt (Gregg Townsend) Message-Id: <9402181712.AA06080@owl.cs.arizona.edu> To: icon-group Subject: Re: WIT questions Content-Length: 666 Status: RO Errors-To: icon-group-errors@cs.arizona.edu I can confirm that there are problems with VSet, and not just for radio buttons. I will investigate a fix, but due to lots of other changes I won't be able to supply anything until the next release of the library. As for the question about "cheating" (by directly accessing the .data field of a text vidget), it's probably bad form; but I don't know another way to accomplish that, so I guess it's between you and your conscience. I don't know of any pending changes that are likely to invalidate it. Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721 +1 602 621 4325 gmt@cs.arizona.edu 110 57 16 W / 32 13 45 N / +758m From icon-group-sender Fri Feb 18 09:03:47 1994 Received: by cheltenham.cs.arizona.edu; Fri, 18 Feb 1994 10:18:05 MST Via: uk.ac.edinburgh.festival; Fri, 18 Feb 1994 09:03:53 +0000 Date: 18 Feb 94 09:03:47 GMT From: R J Hare Subject: Icon help prgram ihelp To: icon-group@cs.arizona.edu Organisation: Edinburgh University Computing Service Message-Id: <9402180903.aa06614@uk.ac.ed.festival> Status: RO Errors-To: icon-group-errors@cs.arizona.edu Further to the recent post about this program. This program is one of the well-hidden highlights of the IPL. I find it very useful when I am separated from my Icon dcumentation (which happens increasingly often these days). The version of the data file I have is for Icon version 8.7. Does anyone perhaps have an up to date version of the file (ie: for Version 8.10) which includes help information on the X-Icon graphics functions? This would be extremely useful. Roger Hare. From icon-group-sender Fri Feb 18 13:23:40 1994 Received: by cheltenham.cs.arizona.edu; Fri, 18 Feb 1994 15:01:21 MST Date: Fri, 18 Feb 1994 13:23:40 -0600 (CST) From: Ronan_Collis Subject: Re: Idea\Wish Lists To: Ronan_Collis Cc: icon-group@cs.arizona.edu, icon-group-request@cs.arizona.edu, Ronan_Collis@mbnet.mb.ca In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Status: R Errors-To: icon-group-errors@cs.arizona.edu On Fri, 18 Feb 1994, Ronan_Collis wrote: > Please advise if anyone is using Icon, or has used Icon to construct an > intelligent data base for lexical/terminological data for > computer-assisted translation. Two aspects of this would be text scanning > for contexts of usage and switchable fixed phrase substitution. There is > much need of this for less-used languages in developing areas and > countries but nobody wants to reinvent the wheel.DRC > > From icon-group-sender Fri Feb 18 20:35:39 1994 Received: by cheltenham.cs.arizona.edu; Sun, 20 Feb 1994 19:15:38 MST Date: Fri, 18 Feb 1994 20:35:39 -0600 (CST) From: Ronan_Collis Subject: To: icon-group@cs.arizona.edu Cc: Ronan_Collis@mbnet.mb.ca Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Status: R Errors-To: icon-group-errors@cs.arizona.edu Would like to contact others in the group, if there are any, who have used icon to program a lexical/terminological database to assist translaters. RC From icon-group-sender Sun Feb 20 18:29:49 1994 Received: by cheltenham.cs.arizona.edu; Sun, 20 Feb 1994 19:27:52 MST From: pab (Peter A. Bigot) Message-Id: <9402210129.AA26505@omnia.cs.arizona.edu> Subject: generating both [lr]values of records To: icon-group Date: Sun, 20 Feb 1994 18:29:49 -0700 (MST) X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1807 Status: RO Errors-To: icon-group-errors@cs.arizona.edu I have a large number of different records (representing syntactic terms, if it matters), which form trees, and I want to replace subtrees with a value which is based on the current subtree (in effect, implement variable substitution: t [expr/X]). I don't care about the old value of the records, so an update-in-place would be nice. I also don't want to enumerate the different types of records, and handle them with separate cases. So, using the ! generator on the record, and the neat trick that it generates lvalues, looks like the way to go. I.e., "every !rec := expr". But: how can I use the generated element (of !rec) as part of the rhs of the assignment? It seems to me I've seen this before, but can't recall the necessary incantation. Here are a few attempts, one of which works---but I'd like a better way. record A (a1, a2, a3) # some arbitrary record procedure main () ar := A (1, 2, 3) # Attempt one: naively assume we can preserve the lvalue every (t := !ar) do t := (.t+1) writes (image (ar), " -- ") every writes (! ar, " ") write () # Attempt two: maybe we can fool it every (t := !ar) := (t+1) writes (image (ar), " -- ") every writes (! ar, " ") write () # Brute force: this works, but it's gotta be inefficient in both # time and space nr := list() every put (nr, !ar + 1) ar := type(ar) ! nr # -10 points for using arcane features.... writes (image (ar), " -- ") every writes (! ar, " ") write () # What I'd like: # every !ar := (¤tgenelt)+1 # but for some reason that doesn't work.... end # main Is there a better way? -- Peter A. Bigot -- pab@CS.Arizona.EDU Dept. of Computer Science, University of Arizona, Tucson AZ From icon-group-sender Mon Feb 21 00:30:21 1994 Received: by cheltenham.cs.arizona.edu; Mon, 21 Feb 1994 09:17:08 MST Return-Path: Date: Mon, 21 Feb 94 00:30:21 CST From: jeffery@ringer.cs.utsa.edu (Clinton L. Jeffery) Message-Id: <9402210630.AA27481@ringer.cs.utsa.edu.sunset> To: pab@cs.arizona.edu Cc: icon-group@cs.arizona.edu In-Reply-To: Peter A. Bigot's message of Sun, 20 Feb 1994 18:29:49 -0700 (MST) <9402210129.AA26505@omnia.cs.arizona.edu> Subject: generating both [lr]values of records Status: R Errors-To: icon-group-errors@cs.arizona.edu Peter Bigot writes about record lvalues: # What I'd like: # every !ar := (¤tgenelt)+1 # but for some reason that doesn't work.... Peter, !r does generate assignable references to record r's fields, but its easy to inadvertently get yourself in trouble in the surrounding expression (the usual mistake is to try to assign each field different results from a generator; you need a co-expression for parallel evaluation of generators). Anyhow, check out the following program, which assigns new values to a record's fields (it writes out 1, 2, 3, and 4 on separate lines). record r(a,b,c,d) procedure main() r1 := r() every !r1 := foobar() every write(!r1) end procedure foobar() static i initial i := 0 return i +:= 1 end Clint Jeffery cjeffery@cs.arizona.edu, jeffery@ringer.cs.utsa.edu The University of Texas at San Antonio From icon-group-sender Mon Feb 21 06:28:54 1994 From: icon-group-sender Message-Id: <199402211618.AA08254@cheltenham.cs.arizona.edu> Received: by cheltenham.cs.arizona.edu; Mon, 21 Feb 1994 09:18:41 MST Subject: Re: generating both [lr]values of records To: jeffery@ringer.cs.utsa.edu (Clinton L. Jeffery) Date: Mon, 21 Feb 1994 06:28:54 -0700 (MST) Cc: icon-group In-Reply-To: <9402210630.AA27481@ringer.cs.utsa.edu.sunset> from "Clinton L. Jeffery" at Feb 21, 94 00:30:21 am X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Status: R Errors-To: icon-group-errors@cs.arizona.edu > Peter Bigot writes about record lvalues: > # What I'd like: > # every !ar := (¤tgenelt)+1 > # but for some reason that doesn't work.... > > Peter, !r does generate assignable references to record r's fields, but its > easy to inadvertently get yourself in trouble in the surrounding expression > (the usual mistake is to try to assign each field different results from a > generator; you need a co-expression for parallel evaluation of generators). Hmn; yeah, I suppose I could do: lval := create !ar rval := create !ar while (@lval := @rval+1) That does what I want. Or even: rval := create !ar every !ar := (@rval+1) Which is getting back to the succinctness and incomprehensibility I like to have in my Icon programs. Isn't that going to be pretty expensive in time/space too, though? How does it compare to constructing a list of new fields and using string evaluation on the record constructor? I suppose I could do timing tests, but I'd rather appeal to intuition (even if it isn't mine). This is an extremely small but potentially high-frequency part of what's looking to be an ugly program that will probably be _very_ slow; but it's a research tool, what do you want? ;-) > Anyhow, check out the following program, which assigns new values to a > record's fields (it writes out 1, 2, 3, and 4 on separate lines). Thanks; unfortunately, that doesn't seem to show how you can use the current value of the field being assigned to construct the new value. In the actual context, I can't reconstruct the current value from base principles. It'd be "cool"(tm) if one could use a keyword or some other feature to get multiple references to the currently-generated element within an expression, although this probably has semantic overtones I'd rather not think about at this hour of the morning. Peter -- Peter A. Bigot -- pab@CS.Arizona.EDU Dept. of Computer Science, University of Arizona, Tucson AZ From icon-group-sender Mon Feb 21 10:33:34 1994 Received: by cheltenham.cs.arizona.edu; Mon, 21 Feb 1994 10:03:56 MST Date: Mon, 21 Feb 94 10:33:34 CST From: jeffery@ringer.cs.utsa.edu (Clinton L. Jeffery) Message-Id: <9402211633.AA08487@ringer.cs.utsa.edu.sunset> To: pab@cs.arizona.edu Cc: icon-group@cs.arizona.edu In-Reply-To: Peter A. Bigot's message of Mon, 21 Feb 1994 06:28:55 -0700 (MST) <9402211328.AA27411@omnia.cs.arizona.edu> Subject: generating both [lr]values of records Content-Length: 448 Status: R Errors-To: icon-group-errors@cs.arizona.edu Co-expressions use up a fair amount of space, but they are pretty fast. I agree they are more than is needed here. I am still not sure why you aren't saying every !ar +:= 1 # if all you really need is an augmented assignment or every i := 1 to *ar do ar[i] := arbitrary_computation(ar[i]) Cool, huh? Icon records are really quite handy. Clint Jeffery cjeffery@cs.arizona.edu, jeffery@ringer.cs.utsa.edu The University of Texas at San Antonio From icon-group-sender Tue Feb 22 17:43:32 1994 Received: by cheltenham.cs.arizona.edu; Tue, 22 Feb 1994 13:45:06 MST Date: 22 Feb 94 17:43:32 GMT From: dog.ee.lbl.gov!ihnp4.ucsd.edu!library.ucla.edu!csulb.edu!nic-nac.CSU.net!news.Cerritos.edu!news.Arizona.EDU!math.arizona.edu!CS.Arizona.EDU!not-for-mail@ucbvax.Berkeley.EDU (Gregg Townsend) Organization: University of Arizona CS Department, Tucson AZ Subject: Re: interaction of deletion with enumeration (again) Message-Id: <2kdg84$ab4@owl.CS.Arizona.EDU> References: Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu Tables are like sets: it is safe to insert and delete items while the table is being generated. I don't know anywhere that this is explicitly mentioned. The possible combinations of legal operations are not generally enumerated, but it is reasonable for you to question whether this tricky case was considered during implementation. It was. Gregg Townsend / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721 +1 602 621 4325 gmt@cs.arizona.edu 110 57 16 W / 32 13 45 N / +758m From icon-group-sender Tue Feb 22 17:10:57 1994 Received: by cheltenham.cs.arizona.edu; Tue, 22 Feb 1994 19:41:29 MST Date: Tue, 22 Feb 1994 17:10:57 -0600 (CST) From: Chris Tenaglia - 257-8765 Subject: KEYNAMES To: icon-group@cs.arizona.edu Message-Id: <01H96Z4EC8IA8WW866@mis.mcw.edu> Organization: Medical College of Wisconsin (Milwaukee, WI) X-Vms-To: IN%"icon-group@cs.arizona.edu" Mime-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Status: R Errors-To: icon-group-errors@cs.arizona.edu For Chinese NewYear I posted a routine that returned plain names for keys pressed. That code was specific to MS-DOS. And since the PCs I have access to for Icon programming are 8088s with 512K and small keyboards there was probably more room for improvement. My primary OS is VAX/VMS where icon also flourishes. I wrote a version for that OS. Therefore it is geared toward DEC compatible terminals rather than PCs. It probably should work with unix. However, the unix system I have access to runs DEC Ultrix, and Icon getch() doesn't work properly there. Typewriter keys return their values. But terminal keyboards often have fancy keys like F-keys, PF-keys, and keypads. These fancy keys return an escape sequence. This routine converts the sequence into a name. So instead of getting \e[A for uparrow, you'd get UPARROW, which makes following a program much easier. The routine is included below. Enjoy. Chris Tenaglia (System Manager) | "The past explained, Medical College of Wisconsin | the future fortold, 8701 W. Watertown Plank Rd. | the present largely appologized for." Milwaukee, WI 53226 | Organon to The Doctor (414)257-8765 | tenaglia@mis.mcw.edu # # FILE : KEYVMS.ICN # DESC : RETURN THE NAME OF A KEY PRESSED RATHER THAN THE ESCAPE SEQUENCE # # UPDATE BY WHAT # 22-FEB-1994 TENAGLIA INITIAL WRITE # procedure main() repeat { button := getch() if button == "\e" then { if kbhit() then { button ||:= getch() if button == "\eO" then button ||:= getch() if button == "\e[" then repeat { tmp := getch() button ||:= tmp if any('ABCD~',tmp) then break } } } pressed := keyname(button) if pressed == "ANY" then pressed := image(button) write(pressed," was pressed!") if button == "#" then break } end # # map unusual keys to a string # procedure keyname(str) static keys initial { keys := table("ANY") keys["\e[A"] := "UPARROW" keys["\e[B"] := "DOWNARROW" keys["\e[C"] := "RIGHTARROW" keys["\e[D"] := "LEFTARROW" keys["\e[1~"] := "FIND" keys["\e[2~"] := "INSERT" keys["\e[3~"] := "REMOVE" keys["\e[4~"] := "SELECT" keys["\e[5~"] := "PREV" keys["\e[6~"] := "NEXT" keys["\eOP"] := "PF1" keys["\eOQ"] := "PF2" keys["\eOR"] := "PF3" keys["\eOS"] := "PF4" keys["\e[17~"]:= "F6" keys["\e[18~"]:= "F7" keys["\e[19~"]:= "F8" keys["\e[20~"]:= "F9" keys["\e[21~"]:= "F10" keys["\e[23~"]:= "F11" keys["\e[24~"]:= "F12" keys["\e[25~"]:= "F13" keys["\e[26~"]:= "F14" keys["\e[28~"]:= "HELP" keys["\e[29~"]:= "DO" keys["\e[31~"]:= "F17" keys["\e[32~"]:= "F18" keys["\e[33~"]:= "F19" keys["\e[34~"]:= "F20" keys["\eOw"] := "KP7" keys["\eOx"] := "KP8" keys["\eOy"] := "KP9" keys["\eOm"] := "KP-" keys["\eOt"] := "KP4" keys["\eOu"] := "KP5" keys["\eOv"] := "KP6" keys["\eOl"] := "KP," keys["\eOq"] := "KP1" keys["\eOr"] := "KP2" keys["\eOs"] := "KP3" keys["\eOM"] := "KPENTER" keys["\eOp"] := "KP0" keys["\eOn"] := "KP." keys["\e"] := "ESCAPE" keys["\001"] := "CTRL_A" keys["\002"] := "CTRL_B" keys["\003"] := "CTRL_C" keys["\004"] := "CTRL_D" keys["\005"] := "CTRL_E" keys["\006"] := "CTRL_F" keys["\007"] := "BELL" keys["\010"] := "BACKSPACE" keys["\011"] := "TAB" keys["\012"] := "LINEFEED" keys["\013"] := "CTRL_K" keys["\014"] := "FORMFEED" keys["\015"] := "RETURN" keys["\016"] := "CTRL_N" keys["\017"] := "CTRL_O" keys["\020"] := "CTRL_P" keys["\021"] := "CTRL_Q" keys["\022"] := "CTRL_R" keys["\023"] := "CTRL_S" keys["\024"] := "CTRL_T" keys["\025"] := "CTRL_U" keys["\026"] := "CTRL_V" keys["\027"] := "CTRL_W" keys["\030"] := "CTRL_X" keys["\031"] := "CTRL_Y" keys["\032"] := "CTRL_Z" } return keys[str] end From icon-group-sender Wed Feb 23 15:24:52 1994 Received: by cheltenham.cs.arizona.edu; Wed, 23 Feb 1994 15:09:16 MST Date: Wed, 23 Feb 1994 15:24:52 -0600 (CST) From: Ronan_Collis Subject: Re: KEYNAMES To: Chris Tenaglia - 257-8765 Cc: icon-group@cs.arizona.edu, Ronan_Collis@mbnet.mb.ca In-Reply-To: <01H96Z4EC8IA8WW866@mis.mcw.edu> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Status: R Errors-To: icon-group-errors@cs.arizona.edu Can anyone in the group supply me with information concerning applications? Has icon been used in connection with computer-assisted terminology, computer-assisted translation, strict-dependency (or case) grammar or semantics oriented language engineering? DRFC From icon-group-sender Mon Feb 7 19:16:51 1994 Received: by cheltenham.cs.arizona.edu; Wed, 23 Feb 1994 22:00:36 MST Date: 7 Feb 94 19:16:51 GMT From: cis.ohio-state.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!pipex!uknet!festival!eddie@ucbvax.Berkeley.EDU (Eddie Corns) Organization: Edinburgh University Subject: Cheating in WIT?? Message-Id: Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu Another quick question re: WIT. Is it considered bad form to directly access the .data field of a text vidget? Is there another way of collecting all the text inputs from a page full of text boxes without forcing the user to hit return for every box that they edit? A less simple question while I'm here. Is anyone going to implement multi-line text input vidgets? Eddie From icon-group-sender Fri Feb 25 08:49:50 1994 Received: by cheltenham.cs.arizona.edu; Fri, 25 Feb 1994 08:39:05 MST Date: Fri, 25 Feb 1994 08:49:50 -0600 (CST) From: Chris Tenaglia - 257-8765 Subject: kbhit(), getch(), read() To: icon-group@cs.arizona.edu Cc: icon-project@cs.arizona.edu Message-Id: <01H9AODUV2SI8WWBLD@mis.mcw.edu> Organization: Medical College of Wisconsin (Milwaukee, WI) X-Vms-To: IN%"icon-group@cs.arizona.edu" X-Vms-Cc: IN%"icon-project@cs.arizona.edu" Mime-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Status: R Errors-To: icon-group-errors@cs.arizona.edu I wrote a nifty program in DOS Icon V8.10. It used kbhit(), getch(), and read() in certain ways. This was to make an intuitive user interface. Now for work I use Icon V8.10 on VAX/VMS 5.5. I hoped that the only differences would be the fancy key strings and drawing characters. However, the kbhit(), getch(), and read() work differently and the same program user interface doesn't work well. Is it spelled out anywhere what these behaviour differences are? I'd like to port to unix too, except that getch() under ultrix doesn't work right either. Under VMS if I don't use kbhit() and getch() and instead do all character input using read() all behaves as expected. Once I start using them, it seems that some characters overflow. So when I hit a read() from &stdin the first character disappears as if a getch() somewhere else intercepted it. Then when I terminate the read() by pressing , the character gets intercepted by a kbhit()/getch() somewhere else, and this causes strange behavior in a user interface. Is there a way to flush the buffers at certain points and start fresh when needed? Has anyone else encountered these alternate behaviours? The best I could do for now is to emulate read() with a getch() loop, but it too seems to pick up \r at random intervals. Does it matter that I'm using ansi escape sequences to turn the cursor off and on where appropriate? Chris. From icon-group-sender Sun Feb 27 14:29:48 1994 Received: by cheltenham.cs.arizona.edu; Sun, 27 Feb 1994 12:06:50 MST Date: 27 Feb 94 14:29:48 GMT From: agate!usenet.ins.cwru.edu!nigel.msen.com!caen!malgudi.oar.net!wariat.org!kf8nh!bsa@ucbvax.Berkeley.EDU (Brandon S. Allbery) Organization: Brandon's Linux box and AmPR node, Mentor, OH Subject: Re: file dates Message-Id: <1994Feb27.142948.431@kf8nh.wariat.org> References: <1994Feb23.121210.9747@hemlock.cray.com>, <5a-oml5.mengarini@delphi.com> Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu In article <5a-oml5.mengarini@delphi.com>, Will Mengarini says: +--------------- | Can anybody name an Icon implementation for a system where | files are created & stored in a way that doesn't keep track | of both creation date & time, & last-change date & time? +------------->8 Unix doesn't keep *creation* time, it keeps *last inode change* time. This catches changes made by e.g. chmod(), as opposed to writes. ++Brandon -- Brandon S. Allbery kf8nh@kf8nh.ampr.org bsa@kf8nh.wariat.org "MSDOS didn't get as bad as it is overnight -- it took over ten years of careful development." ---dmeggins@aix1.uottawa.ca From icon-group-sender Sun Feb 27 05:51:21 1994 Received: by cheltenham.cs.arizona.edu; Wed, 2 Mar 1994 10:46:14 MST Date: 27 Feb 94 05:51:21 GMT From: agate!howland.reston.ans.net!noc.near.net!news.delphi.com!usenet@ucbvax.Berkeley.EDU (Will Mengarini) Organization: Delphi (info@delphi.com email, 800-695-4005 voice) Subject: Re: file dates Message-Id: <5a-oml5.mengarini@delphi.com> References: <1994Feb23.121210.9747@hemlock.cray.com> Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu I've been doing MS-DOS-specific utilities for this kind of thing, but I think this is a very good point that it'd be useful for the language to define keywords or functions for things that can reasonably be expected to be present on most or all implementations. Can anybody name an Icon implementation for a system where files are created & stored in a way that doesn't keep track of both creation date & time, & last-change date & time? It would make sense for this to be a library capability rather than a language capability, but then the icode on a particular system should contain only the code for handling that system, which wouldn't be the case if the system were identified using a conditional expression based on &features. I use IPP (an Icon preprocessor from BIPL) in all my programs, but I'd expect most Unix people to use M4, which is incompatible. Does anybody else have any relevant thoughts on preprocessing? From icon-group-sender Sun Feb 27 07:39:22 1994 Received: by cheltenham.cs.arizona.edu; Wed, 2 Mar 1994 10:48:22 MST Date: 27 Feb 94 07:39:22 GMT From: agate!library.ucla.edu!csulb.edu!nic-nac.CSU.net!news.Cerritos.edu!news.Arizona.EDU!math.arizona.edu!CS.Arizona.EDU!not-for-mail@ucbvax.Berkeley.EDU (Nevin Liber) Organization: University of Arizona CS Department, Tucson AZ Subject: Re: file dates Message-Id: <2kpina$fn5@caslon.CS.Arizona.EDU> References: <1994Feb23.121210.9747@hemlock.cray.com>, <5a-oml5.mengarini@delphi.com> Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu In article <5a-oml5.mengarini@delphi.com>, Will Mengarini wrote: >but I think this is a very good point that it'd be useful >for the language to define keywords or functions for things >that can reasonably be expected to be present on most or all >implementations. You have to way that against increasing the size of the language (bloating or creeping featurism). If there is a way to do it without adding a language feature (which you have already stated is possible under MS-DOS, and I can think of ways to do it under Unix), then I'd lean against adding it as a feature. >Can anybody name an Icon implementation for a system where >files are created & stored in a way that doesn't keep track >of both creation date & time, & last-change date & time? That's still not enough to make it useful. At a minimum, you would like to be able to compare dates (eg: is date1 later than date2). You'd probably wish to know the amount of time between two dates, and a way to compare it to the current date. This would be highly machine dependent (does the machine keep track of timestamps to the nearest microsecond or to the nearest minute). You'd probably want a standard textual representation to make it easy to create new dates to compare against. But if you used something like &dateline as the standard representation, should you provide functions to fix the redundant fields (the day of the week can be calculated from the month day year combination, making it redundant)? Would you add functions to add or subtract time to a given date? Etc., etc. -- Nevin ":-)" Liber nevin@cs.arizona.edu (602) 293-2799 +++ (520) after 3/95 office: (602) 621-1685 From icon-group-sender Wed Mar 2 16:47:28 1994 Received: by cheltenham.cs.arizona.edu; Wed, 2 Mar 1994 16:34:16 MST Date: 2 Mar 94 16:47:28 GMT From: ucivax!gateway@ucbvax.Berkeley.EDU ("T. Owen O'Malley") Subject: Icon FAQ as Wide World Web document Message-Id: <3747.762626831@porte-de-st-ouen.ics.uci.edu> Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu I just wanted to announce that I did a simple conversion of the Icon FAQ into html. It is available at: "http://www.ics.uci.edu/~omalley/icon.hmtl". I converted the FAQ so that I could have a handy reference for the documentation for one of my tools that is written in Icon. If there is a "real" Icon WWW document, please give me a pointer to it. Thanks, Owen O'Malley ... From: omalley@porte-de-st-ouen.ICS.UCI.EDU ("T. Owen O'Malley") [1] Correction to WWW document for Icon FAQ That should be icon.html. Owen From icon-group-sender Thu Mar 3 10:15:32 1994 Received: by cheltenham.cs.arizona.edu; Thu, 3 Mar 1994 12:35:39 MST Message-Id: Date: 3 Mar 1994 10:15:32 -0500 From: "Paul Scherf" Subject: RE: file dates To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu I think this sounds like a great chance for defining a library interface (collection of functions), that could be supported by many of the environments in which ICON is used. My opinion is that new language keywords are a bit much. I guess that makes me against adding keywords. C (i.e. past history (-: ) effectively defines two collections of functions for dealing with time. One collection deals with calendar dates and times of day (e.g. "What was the time and date of lunch one week from now?"). The other collection deals with stopwatch time (for scientific timing of events). Leap seconds and leap days (these are decided by astronomers and relative positions of celestial bodies) and calendars that vary with time (different number of months in different years, these appear to be decided by politicians and religous leaders), make these two kinds of time difficult to integrate. Since ICON is often implemented in C, maybe an ICON interface to the C libraries would be useful or even appropriate. _______________________________________________________________________________ In article <5a-oml5.mengarini@delphi.com>, Will Mengarini wrote: >but I think this is a very good point that it'd be useful >for the language to define keywords or functions for things >that can reasonably be expected to be present on most or all >implementations. You have to way that against increasing the size of the language (bloating or creeping featurism). If there is a way to do it without adding a language feature (which you have already stated is possible under MS-DOS, and I can think of ways to do it under Unix), then I'd lean against adding it as a feature. >Can anybody name an Icon implementation for a system where >files are created & stored in a way that doesn't keep track >of both creation date & time, & last-change date & time? That's still not enough to make it useful. At a minimum, you would like to be able to compare dates (eg: is date1 later than date2). You'd probably wish to know the amount of time between two dates, and a way to compare it to the current date. This would be highly machine dependent (does the machine keep track of timestamps to the nearest microsecond or to the nearest minute). You'd probably want a standard textual representation to make it easy to create new dates to compare against. But if you used something like &dateline as the standard representation, should you provide functions to fix the redundant fields (the day of the week can be calculated from the month day year combination, making it redundant)? Would you add functions to add or subtract time to a given date? Etc., etc. From icon-group-sender Sun Feb 20 14:17:08 1994 Received: by cheltenham.cs.arizona.edu; Sun, 6 Mar 1994 20:01:26 MST Date: 20 Feb 94 14:17:08 GMT From: cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!noc.near.net!news.delphi.com!usenet@ucbvax.Berkeley.EDU (Will Mengarini) Organization: Delphi (info@delphi.com email, 800-695-4005 voice) Subject: Re: ftp site for Icon. Message-Id: References: Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu A Z E E M writes: >Is there an ftp site where Icon can be obtained from? cs.arizona.edu There's also a FAQ; I don't know whether it's FTPable from cs.arizona.edu, but I think it should be. Also, somebody who knows their way around rtfm.mit.edu (the standard site for FTPing FAQs) might tell us whether the Icon FAQ is there yet (it's new), & (25 words or less) how to get it. From icon-group-sender Mon Mar 7 09:21:35 1994 Received: by cheltenham.cs.arizona.edu; Mon, 7 Mar 1994 12:26:57 MST Date: Mon, 7 Mar 1994 09:21:35 MST From: "Cliff Hathaway" Message-Id: <199403071621.AA03874@cheltenham.cs.arizona.edu> To: cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!noc.near.net!news.delphi.com!usenet@ucbvax.Berkeley.EDU, icon-group@cs.arizona.edu Subject: Re: ftp site for Icon. Status: R Errors-To: icon-group-errors@cs.arizona.edu > From icon-group-sender Sun Mar 6 20:01:53 1994 > Subject: Re: ftp site for Icon. > To: icon-group@cs.arizona.edu Will Mengarini writes: > There's also a FAQ; I don't know whether it's FTPable from > cs.arizona.edu, but I think it should be. Yes. It's faq.txt, in /icon/doc. Last updated March 4, 1994. > > Also, somebody who knows their way around rtfm.mit.edu > (the standard site for FTPing FAQs) might tell us whether the > Icon FAQ is there yet (it's new), & (25 words or less) > how to get it. on rtfm.mit.edu, cd to /pub/usenet/comp.lang.icon. get Icon_Programming_Language_FAQ. cliff From icon-group-sender Tue Mar 8 14:50:20 1994 Received: by cheltenham.cs.arizona.edu; Tue, 8 Mar 1994 15:07:44 MST Date: Tue, 8 Mar 1994 14:50:20 -0600 (CST) From: Ronan_Collis Subject: TOM The language profile program To: icon-group@cs.arizona.edu Cc: Ronan_Collis@mbnet.mb.ca Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Status: R Errors-To: icon-group-errors@cs.arizona.edu If any group member has heard of TOM or any program like it please link me. TOM was written about 20 years ago for IBM 360-75 mainframes. It was an artificial intelligence interface between the user and the computer such that the user could in whatever his language was, define what was a sentence and what were words and what each word meant. It produced a spin-off which was a profile of the syntax and the dictionary for the user's idiolect (or personal dialect). A couple of years ago there was an article that a similar program had been made for vax or pc or spark. It is or was used in discourse or text linguistics or for any lesser used language in which it is necessary to investigate the lexical morphology. RC From icon-group-sender Wed Mar 9 09:28:35 1994 Received: by cheltenham.cs.arizona.edu; Wed, 9 Mar 1994 09:06:06 MST Date: Wed, 09 Mar 1994 09:28:35 -0600 (CST) From: Chris Tenaglia - 257-8765 Subject: Re: TOM To: icon-group@cs.arizona.edu Message-Id: <01H9RH7R4NXE8WWU3G@mis.mcw.edu> Organization: Medical College of Wisconsin (Milwaukee, WI) X-Vms-To: IN%"icon-group@cs.arizona.edu" Mime-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Status: R Errors-To: icon-group-errors@cs.arizona.edu About 10 years ago a company I worked for built IBM 360/20 compatible workstations (believe it or not). I wrote a lot of manufacturing software in BAL360 assembler back then. It didn't really have an operating system, but rather a program loader. I started some work on an operating system I called PLOS (Plan Language Operating System). I read an Apple Whitepaper back then about the programmers goal shouldn't necessarily be to reduce keystrokes, but rather 'brainstrokes'. For example the backup command was SAVE and it worked like : DOS> SAVE ALL SECTORS TO TAPE1 * FULL BACKUP DOS> SAVE SOME SECTORS TO TAPE1 * INCREMENTAL BACKUP DOS> SAVE ALL SECTORS FROM TAPE1 * FULL RESTORE The system could recognize up to six tape drives, but only one floppy (8") and only one hard disk. The parser in SAVE would look for ALL or SOME and determine the meaning. Then SECTORS (for 512 byte blocks) or TRACKS (for 17408 byte blocks) Then FROM or TO for restore or backup Then the TAPEn drive number. My DOS was still basically a program loader but the original would only accept 4 bytes of command (LOAD, RUN, DEL) and then prompt for the program name which was 4 or 6 bytes. My loader permitted commands over 80 bytes and programs could access those commands to parse them. Gee, what a concept! ;-) Chris Tenaglia (System Manager) | "The past explained, Medical College of Wisconsin | the future fortold, 8701 W. Watertown Plank Rd. | the present largely appologized for." Milwaukee, WI 53226 | Organon to The Doctor (414)257-8765 | tenaglia@mis.mcw.edu > From: IN%"Ronan_Collis@mbnet.mb.ca" "Ronan_Collis" 8-MAR-1994 16:16:44.75 > To: IN%"icon-group@cs.arizona.edu" > CC: IN%"Ronan_Collis@mbnet.mb.ca" > Subj: TOM The language profile program > If any group member has heard of TOM or any program like it please > link me. TOM was written about 20 years ago for IBM 360-75 mainframes. It > was an artificial intelligence interface between the user and the > computer such that the user could in whatever his language was, > define what was a sentence and what were words and what each word > meant. It produced a spin-off which was a profile of the syntax and > the dictionary for the user's idiolect (or personal dialect). A > couple of years ago there was an article that a similar program had > been made for vax or pc or spark. It is or was used in discourse or > text linguistics or for any lesser used language in which it is > necessary to investigate the lexical morphology. RC From icon-group-sender Sat Mar 12 10:17:29 1994 Received: by cheltenham.cs.arizona.edu; Sat, 12 Mar 1994 20:52:37 MST Date: 12 Mar 94 10:17:29 GMT From: nntp.crl.com!crl2.crl.com!not-for-mail@decwrl.dec.com (Bill Hogan) Organization: Planet Earth Subject: Re: make Configure i386_linux error. Message-Id: <2ls4rp$k3p@crl2.crl.com> References: <2lk1jo$vb@crl.crl.com> Sender: icon-group-request@cs.arizona.edu To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu In case anyone is interested in running Icon under Linux, the problem was easy to fix. Here is the diff between the fixed version of icon/config/unix/Config/Makefile and the original: 62c62 < ed -s ../../../bin/icon_vt <../Config/dequote.ed --- > ed - ../../../bin/icon_vt <../Config/dequote.ed After that, smooth as silk. Thanks to all who replied! BH -- Bill Hogan {bhogan@crl.com} From icon-group-sender Tue Mar 15 14:55:25 1994 Received: by cheltenham.CS.Arizona.EDU; Tue, 15 Mar 1994 10:51:12 MST Via: uk.ac.edinburgh.festival; Tue, 15 Mar 1994 14:55:36 +0000 Date: 15 Mar 94 14:55:25 GMT From: R J Hare Subject: Diary Utility To: icon-group@cs.arizona.edu Organisation: Edinburgh University Computing Service Message-Id: <9403151455.aa29609@uk.ac.ed.festival> Status: R Errors-To: icon-group-errors@cs.arizona.edu We are looking for an X utility which will allow a departmental diary to be held centrally into which people will enter holiday, seminar and course dates etc. Has anyone written such a thing with X-Icon yet, that they would be willing to share? Thanks. Roger Hare. From icon-group-sender Sun Apr 3 02:40:34 1994 Received: by cheltenham.cs.arizona.edu; Mon, 4 Apr 1994 09:33:23 MST Path: ucbvax!agate!ihnp4.ucsd.edu!usc!elroy.jpl.nasa.gov!ncar!uchinews!iitmax!thssjlb From: thssjlb@iitmax.acc.iit.edu (Anonymous Man) Newsgroups: comp.lang.icon Subject: Help with tw-dimensional table... Message-Id: <1994Apr3.024034.14883@iitmax.iit.edu> Date: 3 Apr 94 02:40:34 GMT Organization: Illinois Institute of Technology, Chicago Lines: 11 Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu Hello, I'm having trouble creating a two-dimensional array for parser program I am writing. How do I create one? or is there another way that is better. Thank you for your time. -- ------------------------------------------------------------------------------ | John L Buntic | "Health nuts are going to feel stupid one day,| | thssjlb@iitmax.acc.iit.edu | lying in hospital beds dying of nothing." | | If it feels good, do it! | -Redd Foxx| ------------------------------------------------------------------------------ From icon-group-sender Mon Apr 4 13:03:45 1994 Received: by cheltenham.cs.arizona.edu; Mon, 4 Apr 1994 15:28:34 MST Date: Mon, 04 Apr 1994 13:03:45 -0600 (CST) From: Chris Tenaglia - 257-8765 Subject: 2d arrays in icon To: icon-group@cs.arizona.edu Message-Id: <01HAS0FEAPNM8WWQ0I@mis.mcw.edu> Organization: Medical College of Wisconsin (Milwaukee, WI) X-Vms-To: IN%"icon-group@cs.arizona.edu" Mime-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Status: R Errors-To: icon-group-errors@cs.arizona.edu I have done it by constructing a key using the axes and a delimiter. xy := table(0) seed := 64 every i := 1 to 10 do every j := 1 to 10 do xy[i||","||j] := mandel(i,j,seed) write(xy["5,5"]) I think the delimited key is the most natural as long as you can be sure the key representation is reliable and consistent. Leading zeroes or decimal points would cause mischief. The delimited index will also work in a string parsing array. Uniqueness is still the important factor. Case and spaces are the pitfalls in this regard. Good luck. Chris Tenaglia (System Manager) | "The past explained, Medical College of Wisconsin | the future fortold, 8701 W. Watertown Plank Rd. | the present largely appologized for." Milwaukee, WI 53226 | Organon to The Doctor (414)257-8765 | tenaglia@mis.mcw.edu > From: IN%"thssjlb@iitmax.acc.iit.edu" 4-APR-1994 11:42:43.57 > To: IN%"tenaglia@MIS.MCW.EDU" > Subj: Help with tw-dimensional table... > Hello, I'm having trouble creating a two-dimensional array for parser > program I am writing. How do I create one? or is there another way > that is better. Thank you for your time. > ------------------------------------------------------------------------------ > | John L Buntic | "Health nuts are going to feel stupid one day,| > | thssjlb@iitmax.acc.iit.edu | lying in hospital beds dying of nothing." | > | If it feels good, do it! | -Redd Foxx| > ------------------------------------------------------------------------------ From icon-group-sender Tue Apr 5 07:32:34 1994 Received: by cheltenham.cs.arizona.edu; Tue, 5 Apr 1994 09:01:18 MST Via: uk.ac.edinburgh.festival; Tue, 5 Apr 1994 15:31:10 +0100 Date: 05 Apr 94 15:30:59 BST From: R J Hare Subject: 2-darrays To: icon-group@cs.arizona.edu Organisation: Edinburgh University Computing Service Message-Id: <9404051531.aa04767@uk.ac.ed.festival> Status: R Errors-To: icon-group-errors@cs.arizona.edu The method on p52 of the the 1st edition of the Icon book (all I have to hand at the moment) uses lists of lists: procedure array(i,j,x) a:=list(i,0) k:=0 while a[k +:= 1] := list(j,x) return a end I think I'd do it like this (in fact I have done and it seems to work) - to me this is easier to read than the first version: procedure array(i,j,x) a:=list(i) every !a=list(j,x) return a end So: shogiboard:=array(9,9," ") would return an empty 9x9 board. You refer to eleents of the array as a[i][j] - later versions of Icon allow a[i,j]. Roger Hare. From icon-group-sender Tue Apr 5 08:26:42 1994 Received: by cheltenham.cs.arizona.edu; Tue, 5 Apr 1994 09:01:47 MST Date: Tue, 5 Apr 1994 08:26:42 +0700 From: swampler@noao.edu Message-Id: <9404051526.AA04963@orpheus.tuc.noao.edu> Subject: Re: 2d arrays in Icon To: icon-group@cs.arizona.edu Content-Length: 690 Status: R Errors-To: icon-group-errors@cs.arizona.edu In addition to Chris' approach using a table (which is also *very* nice for sparse arrays), it's pretty easy to write a 2d array 'constructor' function: procedure array2d(num_rows, num_cols) local a a := list(num_rows) every !a := list(num_cols) return a end You can then reference the result, as in: board := array2d(8, 8) board[1][1] := "Q" One nice thing about 2d-arrays in Icon is that they are, indeed, dynamic (since they are just constructed from lists) - it's not hard to write functions to grow/shrink them, insert/remove columns/rows, etc. (columns are harder than rows...) -- Steve Wampler swampler@noao.edu Gemini Project (under AURA) From icon-group-sender Mon Mar 28 20:01:41 1994 Received: by cheltenham.cs.arizona.edu; Thu, 7 Apr 1994 18:35:13 MST Path: ucbvax!agate!ames!pacbell.com!att-out!walter!news From: dnew@thumper.bellcore.com (Darren New) Newsgroups: comp.lang.icon Subject: MS Windows 3.1 version of Icon Message-Id: Date: 28 Mar 94 20:01:41 GMT Sender: news@walter.bellcore.com Organization: Bellcore Lines: 4 Nntp-Posting-Host: bambam.bellcore.com Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu Is there a version of Icon that runs under Windows available? I see "ms-dos" versions out there, but it's not clear to me which I should be snagging. Thanks for your time! -- Darren From icon-group-sender Sun Apr 10 22:28:08 1994 Received: by cheltenham.cs.arizona.edu; Mon, 11 Apr 1994 11:06:18 MST Date: Sun, 10 Apr 1994 22:28:08 -1000 From: David Bulman Subject: Generate Names? To: icon-group@cs.arizona.edu Message-Id: X-Mailer: VersaTerm Link v1.1.4 Content-Transfer-Encoding: 7BIT Status: R Errors-To: icon-group-errors@cs.arizona.edu A friend of mine has a problem I'd like to try to solve with an Icon program. The problem is to generate very many unique 5 character names, which should be pronounceable in English, but each should sound different from all the others. I imagine that taking advantage of the fact that a word with alternating consonants (C) and vowels (V) is likely to be pronounceable, but probably bringing Soundex into play would help too. So, the problem sort of has 3 parts: 1. What makes a pronounceable name? 2. How can I tell if two names sound alike? 3. How should I attack this in Icon? Dave +----------------------------------------------------------------+ David M. Bulman dbulman@acm.org Voice: (808) 883-9011 P.O. Box 383429 Voice on AT&T Easy Reach: 0-700-DBULMAN Waikoloa, HI 96738 Fax: (808) 883-8172 From icon-group-sender Mon Apr 11 13:43:10 1994 Received: by cheltenham.cs.arizona.edu; Mon, 11 Apr 1994 12:37:47 MST Date: Mon, 11 Apr 1994 13:43:10 -0600 (CST) From: Chris Tenaglia - 257-8765 Subject: Name/Word generator To: icon-group@cs.arizona.edu Message-Id: <01HB1UA5A5888WXLKI@mis.mcw.edu> Organization: Medical College of Wisconsin (Milwaukee, WI) X-Vms-To: IN%"icon-group@cs.arizona.edu" Mime-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Status: R Errors-To: icon-group-errors@cs.arizona.edu > From: IN%"dbulman@ACM.ORG" "David Bulman" 11-APR-1994 13:21:32.86 > To: IN%"icon-group@cs.arizona.edu" > Subj: Generate Names? The icon library has soundex routines. Usually you feed a string to soundex to get a string/number. But I think it could be used as a comparison tool. I think phonetic spelling then is more important that accurate english spelling. To keep things unique you could use a table() with soundex keys to eliminate sound-a-likes. Then you might be able to get more words by having it randomly or alternately choose to begin with a vowel or consonant. Also dipthongs can be considered, but carfully. sh, th, ch, br, bl,... and oi, io, ia, oo, oa, ai,... I have a similar tool, password generator. It also includes numerics. These are distributed by paper and phone to I don't include letters or numbers that look too much alike. We leave out O and 0, and 1, i, and l. This is useful if you have foreigners who have trouble discerning certain sounds especially over the phone. Chris Tenaglia (System Manager) | "The past explained, Medical College of Wisconsin | the future fortold, 8701 W. Watertown Plank Rd. | the present largely appologized for." Milwaukee, WI 53226 | Organon to The Doctor (414)257-8765 | tenaglia@mis.mcw.edu > A friend of mine has a problem I'd like to try to solve with an > Icon program. > The problem is to generate very many unique 5 character names, > which should be pronounceable in English, but each should sound > different from all the others. I imagine that taking advantage > of the fact that a word with alternating consonants (C) and > vowels (V) is likely to be pronounceable, but probably bringing > Soundex into play would help too. > So, the problem sort of has 3 parts: > 1. What makes a pronounceable name? > 2. How can I tell if two names sound alike? > 3. How should I attack this in Icon? > Dave > +----------------------------------------------------------------+ > David M. Bulman dbulman@acm.org Voice: (808) 883-9011 > P.O. Box 383429 Voice on AT&T Easy Reach: 0-700-DBULMAN > Waikoloa, HI 96738 Fax: (808) 883-8172 From icon-group-sender Tue Apr 19 06:40:37 1994 Received: by cheltenham.cs.arizona.edu; Tue, 19 Apr 1994 09:23:09 MST Via: uk.ac.edinburgh.festival; Tue, 19 Apr 1994 14:03:19 +0100 Date: 19 Apr 94 14:03:10 BST From: R J Hare Subject: random numbers To: icon-group@cs.arizona.edu Organisation: Edinburgh University Computing Service Message-Id: <9404191403.aa04644@uk.ac.ed.festival> Status: R Errors-To: icon-group-errors@cs.arizona.edu I have a program in which I have an integer which marks the upper end of a range from which I wish to randomly select a value. I am using: i:=?range so, if I have previously set range to (say) 13, I should get i in the range 1..13. In fact, I am getting i equals 1 or 3, ie: ? is apparently treating range as a 2 character string and returning randomly the value of the 1st or 2nd character in the string. Is this behaviour correct? If I do something like: i:=?integer(range) all is well. I am a little puzzled by this behaviour and would be grateful if someone could explain it... Thanks. RogerHare From icon-group-sender Tue Apr 19 10:06:42 1994 Received: by cheltenham.cs.arizona.edu; Tue, 19 Apr 1994 12:28:32 MST Date: Tue, 19 Apr 1994 10:06:42 MST From: "Ralph Griswold" Message-Id: <199404191706.AA11050@cheltenham.cs.arizona.edu> To: rjhare@festival.ed.ac.uk Subject: Re: random numbers Cc: icon-group Status: R Errors-To: icon-group-errors@cs.arizona.edu Your problem is because range is a string. ?s returns a randomly selected character from the string s. Since the ? operator applies to a variety of data types, you need to convert strings that look like integers to integers -- which your test shows to work. Ralph E. Griswold ralph@cs.arizona.edu Department of Computer Science uunet!arizona!ralph The University of Arizona 602-621-6609 (voice) Tucson, AZ 85721 602-621-4246 (fax) From icon-group-sender Tue Apr 19 13:05:06 1994 Received: by cheltenham.cs.arizona.edu; Tue, 19 Apr 1994 12:29:34 MST Date: Tue, 19 Apr 94 13:05:06 CDT From: jeffery@ringer.cs.utsa.edu (Clinton L. Jeffery) Message-Id: <9404191805.AA15720@ringer.cs.utsa.edu.sunset> To: rjhare@festival.ed.ac.uk Cc: icon-group@cs.arizona.edu In-Reply-To: R J Hare's message of 19 Apr 94 14:03:10 BST <9404191403.aa04644@uk.ac.ed.festival> Subject: random numbers Content-Length: 365 Status: R Errors-To: icon-group-errors@cs.arizona.edu If variable i is a string instead of an integer, ?i will give you a random character from the string instead of a random integer. A little too much polymorphism to handle unless you can figure such things out when you see the behavior in question, heh heh. Clint Jeffery cjeffery@cs.arizona.edu, jeffery@ringer.cs.utsa.edu The University of Texas at San Antonio From icon-group-sender Tue Apr 19 14:32:34 1994 Received: by cheltenham.cs.arizona.edu; Tue, 19 Apr 1994 15:53:29 MST Date: Tue, 19 Apr 1994 14:32:34 -0500 From: John David Stone Message-Id: <199404191932.OAA00763@russell.math.grin.edu> To: rjhare@festival.ed.ac.uk Cc: icon-group@cs.arizona.edu In-Reply-To: R J Hare's message of 19 Apr 94 14:03:10 BST <9404191403.aa04644@uk.ac.ed.festival> Subject: random numbers Status: R Errors-To: icon-group-errors@cs.arizona.edu R. J. Hare writes: > I have a program in which I have an integer which marks the > upper end of a range from which I wish to randomly select a value. I am > using: > > i:=?range > > so, if I have previously set range to (say) 13, I should get i in the > range 1..13. In fact, I am getting i equals 1 or 3, ie: ? is apparently > treating range as a 2 character string and returning randomly the value > of the 1st or 2nd character in the string. Is this behaviour correct? It is if the value of `range' is really a string. How did this variable acquire its value in the first place? If it was typed in from the keyboard in response to a prompt, e.g., writes("Number, please: ") range := read() then the value that is assigned to `range' really is a string, and if you want to deal with an integer you should change the second statement to something like (range := integer(read())) | stop("non-integer input") ------ John David Stone - Lecturer in Computer Science and Philosophy ----- -------------- Manager of the Mathematics Local-Area Network -------------- -------------- Grinnell College - Grinnell, Iowa 50112 - USA -------------- -------- stone@math.grin.edu - (515) 269-3181 - stone@grin1.bitnet -------- From icon-group-sender Tue Apr 19 15:07:23 1994 Received: by cheltenham.cs.arizona.edu; Tue, 19 Apr 1994 15:55:08 MST Date: Tue, 19 Apr 1994 15:07:23 MST From: "Ralph Griswold" Message-Id: <199404192207.AA19451@cheltenham.cs.arizona.edu> To: icon-group Subject: sockets in Icon Status: R Errors-To: icon-group-errors@cs.arizona.edu I'm forwarding the following inquiry that came to me in hopes someone in icon-group can answer. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ I have asked before re sockets in Icon and been told there are none. I feel this is probably something someone has done before. Could you please give me any ideas how to track this down before trying to figure something out myself? -- Thanks from: Doug Skuce | e-mail: doug@csi.uottawa.ca Department of Computer Science | University of Ottawa | phone : (613) 564-5418 Ottawa, K1N 6N5, Canada | fax : (613) 564-9486 From icon-group-sender Wed Apr 20 00:10:16 1994 Received: by cheltenham.cs.arizona.edu; Wed, 20 Apr 1994 08:31:17 MST Via: uk.ac.edinburgh.festival; Wed, 20 Apr 1994 08:09:49 +0100 Date: 20 Apr 94 08:09:43 BST From: R J Hare Subject: Random numbers To: icon-group@cs.arizona.edu Organisation: Edinburgh University Computing Service Message-Id: <9404200809.aa18437@uk.ac.ed.festival> Status: R Errors-To: icon-group-errors@cs.arizona.edu Thank you all for responding to my query about 'strange' behaviour by the random operator. I had always assumed that if a value was 'intrinsically' numeric, it e was forced to the relevant type. I now see I was mistaken - another valuable lesson. For what it's worth, the value for range was set like this: x:=arglist[1]|50 where arglist is the run-time argument list given to the program. If the argument list is not given, the value defaults to 50 and as 50 *is* an integer, and all is well... Thanks again. Roger Hare From icon-group-sender Wed Apr 20 10:53:50 1994 Received: by cheltenham.cs.arizona.edu; Wed, 20 Apr 1994 09:10:09 MST Message-Id: <199404201555.AA17040@optima.CS.Arizona.EDU> To: icon-group@cs.arizona.edu From: "Stephen Del Rea" Organization: UA Cooperative Extension Service Date: Wed, 20 Apr 1994 10:53:50 CST Subject: Snobol4 or Icon? Priority: normal X-Mailer: WinPMail v1.0 (R2) Status: R Errors-To: icon-group-errors@cs.arizona.edu I have just got on the icon-group list, mainly to learn more about the language. I have been using Snobol4 for many years, mainly for string manipulation and parsing, and am quite happy with it. My question is: Should I consider switching to Icon and, if so, what strengths and capabilities would Icon give me over Snobol4? Please try to avoid the philosophical arguments of one over the other (which are as many as there are users of the languages!). Thanks in advance for your input. Stephen Rea srea@uaex.arknet.edu From icon-group-sender Wed Apr 20 10:00:14 1994 Received: by cheltenham.cs.arizona.edu; Wed, 20 Apr 1994 12:45:53 MST Date: Wed, 20 Apr 1994 10:00:14 -0700 From: Michael Shafto Message-Id: <199404201700.KAA11036@eos.arc.nasa.gov> To: SREA@UAEX.ARKNET.EDU, icon-group@cs.arizona.edu Subject: Re: Snobol4 or Icon? Cc: shafto@eos.arc.nasa.gov Status: R Errors-To: icon-group-errors@cs.arizona.edu Steve, I have been a SNOBOL4 hacker for almost 25 years, having learned it on an IBM 360 at Princeton, starting in 1970. I picked up Icon starting in about 1982, before it was widely available on a lot of platforms. I've used Icon extensively since about 1984, on Vax, PC, and Mac platforms. The following opinions are likely NOT to be politically correct, but they're based on a lot of practical programming experience. 1. Icon would probably be easier to learn from scratch than would SNOBOL4, but this is irrelevant if you're already fluent in SNOBOL4. 1a) However, if others have to read and understand your code, Icon beats SNOBOL4. 2. If your applications are heavy on pattern matching, SNOBOL4 is far better than Icon. 2a) If your applications are NOT heavily dependent on sophistiacted pattern matching, Icon is better. 3. SNOBOL4's advantages decrease the larger your programs become. Icon is mcuh better if you have to develop and maintain large programs, using libraries. 4. Icon is better maintained than SNOBOL4, e.g., Ralph Griswold and friends are about to deliver on a major investment in the enhancement of Icon's graphics programming capabilities. 5. Both Icon code and SNOBOL4 code are highly portable across different platforms; this is a real strength for both of them. 6. There are two things you can do in SNOBOL4 that you simply cannot do in Icon: (a) have patterns availble as first-class data types: create them at run-time, have them returned as values from subroutines, etc.; (b) create, compile, and interpret code at run-time (like LISP). If these features are important, you should use SNOBOL4. Happy hacking!!! (Icon and SNOBOL4 are my two favorite languages; I know lots of others but I don't use them.) Mike From icon-group-sender Wed Apr 20 12:59:29 1994 Received: by cheltenham.cs.arizona.edu; Wed, 20 Apr 1994 13:13:20 MST Date: Wed, 20 Apr 1994 12:59:29 MST From: "Ralph Griswold" Message-Id: <199404201959.AA19174@cheltenham.cs.arizona.edu> To: shafto@eos.arc.nasa.gov Subject: Re: Snobol4 or Icon? Cc: icon-group Status: R Errors-To: icon-group-errors@cs.arizona.edu Mike Shafto's evaluation of SNOBOL4 and Icon generally agree with mine. The issue of support may be very important to some persons. Icon is available on a wide variety of platforms and all implementations are in the public domain. New features are being added to Icon and there's extensive documentation, including a free newsletter. Implied in Mike's reply, but perhaps not obvious if you're not familiar with the two languages, is that Icon has extensive high-level facilities for graphics, while SNOBOL4 has none. Icon's graphic facilities presently are supported under UNIX, VMS, and OS/2. We expect a Windows NT implementation with graphics and have hopes of ones for Win32 and the Macintosh. Ralph E. Griswold ralph@cs.arizona.edu Department of Computer Science uunet!arizona!ralph The University of Arizona 602-621-6609 (voice) Tucson, AZ 85721 602-621-4246 (fax) From icon-group-sender Wed Apr 20 17:23:11 1994 Received: by cheltenham.cs.arizona.edu; Wed, 20 Apr 1994 18:39:06 MST Date: Wed, 20 Apr 1994 17:23:11 -0500 (CDT) From: Ronan_Collis Subject: Re: Snobol4 or Icon? To: Ralph Griswold Cc: shafto@eos.arc.nasa.gov, icon-group@cs.arizona.edu In-Reply-To: <199404201959.AA19174@cheltenham.cs.arizona.edu> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Status: R Errors-To: icon-group-errors@cs.arizona.edu Thank you for the news that there will, later be icon graphics support for macintosh. Ronan_Collis@MBnet.MB.CA From icon-group-sender Fri Apr 22 13:06:56 1994 Received: by cheltenham.cs.arizona.edu; Fri, 22 Apr 1994 09:14:03 MST Date: Fri, 22 Apr 1994 13:06:56 +0100 From: Jan Peter de Ruiter Message-Id: <9404221206.AA25564@mpix10.mpi.kun.nl> To: icon-group@cs.arizona.edu Subject: is this a bug? Status: R Errors-To: icon-group-errors@cs.arizona.edu Hi Icon folks, I hope someone can help me out with this. I had a terrible bug in a program, and it was caused by the following phenomenon: ------- example program ------------- link ximage procedure main() t := table([]) # a table with default element [] every put(t[1],generate(1,5)) # fill t[1], which is empty list every put(t[2],generate(6,9)) # fill t[2], which is empty list every(write(!t[1])) # write out all elements of t[1] write() every(write(!t[2])) # write out all elements of t[2] write(ximage(t)) # write out image of t end procedure generate(a,b) every suspend (a to b) end -------- end example program ----------- Now I expected that t[1] would be [1,2,3,4,5] and t[2] would be [6,7,8,9]. However, the output was: --------- program output --------------- 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 T1 := table({L1 := list(9) L1[1] := 1 L1[2] := 2 L1[3] := 3 L1[4] := 4 L1[5] := 5 L1[6] := 6 L1[7] := 7 L1[8] := 8 L1[9] := 9 L1}) --------- end program output ------------- It seems there is actually one list here, with both t[1] and t[2] pointing to it. This was not what I expected. Now my question is: have I understood the icon semantics wrongly, or is this a bug? If anyone understands what is happening here, could (s)he please explain? Thanks in advance, Jan janpeter@mpi.kun.nl From icon-group-sender Fri Apr 22 11:36:51 1994 Received: by cheltenham.cs.arizona.edu; Fri, 22 Apr 1994 12:34:52 MST Date: Fri, 22 Apr 1994 11:36:51 -0500 From: John David Stone Message-Id: <199404221636.LAA01303@russell.math.grin.edu> To: janpeter@mpi.nl Cc: icon-group@cs.arizona.edu In-Reply-To: Jan Peter de Ruiter's message of Fri, 22 Apr 1994 13:06:56 +0100 <9404221206.AA25564@mpix10.mpi.kun.nl> Subject: is this a bug? Status: R Errors-To: icon-group-errors@cs.arizona.edu Here's an excerpt from _The Icon Programming Language_, second edition (pages 76-77), that explains what's going on: ----------------------------------------------------------------------------- A structure value is reference (pointer) to an aggregate of values. Furthermore, assignment copies the reference (pointer) but not the aggregate of values to which it points. There are several consequences of these properties of structures that may not be immediately obvious. Consider index := list(50, 0) temp := index temp[1] := 1 The assignment of the value of index to temp does not copy the 50 values pointed to by the value of index. Instead, index and temp both point to the _same_ aggregate of values. Therefore, the assignment of 1 to temp[1] changes the contents of the list that temp and index share as their value. The effect is as if index[1] := 1 had been evaluated. ... Since assignment does not copy structures, the result of an expression such as L1 := L2 := list(i, 0) is to assign the _same_list to both L1 and L2. Subsequently, assignment to a position in L2 changes the value of that position in L1, and conversely. Similarly, the effect of L := list(3, list(5, 0)) is to assign the _same_ list of five values to each of the three values in L. ----------------------------------------------------------------------------- De Ruiter is running up against the same problem; he has the _same_ (initially empty) list as the default value throughout table T1. Consequently, when a call to put modifies the value of this list, the effect is to change every entry in the table (because there _is_ actually only one "aggregate of values" on the other end of all the pointers). ------ John David Stone - Lecturer in Computer Science and Philosophy ----- -------------- Manager of the Mathematics Local-Area Network -------------- -------------- Grinnell College - Grinnell, Iowa 50112 - USA -------------- -------- stone@math.grin.edu - (515) 269-3181 - stone@grin1.bitnet -------- From icon-group-sender Fri Apr 22 09:58:30 1994 Received: by cheltenham.cs.arizona.edu; Fri, 22 Apr 1994 12:35:30 MST From: Nevin Liber Message-Id: <199404221658.JAA20218@caslon.CS.Arizona.EDU> Subject: Re: is this a bug? To: icon-group@cs.arizona.edu (Icon Group) Date: Fri, 22 Apr 1994 09:58:30 -0700 (MST) Cc: janpeter@mpi.nl (Jan Peter de Ruiter) In-Reply-To: <9404221206.AA25564@mpix10.mpi.kun.nl> from "Jan Peter de Ruiter" at Apr 22, 94 01:06:56 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 2482 Status: R Errors-To: icon-group-errors@cs.arizona.edu Jan Peter de Ruiter proudly drove the following message along the Information SuperHypeway(TM) at breakneck speeds: > procedure main() > t := table([]) # a table with default element [] > every put(t[1],generate(1,5)) # fill t[1], which is empty list > every put(t[2],generate(6,9)) # fill t[2], which is empty list > every(write(!t[1])) # write out all elements of t[1] > write() > every(write(!t[2])) # write out all elements of t[2] > write(ximage(t)) # write out image of t > end > > procedure generate(a,b) > every suspend (a to b) > end >{Expectation: t[1] <- [1,2,3,4,5], t[2] <- [6,7,8,9]} >{Result: (t[1] === t[2]) <- [1,2,3,4,5,6,7,8,9]]} > Now my question is: have I understood the icon > semantics wrongly, or is this a bug? It is part of the semantics, and not a bug. >If anyone > understands what is happening here, could (s)he > please explain? Let xDefault = the default value of the table (in this case, []). You were expecting copy(xDefault) to be returned; however, xDefault is returned instead. For structure types (lists, records, sets and tables), operations on expressions that have the same value as xDefault do their work on the same structure. In other words, the compare values operator (===) will always be true when getting the xDefault element out of the table. In your case, you never assign anything to the table, so t[1] and t[2] always return the same default list. BTW, even if tables had copy semantics for the xDefault element, the above program still wouldn't work. Since nothing is ever assigned to the table, t[1] and t[2] would always return a copy of an empty list, and the observable result of the above code would be: ((t[1] <- []) ~=== (t[2] <- [])) [Actually, t[1] and t[2] are never defined; the above is if you did an assignment like t1 := t[1] t2 := t[2] and looked at t1 and t2.] Just wondering: can anyone think of a situation where copy semantics would be desirable? What you really were expecting is the first time you referenced an element in a table, copy(xDefault) is assigned to that element. However, I don't believe that the benefits of this outweigh the consequences of having these semantics (eg: describing how tables work and what is and isn't a key of that table would be a nightmare to try and describe). -- Nevin ":-)" Liber nevin@cs.arizona.edu (602) 293-2799 +++ (520) after 3/95 office: (602) 621-1685 From icon-group-sender Fri Apr 22 16:12:00 1994 Received: by cheltenham.cs.arizona.edu; Fri, 22 Apr 1994 18:01:20 MST Date: Fri, 22 Apr 1994 16:12:00 -0600 (CST) From: Chris Tenaglia - 257-8765 Subject: ff.icn To: icon-group@cs.arizona.edu Message-Id: <01HBHB4TC70Y8WYD3G@mis.mcw.edu> Organization: Medical College of Wisconsin (Milwaukee, WI) X-Vms-To: IN%"icon-group@cs.arizona.edu" Mime-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Status: R Errors-To: icon-group-errors@cs.arizona.edu I haven't seen too many handy doodads recently. I have a unix icon snippet of code. I guess I was too lazy to figure out the 'find' alias I'd need, so I pieced together ff (file finder). I wrote it for the Ultrix unix system. It requires the HOME environmental variable to search ones directory tree. Don't use it from the root account, and it only searches the directories beginning at HOME. If you have a different unix, or your terminal doesn't support ansi highlighting, you may have to modify some things. It doesn't do regular expressions, but it does find substrings. Enjoy. Chris Tenaglia (System Manager) | Medical College of Wisconsin 8701 W. Watertown Plank Rd. | Milwaukee, WI 53226 (414)257-8765 | tenaglia@mis.mcw.edu # # FILE : FF.ICN # DESC : This program does a file find. # It works only from your home account directory tree. # Don't use if you're root or looking beyond your user account. # Highlights substring with ansi sequences. # USE : ff substr # # UPDATE BY WHAT # 22-APR-1994 TENAGLIA INITIAL WRITE # procedure main(param) home := getenv("HOME") command := "ls -alR " || home pipe := open(command,"pr") part := param[1] | stop("Nothing to ff!") every drip := !pipe do { if match("/",drip) then { home := drip[1:upto(":",drip)] next } file := home || "/" || parse(drip,' ')[-1] # construct full filename if match( ("./" | ".."), file) then next # skip this junk if find(part,file) then # case sensitive matching { drip[46:0] := "" drip ||:= file drip[11:24] := "" i := find(part,drip) - 1 # *** warning *** j := i + *part # these lines put ansi (drip[j] ||:= "\e[m") | (drip ||:= "\e[m") # highlighting around drip[i] ||:= "\e[1m" # the matched substring write(drip) } } close(pipe) end # # parse a string into a list using a delimiter # procedure parse(line,delims) static chars chars := &cset -- delims tokens := [] line ? while tab(upto(chars)) do put(tokens,tab(many(chars))) return tokens end From icon-group-sender Sun Apr 24 16:51:23 1994 Received: by cheltenham.cs.arizona.edu; Sun, 24 Apr 1994 13:53:14 MST From: Message-Id: <9404241551.AA17073@mpix10.mpi.kun.nl> To: icon-group@cs.arizona.edu Subject: Re: is this a bug? Date: Sun, 24 Apr 94 16:51:23 +0100 X-Mts: smtp Status: R Errors-To: icon-group-errors@cs.arizona.edu First of all, thank you for the help in understanding Icon table / list semantics. I now see what the problem was. Nevin Liber writes: > Jan Peter de Ruiter proudly drove the following message along the Information SuperHype way(TM) at breakneck speeds: I can see no indication of "proudness" in my posting. I specifically pointed out that lack of understanding of Icon on my part is a potential cause for my problem. As John David Stone (stone@math.grin.edu) and Steve Wampler (swampler@noao.edu) also pointed out, the thing I didn't realize is that the initialisation t := table([]) makes all table entries point at the *same* empty list. Well, I understand now, but I must honestly say I don't like it. The denotation [] looks like a *value* to me, but it isn't. I see that the statement l1 := l2 := list() will make "pointers" to the same list, and I can appreciate the performance reasons behind this. What I don't like it the difference between initialisation and assignment in tables, for it can lead to confusing effects. For example, the following fragments do not have the same meaning: # first fragment t := table([]) put(t[1],"john") put(t[2],"mary") # second fragment t := table([]) t[1] |||:= ["john"] t[2] |||:= ["mary"] Which is a pity, I think, for a higher level language where you're supposed to be free of these details. This is the kind of problem I expect to have in C++, but not in Icon. But I am fully aware of the fact that I'll have to live with it. And I can live with it, now I know what's going on. Greetings, Jan From icon-group-sender Thu Apr 21 06:30:52 1994 Received: by cheltenham.cs.arizona.edu; Sun, 24 Apr 1994 13:54:22 MST Path: ucbvax!agate!ihnp4.ucsd.edu!swrinde!emory!europa.eng.gtefsd.com!MathWorks.Com!noc.near.net!hopscotch.ksr.com!tim From: tim@ksr.com (Tim Peters) Newsgroups: comp.lang.icon Subject: Re: generate keys of a table? Message-Id: <2p56is$k0t@hopscotch.ksr.com> Date: 21 Apr 94 06:30:52 GMT References: Distribution: inet Organization: Kendall Square Research Lines: 36 Nntp-Posting-Host: kaos.ksr.com Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu mike@majestix.cs.uoregon.edu (Mike Haertel) writes: >Is there a way to enumerate keys of a table (not the entries)? "key" is builtin generator that does what you're after. See "The Icon Programming Language", 2nd edition, pgs 74-75. If you have a very old version of Icon, "key" might not be in it. Here's an example: procedure main() local t, i t := table() every i := 1 to 10 do t[i] := "abcdefghij"[i] every writes( right(!t, 3) ) write() every writes( right(key(t), 3) ) write() end And here's its output: e b j g d a i f c h 5 2 10 7 4 1 9 6 3 8 key(table) generates table's keys in an arbitrary order, but so long as you don't fiddle with table in the meantime, it's the same arbitrary order that !table uses for generating table's entries. BTW, I believe that if Dr. Griswold had it to do all over again, !table would generate keys instead of entries. why-languages-should-be-implemented-but-never-used-ly y'rs - tim Tim Peters tim@ksr.com not speaking for Kendall Square Research Corp From icon-group-sender Mon Apr 25 08:12:44 1994 Received: by cheltenham.cs.arizona.edu; Mon, 25 Apr 1994 09:25:47 MST Date: Mon, 25 Apr 94 08:12:44 PDT From: kwalker@sirtur.premenos.com (Ken Walker) Message-Id: <9404251512.AA00951@sirtur.premenos.com> To: icon-group@cs.arizona.edu Subject: pointer semantics X-Sun-Charset: US-ASCII Content-Length: 1002 Status: R Errors-To: icon-group-errors@cs.arizona.edu > From: > Subject: Re: is this a bug? > > For example, the following fragments do not have the same > meaning: > > # first fragment > t := table([]) > put(t[1],"john") > put(t[2],"mary") > > # second fragment > t := table([]) > t[1] |||:= ["john"] > t[2] |||:= ["mary"] > > Which is a pity, I think, for a higher level language where > you're supposed to be free of these details A simplified example is: L := [] put(L, "john") L := [] L |||:= ["john"] In the first case, you are modifying the list and in the second case you are constructing a new list and assigning it to L. The "problem" is inherent in an imperative language with pointer semantics. While it is true that efficiency is one reason for having pointer semantics, pointer semantics is also very convenient. You can modify part of a complex data structure without being forced to rebuild the whole thing and pass the changes on to everything that needs it. Ken Walker, kwalker@premenos.com From icon-group-sender Mon Apr 25 13:32:10 1994 Received: by cheltenham.cs.arizona.edu; Mon, 25 Apr 1994 12:37:11 MST From: "Art Eschenlauer" Message-Id: <9404251832.AA02971@molbio.cbs.umn.edu> Subject: tables, lists, and memory question To: icon-group@cs.arizona.edu Date: Mon, 25 Apr 94 13:32:10 CDT X-Mailer: ELM [version 2.3test PL26] Status: R Errors-To: icon-group-errors@cs.arizona.edu I've been wondering for some time now about how (if) Icon knows what things to trash. For instance, if I have a function that calls table() and assigns it to a pointer, can that function return that pointer (return, not suspend) such that the table is accessible from the calling program? If so, and I stuff the table full and use it and then have no more use for it, is there a way to dispose of the table, e.g., untable(pointer) or something? Or is the best I can do every (thetable(key(thetable)) := 0)? The same question goes for lists that are members of other lists, e.g., suppose I say thelist := [ [5], [6], [7] ] ; thelist := [] What happens to the memory containing lists [5], [6], and [7] ? Thanks, Art Eschenlauer From icon-group-sender Mon Apr 11 06:55:08 1994 Received: by cheltenham.cs.arizona.edu; Mon, 25 Apr 1994 18:01:27 MST Path: ucbvax!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!eff!news.umbc.edu!europa.eng.gtefsd.com!howland.reston.ans.net!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ncar!noao!CS.Arizona.EDU!pimacc.pima.edu!east.pima.edu!rharwood From: rharwood@east.pima.edu Newsgroups: comp.lang.icon Subject: VMS non-DECwindows .EXE files wanted Message-Id: <1994Apr10.235508.1@east.pima.edu> Date: 11 Apr 94 06:55:08 GMT Lines: 11 Nntp-Posting-Host: east Nntp-Posting-User: rharwood Apparently-To: icon-group@cs.arizona.edu Status: RO Errors-To: icon-group-errors@cs.arizona.edu Does anyone have a set of VMS executables that dos NOT need the DECwindows library? I've got a VAX without DECwindows support installed, and really don't want to have to rebuild the whole ball of wax if I can help it. Thanks in advance, Ray ----- Ray Harwood |Data Basix || Adjunct Faculty, East Campus, Voice: (602)721-1988|PO Box 18324 || Pima Community College FAX: (602)721-7240|Tucson, AZ 85731 || Instructor in Ada and Pascal Internet:|rharwood@Data.Basix.COM|| rharwood@east.pima.edu From icon-group-sender Tue Apr 26 06:35:08 1994 Received: by cheltenham.cs.arizona.edu; Tue, 26 Apr 1994 08:58:23 MST Date: Tue, 26 Apr 1994 06:35:08 -0600 (CST) From: Chris Tenaglia - 257-8765 Subject: VMS executables To: icon-group@cs.arizona.edu Message-Id: <01HBMD6KK6NM8WVZ96@mis.mcw.edu> Organization: Medical College of Wisconsin (Milwaukee, WI) X-Vms-To: IN%"icon-group@cs.arizona.edu" Mime-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Status: R Errors-To: icon-group-errors@cs.arizona.edu VMS icon has some compatibility problems since the X-stuff was added. If you have the source and a c compiler you can edit [icon.src.h]config.h and there's an xwindows switch you can change and then rebuild the package. But there is another problem with vms icon. There is at least one byte value it can't write. Here's a sample... procedure main() xff := char(255) # or \377 or \xff or string(&cset)[-1] write(xff) end I've found that you have to go back to Icon V8.6 to get that to run. Otherwise you get some I/O error. Does the Icon Project still have it? Will it be fixed in Icon V9? I could try to FTP my V8.6 (bins), but I'm not sure what the procedure is to pack these and put them the anon ftp area there. It would be kinder to bandwidth to have the icon project to place the older version out there too. V8.10 is ok for X if you don't need to write X'FF'. Anyone else having similar problems? I'm using VMS 5.5. Chris Tenaglia (System Manager) | "The past explained, Medical College of Wisconsin | the future fortold, 8701 W. Watertown Plank Rd. | the present largely appologized for." Milwaukee, WI 53226 | Organon to The Doctor (414)257-8765 | tenaglia@mis.mcw.edu From icon-group-sender Wed Apr 27 02:04:53 1994 Received: by cheltenham.cs.arizona.edu; Wed, 27 Apr 1994 08:39:26 MST Date: Wed, 27 Apr 94 06:56:03 BST From: spuddy!cross (Mike Cross) Message-Id: <9404270556.AA04111@spuddy> To: icon-group@cs.arizona.edu Subject: Icon for Solaris V2.x Status: R Errors-To: icon-group-errors@cs.arizona.edu Has anyone produced a set of configuration files for Icon under Solaris V2.x for Sparc or x86? Thanks Mike Cross cross%spuddy@britain.eu.net From icon-group-sender Wed Apr 27 15:40:08 1994 Received: by cheltenham.cs.arizona.edu; Wed, 27 Apr 1994 08:58:43 MST Date: Wed, 27 Apr 94 15:40:08 +0200 From: karczma@univ-caen.fr (Jerzy Karczmarczuk) Message-Id: <9404271340.AA00697@milou.univ-caen.fr> To: icon-group@cs.arizona.edu Subject: Details, please... Status: RO Errors-To: icon-group-errors@cs.arizona.edu Dear gentlemen, (last time when I began my letter in such a way, some anti-sexists accused me of -- frankly, I don't remember exactly what, because I am still laughing... This time, hopefully, you will forgive me. I cannot address ladies this time.) I have on my desk The Icon Newsletter, no. 44. Look at the page 2, the SNOBOL4 Corner. We read: ..."For years, there's been talk about a C implementation of SIL, but nothing has ever materialized --- until now. Phil Budne has mastered the task. His implementation of SNOBOL4, which he has placed in the pubic domain, presently runs..." ---------------- Yours truly Jerzy Karczmarczuk, Dept. of Comp. Sci., Univ of Caen, France. From icon-group-sender Wed Apr 27 08:48:03 1994 Received: by cheltenham.cs.arizona.edu; Wed, 27 Apr 1994 09:01:12 MST Date: Wed, 27 Apr 94 08:48:03 PDT From: kwalker@sirtur.premenos.com (Ken Walker) Message-Id: <9404271548.AA01384@sirtur.premenos.com> To: icon-group@cs.arizona.edu Subject: Re: tables, lists, and memory question X-Sun-Charset: US-ASCII Content-Length: 1871 Status: R Errors-To: icon-group-errors@cs.arizona.edu > From: "Art Eschenlauer" > > > I've been wondering for some time now about how (if) Icon knows what > things to trash. Icon does its own storage management within the memory it malloc()s. When it does not have room to allocate an object within the memory it has, it performs a garbage collection to try to recover unused space before it malloc()s more memory. To perform garbage collection, it starts from a "basis" of locations that the Icon program can access, for example, the program's variables, marking things that can be reached. For data types with pointer semantics, it follows pointers until it reaches an end or reaches something that has already been marked. When it has marked everything that the program might use in the future, it can "free" everything else and compact its allocated memory, relocating pointers to objects it moves. Icon's garbage collection is not perfect, but it is conservative. It may save a few things it doesn't need to. There is a rather subtle example. If I remember correctly, it is something like: procedure p() local c c := create write("Hi") c := create write("Bye") # do something that causes garbage collection end Internally, the second co-expression get a copy of the variable c with a reference to the first co-expression even thought it doesn't use the variable c. There is no way to activate the first co-expression, but the garbage collector will save it. Dispite a few holes like this, the Icon interpreter is pretty good about only keeping things that might still be accessed by the Icon program. The Icon compiler is a little sloppier about it. It may leave things in temporary variables that are no longer needed and the garbage collector will assume that they are needed. However, in practice this doesn't seem to be a problem. Ken Walker, kwalker@premenos.com From icon-group-sender Wed Apr 27 09:10:35 1994 Received: by cheltenham.cs.arizona.edu; Wed, 27 Apr 1994 13:37:02 MST Date: Wed, 27 Apr 1994 09:10:35 MST From: "Cliff Hathaway" Message-Id: <199404271610.AA11286@cheltenham.cs.arizona.edu> To: icon-group@cs.arizona.edu, spuddy!cross Subject: Re: Icon for Solaris V2.x Status: R Errors-To: icon-group-errors@cs.arizona.edu > From: spuddy!cross (Mike Cross) > To: icon-group@cs.arizona.edu > Subject: Icon for Solaris V2.x > > Has anyone produced a set of configuration files for Icon > under Solaris V2.x for Sparc or x86? > > Thanks > > Mike Cross > cross%spuddy@britain.eu.net The latest Unix distribution of Icon (8.10) has configuration directories for Sun 4's running Solaris 2.x, using the Sun C compiler, CenterLine C, and gcc. It's available via anonymous ftp from ftp.cs.arizona.edu: /icon/packages/unix/unix_tar.Z. Also available on 3.5" DSHD diskettes for $25 (+ $5 shipping to addresses outside of the U.S., Canada and Mexico). Other media for the Unix distribution are QIC24 cartridge ($45+$10) and 9-track 1/2" tape ($30+$10). Ordering info: Icon Project Computer Science Dept. University of Arizona Tucson AZ 85721 USA voice: (602) 621-8448 fax: (602) 621-4246 email: icon-orders@cs.arizona.edu I'm not aware of any configuration for the x86 Solaris. Cliff Hathaway, Icon Project Dept. of Computer Science (602)621-4291 University of Arizona cliff@cs.arizona.edu (internet) Tucson, Ariz. 85721 {cmcl2,noao,uunet}!arizona!cliff (uucp) From icon-group-sender Sun May 1 21:20:11 1994 Received: by cheltenham.cs.arizona.edu; Sun, 1 May 1994 18:53:48 MST Path: ucbvax!dog.ee.lbl.gov!ihnp4.ucsd.edu!swrinde!ringer!jeffery From: jeffery@ringer.cs.utsa.edu (Clinton L. Jeffery) Newsgroups: comp.lang.icon Subject: Re: Icon in May94 BYTE Magazine -- what else & Windows? Message-Id: <1994May1.212011.27547@ringer.cs.utsa.edu> Date: 1 May 94 21:20:11 GMT References: <2pvb7c$hel@redstone.interpath.net> Distribution: inet Organization: Univ of Texas at San Antonio Lines: 14 Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu > Is the NT version going to come out with the Windows version or are > they separate? We are "committed" to delivering a Win32 binary. We hope it will run under plain Windows 3.1 with Microsoft's Win32s compatibility library. Running Win32 applications on Windows 3.1 doesn't work well on slower machines, so we are also looking into producing a Win16, native Windows 3.1 binary, and will do so if the development tools and our limited resources allow. -- Clint Jeffery cjeffery@cs.arizona.edu, jeffery@ringer.cs.utsa.edu The University of Texas at San Antonio From icon-group-sender Mon May 2 22:09:38 1994 Received: by cheltenham.cs.arizona.edu; Mon, 2 May 1994 19:39:30 MST Path: ucbvax!dog.ee.lbl.gov!ihnp4.ucsd.edu!swrinde!ringer!jeffery From: jeffery@ringer.cs.utsa.edu (Clinton L. Jeffery) Newsgroups: comp.lang.icon Subject: Re: Icon in May94 BYTE Magazine -- what else & Windows? Message-Id: <1994May2.220938.20367@ringer.cs.utsa.edu> Date: 2 May 94 22:09:38 GMT References: <1994May2.093307.5443@driftwood.cray.com> Distribution: inet Organization: Univ of Texas at San Antonio Lines: 12 Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu David S. Cargo writes: > I was wondering how fonts were being handled in a portable way between > the X Windows System and Microsoft Windows. We define a portable syntax for font names, and translate that into appropriate system fonts. And we define four portable font names that are known on all systems, covering the combinations of (fixed/proportional spacing) and (serif/sans serif). -- Clint Jeffery cjeffery@cs.arizona.edu, jeffery@ringer.cs.utsa.edu The University of Texas at San Antonio From icon-group-sender Tue May 3 19:17:11 1994 Received: by cheltenham.cs.arizona.edu; Tue, 3 May 1994 18:33:22 MST Path: ucbvax!agate!howland.reston.ans.net!vixen.cso.uiuc.edu!uchinews!ellis!goer From: goer@ellis.uchicago.edu (Richard L. Goerwitz) Newsgroups: comp.lang.icon Subject: Re: Spitbol vs. Icon Keywords: Spitbol, ICON, pattern Message-Id: <1994May3.191711.12437@midway.uchicago.edu> Date: 3 May 94 19:17:11 GMT References: Sender: news@bluebird.uchicago.edu (News System) Reply-To: goer@midway.uchicago.edu Organization: University of Chicago Lines: 20 Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu In article sgmlsh@world.std.com (John Smith) writes: >The headline says it all.... I've gotten used to the GOTO... In fact, I >enjoy it, now.... So Spitbol's lack of control structures doesn't bother >me. But switching to a language where I would lose all my lovingly built >up patterns would bother me a lot! > >So how does Spitbol's pattern matching compare with Icon's? Could one map >directly to the other? No. Don't switch if you are looking for Snobol or Spitbol under a dif- ferent name. Some of the basic design principles are similar. But scan- ning happens on a much lower level in Icon. And the overall program or- ganization it enforces is more in line with post-Algol, procedural lang- uages than with older label/goto-style ones. -- -Richard L. Goerwitz goer%midway@uchicago.bitnet goer@midway.uchicago.edu rutgers!oddjob!ellis!goer From icon-group-sender Wed Apr 20 09:05:17 1994 Received: by cheltenham.cs.arizona.edu; Wed, 4 May 1994 09:02:21 MST Path: ucbvax!cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!cs.utexas.edu!chpc.utexas.edu!news.utdallas.edu!corpgate!bnrgate!bnr.co.uk!pipex!uknet!bcc.ac.uk!link-1.ts.bcc.ac.uk!ucgadkw From: ucgadkw@ucl.ac.uk (Dominik Wujastyk) Newsgroups: comp.lang.icon Subject: Re: Icon in BYTE Magazine Message-Id: <1994Apr20.090517.31854@ucl.ac.uk> Date: 20 Apr 94 09:05:17 GMT References: <2p16lc$61f@amhux3.amherst.edu> Distribution: inet Organization: University College London Lines: 15 Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu kehandle@unix.amherst.edu (KEITH EDWARD HANDLEY) writes: >The new BYTE (May, 1994) has an article by Ralph Griswold that is >an introduction to Icon. Pages 193-200 (but there are quite a few >ads in there). That's nice. The last one (on Snobol) was in the 1985 Byte. I bought that issue, which focussed on text processing, and there were a couple of pieces on TeX too, including a brief interview with Knuth, which started me down that slippery slope. I still haven't recovered (but I have some nice books to show for it). I wonder what else is in the May 94 Byte? Dominik From icon-group-sender Wed May 4 13:47:52 1994 Received: by cheltenham.cs.arizona.edu; Wed, 4 May 1994 12:28:50 MST From: "Art Eschenlauer" Message-Id: <9405041847.AA05442@molbio.cbs.umn.edu> Subject: pattern searching for molecular biology To: icon-group@cs.arizona.edu Date: Wed, 4 May 94 13:47:52 CDT X-Mailer: ELM [version 2.3test PL26] Status: R Errors-To: icon-group-errors@cs.arizona.edu I have a molecular biology problem that I am trying to solve with Icon. It boils down to pattern searching. I suppose I should look up pattern matching algorithms in a real comp sci book, but if you wish to read further.... Genes consist of strings of bases A,C,G, and T. I want to look for patterns in those strings (patterns that are recognized by enzymes that cut the DNA at specific sequences in the DNA). So, I have a file of about 200 different recognition sequences, e.g., EcoRI is an enzyme that recognizes and cuts at GAATTC sequences. Additionally, some of those recog seqs are redundant; for example, StyI recognizes CCWWGG, where W = A|T, and MslI recognizes CAYNNNNRTG, where Y = C|T, R = A|G, and N = A|C|G|T. Many recog seqs are about 6 bases, but they range from 4 to 15 bases. I want a way to match these sequences that is efficient with memory and time. What is the FASTEST way to do this in Icon? The FIRST way that I can think of doing it is with string invocation, e.g., # &subject has gene sequence, and recog sites are found using # every i := find( # ((site := SiteGeneratorFunction())[1:2])( site[2:0] ) # ) do { whatever } # # the [1:2] substring is taken to produce # # the 1 char name of the procedure to be invoked # ... declare procedures A,B,C,D,G,H,K,M,N,R,S,T, and W procedure Y(RestOfSite) if RestOfSite == "" then return "" suspend ( move(1) == ("C"|"T") ) || (RestOfSite[1:2])( RestOfSite[2:0] ) end (Please pardon [and point out] any gross errors ... I'm do not have perfect understanding of string scanning and generators yet.) Will that be fast? Is there a faster algorithm that is obvious or some feature of Icon that I am missing? I hesitate to use coexpressions, since, for example, CAYNNNNRTG would produce 2^2 * 4^4 = 1024 results! From icon-group-sender Wed May 4 16:15:02 1994 Received: by cheltenham.cs.arizona.edu; Wed, 4 May 1994 15:36:16 MST Path: ucbvax!agate!howland.reston.ans.net!europa.eng.gtefsd.com!MathWorks.Com!news.kei.com!ub!galileo.cc.rochester.edu!rochester!rit!nmw1638 From: nmw1638@cs.rit.edu (Nicolas M Williams) Newsgroups: comp.lang.icon Subject: Re: Spitbol vs. Icon Message-Id: <1994May4.161502.9405@cs.rit.edu> Date: 4 May 94 16:15:02 GMT References: <1994May3.191711.12437@midway.uchicago.edu> Sender: news@cs.rit.edu (USENET News Admin) Organization: Rochester Institute of Technology, Rochester, NY Lines: 29 Nntp-Posting-Host: iowa Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu In article cheyenne@witsend.stortek.com (Cheyenne Wills) writes: >Actually -- if you want the pattern matching power of Snobol/Spitbol >and the "control" structures of Icon, you might want to look at Rebus >(available from the University of Arizona's anonymous FTP area I >believe in the icon/misc? snobol/??? directories). >Rebus is a hybrid language that takes Iconish control statements >(sorry no generators, co-expressions, etc.) and spits out Snobol >source code. It provides easy "access" to Snobol's pattern >matching facilities. What about Icon library routines for handling regular expressions? I'd love something like that, Icon would leave perl in the dust.... >Cheyenne Nick From icon-group-sender Wed May 4 15:36 MST 1994 Received: from cheltenham.cs.arizona.edu (cheltenham.CS.Arizona.EDU [192.12.69.60]) by owl.CS.Arizona.EDU (8.6.7/8.6.6) with SMTP id PAA08122 for ; Wed, 4 May 1994 15:36:34 -0700 Received: by cheltenham.cs.arizona.edu; Wed, 4 May 1994 15:35:18 MST Date: Wed, 4 May 94 15:18:09 CDT From: jeffery@ringer.cs.utsa.edu (Clinton L. Jeffery) Message-Id: <9405042018.AA01224@ringer.cs.utsa.edu.sunset> To: eschen@molbio.cbs.umn.edu Cc: icon-group@cs.arizona.edu In-Reply-To: "Art Eschenlauer"'s message of Wed, 4 May 94 13:47:52 CDT <9405041847.AA05442@molbio.cbs.umn.edu> Subject: pattern searching for molecular biology Status: R Errors-To: icon-group-errors@cs.arizona.edu Content-Type: text Content-Length: 731 I am sure there will be a lot of good suggestions in this group, so I'll limit myself to a couple quick thoughts. First of all, you may find it runs faster and uses less memory if you allow the built-in functions and operators (such as match()) do as much of your work for you as possible, instead of peeling off characters one at a time and doing a procedure call and a suspension for every character. By the way, s[1:2] is just a long-winded way of saying s[1]. Second, you may find it runs faster and uses less memory if you make more effective use of the data structures available to you--lists of strings, lists of lists, tables of tables--to encode some of what you are doing with the logic in all that handwritten code. From icon-group-sender Thu Apr 21 06:23:11 1994 Received: by cheltenham.cs.arizona.edu; Thu, 5 May 1994 10:47:37 MST Path: ucbvax!cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!news.moneng.mei.com!hookup!ames!ncar!noao!CS.Arizona.EDU!not-for-mail From: nevin@cs.arizona.edu (Nevin Liber) Newsgroups: comp.lang.icon Subject: Re: generate keys of a table? Message-Id: <2p564f$jpe@caslon.CS.Arizona.EDU> Date: 21 Apr 94 06:23:11 GMT References: Organization: University of Arizona CS Department, Tucson AZ Lines: 9 Nntp-Posting-Host: caslon.cs.arizona.edu Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu In article , Mike Haertel wrote: >Is there a way to enumerate keys of a table (not the entries)? Yes. The built in function key(T) will generate the keys in table T. -- Nevin ":-)" Liber nevin@cs.arizona.edu (602) 293-2799 +++ (520) after 3/95 office: (602) 621-1685 From icon-group-sender Thu May 5 13:47:56 1994 Received: by cheltenham.cs.arizona.edu; Thu, 5 May 1994 12:24:29 MST Date: Thu, 05 May 1994 13:47:56 -0600 (CST) From: Chris Tenaglia - 257-8765 Subject: Bueno Cinco de Mayo To: icon-group@cs.arizona.edu Message-Id: <01HBZCVUT89U8WWD9C@mis.mcw.edu> Organization: Medical College of Wisconsin (Milwaukee, WI) X-Vms-To: IN%"icon-group@cs.arizona.edu" Mime-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Status: R Errors-To: icon-group-errors@cs.arizona.edu For the Cinco de Mayo I'd like to offer a little Icon code segment. This one was developed for unix (namely ultrix 4.3 rev 44). Maybe it will work on some other unix too. I'd like to know. This program is called 'when'. It's like a date based ls command. Some have told me 'find' can do the same things, but I find find a bit arcane? So 'when' is what I use. Here are some samples : Csh% when before 4/12/92 files before a date Csh% when before 300 files older than an age Csh% when after 3/25 or younger than a date this year Csh% when before 2/1/94 and after 10/31/93 even a range More options and clauses are supported. Look at the code for clues. This one only works in the current directory. It also has an interesting property. Maybe this is just ultrix, maybe not, I'd like to know anyway... The interpreted version works fine, but the compiled version has a numeric overflow. That'll make for some fun debugging. I wrote it for myself as a tool to locate old files for archiving or deleting. Study and enjoy! Chris Tenaglia (System Manager) | "The past explained, Medical College of Wisconsin | the future fortold, 8701 W. Watertown Plank Rd. | the present largely appologized for." Milwaukee, WI 53226 | Organon to The Doctor (414)257-8765 | tenaglia@mis.mcw.edu # # file : when.icn # desc : date based ls command for unix # use : iconx when [to|before __] [from|since __] [asc | des] [long|brief] [do __] # brief output pipable to rm and others # long will include day age, but not protection mask # spec : ls -al layout : month@33:3 day@37:2 yr@41:2|current # # update by what # 06-apr-1994 tenaglia initial write # global base, # 1970 calculation baseline number today, # displacement from 12:00:01am today now, # upto the second mark for right now method, # ascending or descending order output, # long (ls -al) or brief (ls -1) style command, # optional command to do on each file files # list with files, sizes, and ages procedure main(param) calc_today() files := directory() method := "none" output := "long" command := "" if *param = 0 then show_age() every i := 1 to *param do { (option := param[i]) | break case option of { "to" | "before" | "until" : { files := before(files,param[i+1]) i +:= 1 } "from" | "since" | "after" : { files := since(files,param[i+1]) i +:= 1 } "asc" : method:="ascending" "des" : method:="descending" "long" : output:="long" "brief" : output:="brief" "do" : { every j := i+1 to *param do command ||:= param[j] || " " } default : 5 # stop("Unrecognized option :",option) } } show_age() end # # just show another ls with days old numbers & optionally sorts # procedure show_age() case method of { "none" : { every line := !files do { age := (today - parse(line,' ')[1]) / 86400 ks := parse(line,' ')[2] / 1024 file:= line[23:0] (command == "") | { write(command,line[37:0]) system(command || line[37:0]) next } if output == "brief" then text := line[37:0] else text:= right(age,6) || " days " || right(ks,6) || " kb | " || file write(text) } } "descending" : { results := sort(files) every line := !results do { age := (today - parse(line,' ')[1]) / 86400 ks := parse(line,' ')[2] / 1024 file:= line[23:0] (command == "") | { write(command,line[37:0]) system(command || line[37:0]) next } if output == "brief" then text := line[37:0] else text:= right(age,6) || " days " || right(ks,6) || " kb | " || file write(text) } } "ascending" : { results := sort(files) every i := *results to 1 by -1 do { line:= results[i] age := (today - parse(line,' ')[1]) / 86400 ks := parse(line,' ')[2] / 1024 file:= line[23:0] (command == "") | { write(command,line[37:0]) system(command || line[37:0]) next } if output == "brief" then text := line[37:0] else text:= right(age,6) || " days " || right(ks,6) || " kb | " || file write(text) } } default : 5 } end # # remove elements later than a date # procedure before(lst,days) static mtab initial mtab := [0,31,59,90,120,151,181,212,243,273,304,334] if find("/",days) then { mo := parse(days,'/')[1] da := parse(days,'/')[2] yr := parse(days,'/')[3] | parse(&date,'/')[1] if yr < 100 then yr +:= 1900 tmp := yr * 31557600 dd := mtab[mo] + da if ((yr % 4) = 0) & (mo > 2) then dd +:= 1 tmp+:= dd * 86400 age := tmp } else { age := now - (days * 86400) } work := [] every file := !lst do { old := parse(file,' ')[1] if old <= age then put(work,file) } return copy(work) end # # remove elements earlier than a date # procedure since(lst,days) static mtab initial mtab := [0,31,59,90,120,151,181,212,243,273,304,334] if find("/",days) then { mo := parse(days,'/')[1] da := parse(days,'/')[2] yr := parse(days,'/')[3] | parse(&date,'/')[1] if yr < 100 then yr +:= 1900 tmp := yr * 31557600 dd := mtab[mo] + da if ((yr % 4) = 0) & (mo > 2) then dd +:= 1 tmp+:= dd * 86400 age := tmp } else { age := now - (days * 86400) } work := [] every file := !lst do { old := parse(file,' ')[1] if old >= age then put(work,file) } return copy(work) end # # calculate today and now figures # procedure calc_today() static mtab initial { base := 1970*31557600 mtab := [0,31,59,90,120,151,181,212,243,273,304,334] } tmpy := parse(&date,'/')[1] tmpm := parse(&date,'/')[2] tmpd := parse(&date,'/')[3] here := tmpy * 31557600 + (mtab[tmpm] + tmpd) * 86400 if ((tmpy%4) = 0) & (tmpm > 2) then here +:= 86400 today := here now := here + parse(&clock,':')[1] * 3600 + parse(&clock,':')[2] * 60 + parse(&clock,':')[3] end # # convert a ls -al output into a list for sorting and printing # procedure directory() static mtab initial { mtab := table(0) mtab["Jan"] := 0 mtab["Feb"] := 31 mtab["Mar"] := 59 mtab["Apr"] := 90 mtab["May"] := 120 mtab["Jun"] := 151 mtab["Jul"] := 181 mtab["Aug"] := 212 mtab["Sep"] := 243 mtab["Oct"] := 273 mtab["Nov"] := 304 mtab["Dec"] := 334 } pipe := open("ls -al","pr") entries := [] every line := !pipe do { if any('dclst',line) then next # ignore info and dirs size := parse(line,' ')[4] file := line[33:0] day := mtab[parse(line,' ')[5]] + parse(line,' ')[6] year := if line[40] == " " then parse(line,' ')[7] else parse(&date,'/')[1] sec := if line[40] == " " then 0 else hhmm(parse(line,' ')[7]) mark := year * 31557600 + day * 86400 + sec if (now-mark) < 0 then mark -:= 31557600 text := right(mark,12) || right(size,10) || " " || file put(entries,text) } close(pipe) return entries end # # convert hh:mm into seconds since midnight # procedure hhmm(str) hh := str[1+:2] mm := str[4+:2] return hh*3600 + mm*60 end # # parse a string into a list with respect to a delimiter # procedure parse(line,delims) static chars chars := &cset -- delims tokens := [] line ? while tab(upto(chars)) do put(tokens,tab(many(chars))) return tokens end From icon-group-sender Fri May 6 03:45:21 1994 Received: by cheltenham.cs.arizona.edu; Fri, 6 May 1994 08:10:48 MST Path: ucbvax!agate!ihnp4.ucsd.edu!swrinde!ringer!jeffery From: jeffery@ringer.cs.utsa.edu (Clinton L. Jeffery) Newsgroups: comp.lang.icon Subject: Re: help Message-Id: <1994May6.034521.10430@ringer.cs.utsa.edu> Date: 6 May 94 03:45:21 GMT References: Distribution: inet Organization: Univ of Texas at San Antonio Lines: 16 Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu > From article , by srhee@asc.upenn.edu (JUNE WOONG RHEE): > Status: R > Or is there any FRQ about these kinds of language around here? We have an Icon FAQ, but it is a closely guarded secret and we would never dream of inadvertently posting it 323+ times to multiple newsgroups in one-minute intervals! ;^) Seriously though, I hope the FAQ appears again some day -- once in *rare* while, posted by hand or whatever... :-) But until that day, perhaps someone will mail you the FAQ (I figure you'll get about 323 copies by e-mail from various folks, but if no-one sends it to you, send me a note and I'll send you a copy). -- Clint Jeffery cjeffery@cs.arizona.edu, jeffery@ringer.cs.utsa.edu The University of Texas at San Antonio From icon-group-sender Fri May 6 16:03:38 1994 Received: by cheltenham.cs.arizona.edu; Fri, 6 May 1994 12:53:55 MST Path: ucbvax!agate!howland.reston.ans.net!usc!nic-nac.CSU.net!news.Cerritos.edu!news.Arizona.EDU!math.arizona.edu!CS.Arizona.EDU!not-for-mail From: icon-project@cs.arizona.edu Newsgroups: comp.lang.icon,comp.answers,news.answers Subject: Icon Programming Language FAQ Message-Id: <2qdpoq$od2@optima.cs.arizona.edu> Date: 6 May 94 16:03:38 GMT Sender: icon@cs.arizona.edu Reply-To: icon-project@cs.arizona.edu Followup-To: comp.lang.icon Organization: University of Arizona CS Department, Tucson AZ Lines: 402 Approved: news-answers-request@MIT.Edu Nntp-Posting-Host: optima.cs.arizona.edu Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu Archive-name: comp-lang-icon-faq Frequently Asked Questions About The Icon Programming Language last updated: 03/04/94 This FAQ answers various questions about the Icon programming language, ranging from what it is to how you can get it. This first version of the Icon FAQ is devoted to the issues that are likely to be of most interest to persons who don't know anything about Icon or who are relatively new to it. Future versions of this FAQ will answer questions from more experienced Icon programmers. This FAQ is written by Ralph Griswold with help from Cliff Hathaway, Clint Jeffery, and Gregg Townsend. Section I -- General Questions: I.1. What is Icon? I.2. What is Icon good for? I.3. Where did Icon come from? I.4. What does "Icon" stand for? I.5. On what computers does Icon run? I.6. Who did all these implementations? I.7. Are there other implementations in the works? I.8. Are there different versions of Icon? I.9. Which implementations of Icon have graphics/window capabilities? I.10. Where can I get Icon? I.11. Where can I get documentation about Icon? I.12. What is the Icon Project? I.13. Where can I find examples of Icon programs? I.14. What is Idol? I.15. How often is material in Icon's FTP area updated? I.16. How do I stay up to date with what's going on with Icon? I.17. Why isn't the Icon Newsletter available electronically? I.18. Is there a users' group for Icon? I.19. How do I get technical support? I.20. Is there an optimizing compiler for Icon? I.21. What do I need to run the interpreter? I.22. What do I need to run the compiler? I.23. Can I build my own implementation of Icon for a new platform? +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ I.1. What is Icon? Icon is a very high level general-purpose programming language with extensive features for processing strings (text) and data structures. Icon is an imperative, procedural language with a syntax that is reminiscent of C and Pascal, but its semantics are at a much higher level than those languages. Icon has a novel expression-evaluation mechanism that integrates goal- directed evaluation and backtracking with conventional control structures. It has a string scanning facility for pattern matching that avoids the tedious details usually associated with analyzing strings. Icon's built-in data structures include sets and tables with associative lookup, lists that can be used as vectors or stacks and queues, and records. Icon is a strongly, though not statically, typed language. It provides transparent automatic type conversion. For example, if an integer is used in an operation that requires a string, the integer is automatically converted to a string. Several implementations of Icon have high-level graphics facilities with an easily programmed window interface. Icon manages storage automatically. Objects are created as needed during program execution and space is reclaimed by garbage collection as needed. The sizes of strings and data structures are limited only by the amount of available memory. I.2. What is Icon good for? As a general-purpose programming language with a large computational repertoire, Icon can be used for most programming tasks. It's at its best when used as a prototyping tool, for processing text, and when ease of programming is needed for experimental and research applications. Paradoxically, Icon is used most often for short, one-shot tasks and for very complex applications. Icon is designed to make programming easy; it emphasizes the value of programmer's time and the importance of getting programs to work quickly. This explains its usefulness for prototyping as well as the apparent paradox of applicability to simple and complex applications. I.3. Where did Icon come from? Icon is the latest in a series of high-level programming languages designed to facilitate programming tasks involving strings and structures. The original language, SNOBOL, was developed at Bell Telephone Laboratories in the early 60s. SNOBOL evolved into SNOBOL4, which is still in use. Subsequent languages were developed at The University of Arizona with support from the National Science Foundation. Incidentally, Icon bears little physical resemblance to SNOBOL4, although it has similar objectives and many similar capabilities. I.4. What does "Icon" stand for? The name Icon (which is not spelled ICON) is not an acronym nor does it stand for anything in particular, although the word iconoclastic was mentioned at the time the name was chosen. The name predates the now common use of "icon" to refer to small images used in graphical user interfaces. This latter usage sometimes causes persons to think mistakenly that Icon is designed to create or manipulate icons. There's not much that can be done about this. I.5. On what computers does Icon run? The implementation of Icon is highly portable. There are versions for the Acorn Archimedes, the Amiga, the Atari ST, IBM CMS and MVS, the Macintosh, MS-DOS, OS/2, UNIX, and VMS. Nearly 60 UNIX platforms are supported. Icon programs also are highly portable. Most Icon programs can run on any platform that supports Icon. I.6. Who did all these implementations? The original implementation of Icon for UNIX was done at The University of Arizona. Most of the other implementations originally were done by volunteers scattered around the world. It's worth noting that all implementations of Icon are based on the same source code, which is written in C. This contributes to the portability of Icon itself, as well as to the portability of programs written in Icon. I.7. Are there other implementations in the works? Yes, work is constantly underway on implementations of Icon for new platforms. Present projects include Windows NT, Win32, the DEC Alpha running under UNIX, and a new Macintosh implementation. I.8. Are there different versions of Icon? Icon has evolved through a series of versions with improved and extended capabilities. The latest major version number is 8. Recent changes and additions, notably in the graphics area, have brought the current level to 8.10. (Version 8.11 is, of course, in the works.) Most implementations are up to 8.10, although a few for less frequently used platforms are still at 8.0. Almost all 8.0 programs will run under 8.10. I.9. Which implementations of Icon have graphics/window capabilities? Icon's graphics facilities presently are supported on the OS/2, UNIX, and VMS implementations. The UNIX and VMS implementations use X, while the OS/2 implementation uses Presentation Manager. The NT, Win32, and DEC Alpha implementations that are in progress will support Icon's graphics facilities. A Macintosh implementation to support graphics also is in the works. I.10. Where can I get Icon? Most implementations of Icon are available via anonymous FTP to cs.arizona.edu in /icon. The directory /icon/binaries contains executable versions of Icon for several systems, including several popular UNIX platforms. The directory /icon/packages contains source code and related material. All directories have READ.ME files with additional information. Icon also is available on a variety of physical media for prices ranging from $15 to $50. Contact: Icon Project Department of Computer Science The University of Arizona Tucson, AZ 85721 602-621-8448 (voice) 602-621-4246 (fax) icon-orders@cs.arizona.edu (e-mail) Request a copy of the Icon Newsletter for a listing of what's available and what the prices are. Purchases can be made by credit card (MasterCard, Visa, or Discover) or by check drawn on a bank with a branch in the United States and made payable to The University of Arizona. I.11. Where can I get documentation about Icon? The definitive work on Icon is the book The Icon Programming Language, Griswold and Griswold, Prentice-Hall, 1990, 368 pages, ISBN 0-13-447889-4. This book is a complete description and reference manual for Version 8 of Icon. There also is a book on the implementation of Icon: The Implementation of the Icon Programming Language, Griswold and Griswold, Princeton University Press, 1986, 336 pages, ISBN 0-691-08431-9. This book describes the implementation as of Version 6 of Icon. Although the implementation has changed somewhat since then, the basic structure is the same. Technical reports describing recent implementation changes are included with books purchased from the Icon Project. These books are available from the Icon Project or from any book store that handles special orders. Additional documentation is available via FTP in /icon/doc. Notable documents are: TR 90-6 an overview of Icon TR 93-9 graphics/window facilities IPD212 changes between Versions 8.0 and 8.10 There are manual pages for UNIX systems, but there is no complete on-line documentation. The Icon Newsletter, which includes topical material about Icon and a list of material available from the Icon Project, is published three times a year. Subscriptions are free; contact the Icon Project to get a copy of the latest Newsletter and to be put on the mailing list. The Icon Analyst, a technically oriented newsletter that features articles about programming, is published six times a year. There is a subscription fee for the Analyst. A sample copy is available on request. All back issues of both newsletters are available for purchase. I.12. What is the Icon Project? The Icon Project is a name used by the group at The University of Arizona that develops, implements, distributes, and supports the Icon programming language. The Icon Project is not commercial organization. It derives support from The University of Arizona, grants, and (primarily) revenue from the sale of program material and documentation. I.13. Where can I find examples of Icon programs? There is a large program library for Icon. It is an excellent resource for both new and experienced programmers, containing numerous examples of how to do things with Icon. The library also provides many useful applications, as well as hundreds of procedures that supplement Icon's built-in repertoire. The library, like other Icon material, is available via FTP (cd /icon/library) and on physical media from the Icon Project. I.14. What is Idol? Idol is an object-oriented extension to Icon that provides concepts such as classes and multiple inheritance. Idol is written in Idol and is distributed as part of the Icon program library. Idol runs on almost all of the platforms that Icon runs on. Additional Idol information is available from Clint Jeffery, jeffery@ringer.cs.utsa.edu. I.15. How often is material in Icon's FTP area updated? New material is added when it's available. Established implementations usually are only updated when there's a major new release. This typically is every year or two. The Icon program library is updated on a similar schedule. I.16. How do I stay up to date with what's going on with Icon? The best way to find out about developments related to Icon is to subscribe to the Icon Newsletter. It's free, but it is distributed only by postal mail, so you must provide a mailing address. You can stay up to date on the source code, which is changed much more frequently than the version on FTP is updated, by subscribing to the source update service, which provides a new version about three times a year. There also is a subscription service for updates to the Icon program library, which provides new material three or four times a year. See the Icon Newsletter for information about subscribing to these services. I.17. Why isn't the Icon Newsletter available electronically? The Icon Newsletter contains diagrams, images, and other material that cannot be rendered in plain ASCII text. The Newsletter is prepared with a desktop publishing system that produces PostScript, but the files are enormous -- too large to include in the Icon FTP area. Selected articles from the Newsletter are available by FTP in /icon/doc/articles. I.18. Is there a users' group for Icon? There is no official Icon users' group. The Icon Project maintains an electronic mailing list, icon-group@cs.arizona.edu. Mail sent to this address is forwarded to subscribers. To subscribe (or unsubscribe), send a message to icon-group-request@cs.arizona.edu. There is a gateway between icon-group and comp.lang.icon, an unmoderated newsgroup for discussing issues related to Icon. The gateway, which exchanges messages between the two systems, is imperfect and not under the control of the Icon Project. The newsgroup generally provides faster response than the mailing list. The newsgroup is less intrusive, but it sometimes suffers from inappropriate postings. The Icon Project usually sends messages of interest to the Icon community to icon-group. I.19. How do I get technical support? Free technical support is available from the Icon Project via electronic mail to icon-project@cs.arizona.edu or by fax, telephone, and postal mail to the Icon Project as listed above. Since the Icon Project is not a commercial organization, support is limited to what it can provide with its available resources. If the Icon Project cannot help with a problem (such as for a platform it doesn't have), it will attempt to provide a contact with someone who can help. I.20. Is there an optimizing compiler for Icon? Yes. The original implementation was an interpreter. An optimizing compiler was added a few years ago. The interpreter and compiler are largely source-language compatible. The interpreter is used by most Icon programmers because it gets into execution quickly and runs fast enough for most applications. The compiler is best suited for applications that require the fastest possible execution time. In this case, it's generally best to develop the program using the interpreter and then compile the final result for production use. I.21. What do I need to run the interpreter? The Icon interpreter will run on most computers. It requires a reasonable amount of memory, however. Under MS-DOS, the Icon interpreter needs 500KB of application RAM to work well. I.22. What do I need to run the compiler? The Icon compiler is another matter. It requires a C compiler, a fast CPU for tolerable compilation times, a considerable amount of disk space, and a lot of memory -- at least several megabytes. The Icon compiler generates C code, which must then be compiled to produce an executable program. The flexibility that Icon provides to programmers makes compilation technically difficult and the process requires a large amount of memory. The C code it produces is voluminous and stresses the most robust C compilers. Generally speaking, the Icon compiler is practical for platforms in the workstation class but not for most personal computers. Although the compiler can be built and made to run on 286 platforms running standard MS-DOS, only trivially small programs can be compiled. In principle, the Icon compiler is practical on MS-DOS 386/486 platforms with extended memory, but the limited availability of suitable 32-bit C compilers for this environment has discouraged the use of the Icon compiler on such platforms. I.23. Can I build my own implementation of Icon for a new platform? As mentioned above, Icon is written in C and the source code is available via FTP and the Icon Project. The existing implementations are testament to its portability. (a small amount of assembly-language code is required for a context switch, but this is only needed for an optional feature -- co-expressions -- that can be disabled without affecting most of Icon.) New ports involve platform-specific configuration parameters and, in some cases, platform-specific code. The feasibility of a new port and the amount of work it may take depends on the platform -- its architecture, its C compiler, and its environment. Ports to new UNIX platforms generally are easy, although novel architecture may present problems. Ports to new operating systems generally are more difficult, especially if Icon's graphics facilities are implemented. The Icon Project provides what help it can with new ports. In return, it asks that code related to the port to be returned to the Icon Project for inclusion in future versions of the source code for Icon. This makes the new port available to others as well as to the porter when Icon is updated. From icon-group-sender Fri May 6 14:05:23 1994 Received: by cheltenham.cs.arizona.edu; Fri, 6 May 1994 13:58:54 MST From: "Art Eschenlauer" Message-Id: <9405061905.AA21241@molbio.cbs.umn.edu> Subject: Call for alpha testers of IClip 0.1 for Mac To: icon-group@cs.arizona.edu Date: Fri, 6 May 94 14:05:23 CDT X-Mailer: ELM [version 2.3test PL26] Status: RO Errors-To: icon-group-errors@cs.arizona.edu I am looking for volunteers to test/try/use IClip, a derivative of the stand-alone Macintosh version of Icon version 8. The idea is that I wanted a way to use the superb filtering capabilities of Icon in a relatively mac-like way from all applications. IClip reads standard input from the Mac Clipboard, applies an icon program to it, and writes it back to the clipboard. The Icon programs used are simply very-slightly-modified ICOD files, the ones iconx uses in the stand-alone Icon version 8. (The modification is that the creator is changed from Iconx to IClip.) Thus, new routines can be built and debugged with the standalone package and then converted to IClip format AFTER they have been translated. All I do is put the files in my Apple menu items folder (under system 7). When I want to use them, I simply copy the text I want filtered to the clipboard from whatever application I am running (e.g., MSWord), select the filter program off the apple menu and paste the result whereever I want it. Ultimately, this will form the core for a set of frequently needed molecular biology routines (translating mRNA sequence into protein sequence, determining complementary sequences, formatting sequences for publication, etc.) which are easy to write in Icon (a lot easier than in C, I must say!). Version 0.1 alpha is up and running and hasn't crashed yet. If you are inter- ested in using Icon on your mac for filtering tasks, i.e., without input from the keyboard, send me email at eschen@molbio.cbs.umn.edu. Also, if you know about cool molecular biology routines in Icon that I could or should convert, please let me know. Thanks. - Art Eschenlauer From icon-group-sender Sat Apr 23 18:17:32 1994 Received: by cheltenham.cs.arizona.edu; Sun, 8 May 1994 22:07:02 MST Path: ucbvax!cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!darwin.sura.net!hearst.acc.Virginia.EDU!murdoch!murdoch.acc.virginia.edu!mwb5y From: mwb5y@cs.virginia.edu (Mark Bailey) Newsgroups: comp.lang.icon Subject: Icon and parsers Message-Id: Date: 23 Apr 94 18:17:32 GMT Sender: usenet@murdoch.acc.Virginia.EDU Organization: Computer Science Department, University of Virginia Lines: 11 Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu Does anyone know of a robust (for the most part) parser generator package for Icon that works in much the same way as yacc? I've already got a yacc grammar that I'd rather not take much time to convert over (recursive decent won't do). Thanks in advance, -mwb -- Mark Bailey (mark@virginia.edu) Computer Science, University of Virginia From icon-group-sender Mon May 9 07:25:45 1994 Received: by cheltenham.cs.arizona.edu; Mon, 9 May 1994 08:35:53 MST Path: ucbvax!agate!spool.mu.edu!sgiblab!munnari.oz.au!newsroom.utas.edu.au!cam!lawson!dting From: dting@lawson.its.utas.edu.au (Donald Chung Ling Ting) Newsgroups: comp.lang.icon Subject: get icon Message-Id: <1994May9.072545.23194@cam.compserv.utas.edu.au> Date: 9 May 94 07:25:45 GMT Sender: news@cam.compserv.utas.edu.au Organization: University of Tasmania Lines: 4 Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu Hi could someone there teel me where can I get the icon file from ? or the software which can convert the *.bmp file to *.ico file ? thanks very much for that !!! From icon-group-sender Sat May 7 17:33:23 1994 Received: by cheltenham.cs.arizona.edu; Mon, 9 May 1994 08:36:17 MST Path: ucbvax!agate!howland.reston.ans.net!europa.eng.gtefsd.com!darwin.sura.net!udel!rochester!rit!nmw1638 From: nmw1638@cs.rit.edu (Nicolas M Williams) Newsgroups: comp.lang.icon Subject: Re: Regular expressions & dynamic linking (was Re: Spitbol vs. Icon) Message-Id: <1994May7.173323.3010@cs.rit.edu> Date: 7 May 94 17:33:23 GMT References: <1994May5.223307.19549@cs.rit.edu> Sender: news@cs.rit.edu (USENET News Admin) Organization: Rochester Institute of Technology, Rochester, NY Lines: 76 Nntp-Posting-Host: iowa Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu In article cheyenne@witsend.stortek.com (Cheyenne Wills) writes: >In <1994May5.223307.19549@cs.rit.edu>, nmw1638@cs.rit.edu (Nicolas M Williams) writes: >>In article cheyenne@witsend.stortek.com (Cheyenne Wills) writes: >Hmmm.... well... >One of Icon's design goals was (is) to provide a language that is >fairly easily read. While one can write unreadable code in any language, >some languages lend themselves to being more unreadable then others. Heh, sure, look, there are single characters that have a lot of meaning in Icon, where their meaning depends on the situation (e.g. / and \). Plus recursive generators can be hard to figure out. No, Icon can be very cryptic, which I in particular don't mind very much, after all, I'm used to C and awk and sed and.... >Regular expressions are themselves a fullblown language, they have >their place. They can complement Icon, see below. >I'm not saying that adding regular expressions to Icon is bad (or good), >I'm just tring to say that with Icon, one can achive the same end result >with existing facilities. In addition, Icon provides some facilities >that just are not possible under regexps (try extracting "balanced >strings" -- "(3+4*(5+6)*(10+11))". With regexps the best you can do >with the above is: "(3+4*(5+6)". Right, now imagine (I haven't seen the regexp library yet) a function that returns the position of the subject string that marks the first character of a string matched by a regexp, and another function that returns the last character of said string provided you give it the position of the first character of the matched string. That would fit in quite well into the string scanning environment of Icon. I want regexps not because they are good enough (which they are not), but because they can simplify a lot of tasks. > In addition a programmer can extend >string pattern matching with their own functions, something that one >cannot do with regexps. Once a useful pattern matching function >has been built, one can save it for use later without having to >reinvent it all over. If I need a pattern to match labels, I have >an Icon function already coded that will do that. If I need a pattern >to match "real numbers", I already have that, etc. Yes, indeed, I have done this. So? Replacing a well commented regexp is not that hard; I've done that too. >Maintainability is always an issue. Even "throw-a-way" code has a >tendancy to live a life longer then the author may have intended. Yes, but regexps are seldom huge (several lines long), and if their actions are well commented, replacing that regexp with another one is not very hard. Yes, there is a maintainability issue, but I claim that it is not crucial, not as crucial as the maintainability of pages of C (or Icon for that matter) code. >regexp "package" in the Icon Program Library. Ok, I'd never been able to find the Icon libs, but I just did (archie IPL), so I'll be looking through that as soon as I can get the time. >Cheyenne >+--------------------------------------+---------------------------------+ >| +-----+ | Cheyenne Wills | >| | | "From here on up it is | Storage Technology Corporation | >| | +--+--+ downhill all the way" | 2270 South 88th St. | >| | | | | | Louisville, Co. 80028-4232 | >| +--+--+ | These are not the | | >| | | opinions or views of | Cheyenne_Wills@stortek.com | >| +-----+ Storage Technology | cheyenne@witsend.stortek.com | >+--------------------------------------+---------------------------------+ > Nick From icon-group-sender Mon May 9 22:16:03 1994 Received: by cheltenham.cs.arizona.edu; Mon, 9 May 1994 23:45:07 MST Path: ucbvax!hplabs!sdd.hp.com!hp-pcd!news!edmoore From: edmoore@vcd.hp.com (Ed Moore) Newsgroups: comp.lang.icon Subject: Icon for Unix scripts? Message-Id: Date: 9 May 94 22:16:03 GMT Sender: news@vcd.hp.com (News user) Organization: Hewlett-Packard VCD Lines: 41 Nntp-Posting-Host: hpvcledm.vcd.hp.com X-Newsreader: TIN [version 1.2 PL1.4] Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu I know nothing of Icon except what I read today in the FAQ. I need a better way than ksh to create Unix shell scripts. I had come to believe that method is perl. My knowledge of perl consists of a couple of hours reading of "Learning Perl". Maybe I should consider Icon instead of perl. From the FAQ: : Icon is a very high level general-purpose programming language with : extensive features for processing strings (text) and data structures. This sounds vaguely like perl. : Icon is an imperative, procedural language What does imperative means in this context? : It has a string scanning facility for pattern matching that avoids : the tedious details usually associated with analyzing strings. Better than perl's? : Several implementations of Icon have high-level graphics facilities with : an easily programmed window interface. Now this is what got my attention! I need a way to create a simple, graphical interface to a Unix script. The script would open a window showing all arguments for the script. Each argument would have two or more options. A default option would be shown for some arguments. Options would be chosen with mouse picks. Choosing an option would mark it in the window and unmark any conflicting options. The window would have a file scroll table from which multiple files could be selected with the mouse. Finally, the window would have a Do-It button to execute the action of the script. Can Icon fill this role? We run on HP-UX systems with X Windows. Thanks for any help you can give me. -- Ed Moore Hewlett-Packard Vancouver, WA, USA edmoore@vcd.hp.com From icon-group-sender Tue May 10 12:21:22 1994 Received: by cheltenham.cs.arizona.edu; Tue, 10 May 1994 12:20:19 MST From: "Art Eschenlauer" Message-Id: <9405101721.AA02391@molbio.cbs.umn.edu> Subject: IconImplementQues: WhenShouldIPollKeyboardForInterrupt To: icon-group@cs.arizona.edu (icon-group@cs.arizona.edu) Date: Tue, 10 May 94 12:21:22 CDT X-Mailer: ELM [version 2.3test PL26] Status: R Errors-To: icon-group-errors@cs.arizona.edu I am modifying the source code for mac standalone icon version 8. I would like to poll the keyboard frequently to see if the user is trying to interrupt the process (for instance, to get out of an infinite loop...). I suppose that I want some routine that is called fairly regularly, like at the end of every statement (for my use, polling only on input or output is not sufficient). What C function is called in the interpreter for every statement? Should I poll the keyboard when that function is called or in the loop in the calling function or doesn't it matter? (If the answer is the second choice, what is the calling function?) I can probably figure this out on my own, but I thought that I'd ask lest I miss something obvious or not so obvious. - Art Eschenlauer From icon-group-sender Tue May 10 13:18:43 1994 Received: by cheltenham.cs.arizona.edu; Tue, 10 May 1994 15:00:42 MST Date: Tue, 10 May 94 13:18:43 PDT From: kwalker@sirtur.premenos.com (Ken Walker) Message-Id: <9405102018.AA11126@sirtur.premenos.com> To: eschen@molbio.cbs.umn.edu Subject: Re: IconImplementQues: WhenShouldIPollKeyboardForInterrupt Cc: icon-group@cs.arizona.edu X-Sun-Charset: US-ASCII Content-Length: 767 Status: R Errors-To: icon-group-errors@cs.arizona.edu > From: "Art Eschenlauer" > > I am modifying the source code for mac standalone icon version 8. I would > like to poll the keyboard frequently to see if the user is trying to > interrupt the process (for instance, to get out of an infinite loop...). There is a function pollevent() used in windowing versions of Icon. Presently it is under control of "#define Polling" which in turn is under control of "#define XIcon". I think you can turn on Polling independant of XIcon and supply your own pollevent() function, but I haven't tried it. I'm not sure how this will fit with a future version of Icon that does windowing on the MAC; you might have to do some reorganization of the code at that point. Ken Walker, kwalker@premenos.com From icon-group-sender Tue May 10 15:19:18 1994 Received: by cheltenham.cs.arizona.edu; Tue, 10 May 1994 18:04:45 MST Message-Id: To: icon-group@cs.arizona.edu Subject: Incrementally loading implementations? From: Perry The Cynic Date: Tue, 10 May 94 15:19:18 PDT Sender: perry@sutr.cynic.org Status: R Errors-To: icon-group-errors@cs.arizona.edu I would like to know how hard it would be to incrementally load ICON binary files (esp. the .u[12] type files for the interpreter). Has anyone done this? Has anyone tried and found it too hard? Background: I am designing a distributed system where code fragments ("packages") must migrate between systems, to be "plugged in" at the destination system and run with relatively low overhead. An important requirement for such "migrant code" is of course independence from the host architecture and system, which makes the ICON .u[12] formats look rather appealing. Anybody? Thanks -- perry --------------------------------------------------------------------------- Perry The Cynic perry@cynic.org To a blind optimist, an optimistic realist must seem like an Accursed Cynic. --------------------------------------------------------------------------- From icon-group-sender Tue May 10 22:49:27 1994 Received: by cheltenham.cs.arizona.edu; Tue, 10 May 1994 18:05:15 MST Path: ucbvax!hplabs!sdd.hp.com!hp-pcd!news!edmoore From: edmoore@vcd.hp.com (Ed Moore) Newsgroups: comp.lang.icon Subject: Re: Icon for Unix scripts? Message-Id: Date: 10 May 94 22:49:27 GMT References: Sender: news@vcd.hp.com (News user) Organization: Hewlett-Packard VCD Lines: 5 Nntp-Posting-Host: hpvcledm.vcd.hp.com X-Newsreader: TIN [version 1.2 PL1.4] Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu Thanks to all who replied, including four by mail. All are helpful. In the years I've been posting queries in USENET, this is the fastest I've ever received so many useful replies. The consensus is that I should be looking at Tcl/Tk, nor Icon or perl. So I've installed Tcl/Tk and am now running through the demo exercises. I think it is what I need. From icon-group-sender Wed May 11 03:33:55 1994 Received: by cheltenham.cs.arizona.edu; Wed, 11 May 1994 08:29:54 MST Date: Wed, 11 May 94 03:33:55 CDT From: jeffery@ringer.cs.utsa.edu (Clinton L. Jeffery) Message-Id: <9405110833.AA18491@ringer.cs.utsa.edu.sunset> To: perry@cynic.org Cc: icon-group@cs.arizona.edu In-Reply-To: Perry The Cynic's message of Tue, 10 May 94 15:19:18 PDT Subject: Incrementally loading implementations? Content-Length: 1047 Status: R Errors-To: icon-group-errors@cs.arizona.edu I would like to know how hard it would be to incrementally load ICON binary files (esp. the .u[12] type files for the interpreter). Has anyone done this? Has anyone tried and found it too hard? Icon 8.10 and above come with a facility I wrote (turned off by default; an experimental research product so far) that allows entire icode files to be loaded as co-expressions; it sounds like you want not just dynamic *loading* but also dynamic *linking* which will require further modifications to Icon to make various global data areas (the global variables, the record field table, etc) extensible as new code is loaded and linked in. It is not un-doable (SmallTalk does it--it must be easy (just kidding)) and I would love to see it. On the other hand, it would require intimate knowledge of portions of the interpreter code, so its not a casual project. I've thought about it a fair amount and would be happy to advise you on it. Clint Jeffery cjeffery@cs.arizona.edu, jeffery@ringer.cs.utsa.edu The University of Texas at San Antonio From icon-group-sender Thu May 12 18:29:48 1994 Received: by cheltenham.cs.arizona.edu; Fri, 13 May 1994 07:27:47 MST Subject: Re: Incrementally loading implementations? To: icon-group@cs.arizona.edu Date: Thu, 12 May 1994 18:29:48 -0600 (CDT) In-Reply-To: <9405110833.AA18491@ringer.cs.utsa.edu.sunset> from "Clinton L. Jeffery" at May 11, 94 03:33:55 am X-Mailer: ELM [version 2.4 PL21] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1342 Message-Id: <9405122329.AA10047@rcmcon.com> From: whm@rcmcon.com (William Mitchell) Status: R Errors-To: icon-group-errors@cs.arizona.edu > > I would like to know how hard it would be to incrementally load > ICON binary files (esp. the .u[12] type files for the interpreter). > Has anyone done this? Has anyone tried and found it too hard? As a grad school project (c. 1984) I took a version of Unipress Emacs and embedded Icon in it alongside MLisp. One could write Icon programs that used MLisp primitives or vice-versa. It had the ability to load Icon binary files and merge globals into the existing namespace. That portion of it was really no big deal to do. I think I used a new type of heap object and had the list of globals in it. When a file was loaded, I'd allocate a new whatever it was and put the new list of globals in it. I took the major shortcut of keeping translation and linking external to "ice", as I called it. There was a U of A CS department TR on it, but I've forgotten the number (unless it's 84-8) and it's probably out of print anyway. /------------------------------\ /----------------\ / William H. Mitchell \ / 7120 E. Kiva Way \ / Mitchell Software Engineering \o----/ Tucson, AZ, 85715 \ \ Consulting/Development/Training / \ 602-577-6431 / \ OO Methods/C++/Icon/UNIX / \ whm@mse.com / \------------------------------/ \----------------/ From icon-group-sender Sat May 14 07:45:39 1994 Received: by cheltenham.cs.arizona.edu; Sat, 14 May 1994 10:06:26 MST Date: Sat, 14 May 1994 07:45:39 -0600 (CST) From: Chris Tenaglia - 257-8765 Subject: X-icon for Friday 13 To: icon-group@cs.arizona.edu Message-Id: <01HCBLC3VIUQ8WWR6B@mis.mcw.edu> Organization: Medical College of Wisconsin (Milwaukee, WI) X-Vms-To: IN%"icon-group@cs.arizona.edu" Mime-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Status: R Errors-To: icon-group-errors@cs.arizona.edu For Friday the 13th I'd like to post a little something for those with a little bit of superstition. This is a biorythm plotter. I thought it was a good excersize for X programming. I may not have a full understanding of the cycles but basically it it plots out 3 sine waves given a birthdate and year. It's not bulletproof but it does multiple windows, and even has a different mouse cursor for each window. This was written in Icon V8.10 and tested on VAX/VMS 5.5 and Ultrix unix 4.3. It isn't the best sample of Icon programming practice (I like global variables), but maybe it'll spurr some ideas. Enjoy! (I'm sending to the list too since I'm not sure if the postnews was working) # # file : bior.icn # desc : for those with biorythm superstition # # update by what # 12-may-1994 tenaglia initial write # global xw1,xw2, # display windows Birth_Date, # birth date Plot_Year, # month to plot age # days old # # main line procedure # procedure main() get_birth_date_and_plot_month() draw_picture() end # # draw the graph and plot the waveforms # procedure draw_picture() names := ["JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE", "JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER"] shifts := [0,31,60,91,121,152,182,213,244,274,305,335] pi := 3.1415927 pi2 := pi*2.0 sumcolor := "pink" (xw2 := open("BIOR " || Plot_Year || " VIA " || Birth_Date,"x", "bg=black","fg=white", "geometry=1098x200+50+500")) | { write("Can't open window. Press ") stop("ABEND ANOX") } write(xw1,"") XAttrib(xw2,"pointer=heart") XAttrib(xw1,"fg=red") write(xw1," PHYSIO") XAttrib(xw1,"fg=green") write(xw1," EMOTA") XAttrib(xw1,"fg=yellow") write(xw1," INTELLA") XAttrib(xw1,"fg=" || sumcolor) write(xw1," SUMUM") XAttrib(xw1,"fg=white") XSync(xw1) XDrawLine(xw2,0,100,1098,100) every n := 2 to *shifts do { disp := shifts[n]*3 XDrawLine(xw2,disp,0,disp,200) } a := 1 every n := 5 to 1095 by 91 do { XDrawString(xw2,n,10,names[a]) a +:= 1 } every begin := !shifts do { every base := 5 to 25 by 5 do { disp := begin * 3 + base * 3 XDrawLine(xw2,disp,95,disp,105) } } oldx := 0 x := 0 magn := 34 oldyp := sin((age%23)*pi2/23)*magn + 200 oldye := sin((age%28)*pi2/28)*magn + 200 oldyi := sin((age%33)*pi2/33)*magn + 200 oldyy :=(sin((age%23)*pi2/23) + sin((age%28)*pi2/28) + sin((age%33)*pi2/33))*magn + 100 every point := age to age + 365 do { yp := sin((point%23)*pi2/23)*magn + 100 ye := sin((point%28)*pi2/28)*magn + 100 yi := sin((point%33)*pi2/33)*magn + 100 yy :=(sin((point%23)*pi2/23) + sin((point%28)*pi2/28) + sin((point%33)*pi2/33))*magn + 100 XAttrib(xw2,"fg=red") XDrawSegment(xw2,oldx,oldyp,x,yp) XAttrib(xw2,"fg=green") XDrawSegment(xw2,oldx,oldye,x,ye) XAttrib(xw2,"fg=yellow") XDrawSegment(xw2,oldx,oldyi,x,yi) XAttrib(xw2,"fg=" || sumcolor) XDrawSegment(xw2,oldx,oldyy,x,yy) XSync(xw2) oldyp := yp oldye := ye oldyi := yi oldyy := yy oldx := x x +:= 3 } XAttrib(xw2,"fg=white") write("Click the Button!") press := open("Respond Please","x", "geometry=200x50+500+350","fg=black","bg=green") XAttrib(press,"pointer=leftbutton") XDrawString(press,20,30,"Click Me to finish ") XEvent(press) close(press) close(xw1) close(xw2) end # # obtain starting information # procedure get_birth_date_and_plot_month() (xw1 := open("BIOR","x", "bg=black","fg=white", "lines=12","columns=40")) | { write("Can't open window. Press ") stop("#1 ABEND ANOX") } XAttrib(xw1,"pointer=exchange") XGotoRC(xw1,1,1) write(xw1,"Enter Dates") XGotoRC(xw1,3,1) write(xw1,"BirthDate MM/DD/YYYY:") XGotoRC(xw1,5,1) write(xw1," Year to plot YYYY:") XAttrib(xw1,"cursor=on") XGotoRC(xw1,3,23) Birth_Date := read(xw1) XGotoRC(xw1,5,23) Plot_Year := read(xw1) base1 := 0 d1 := julian(Birth_Date) d2 := julian("01/01/" || Plot_Year) age:= d2 - d1 end # # parse a string into a list with respect to a delimiter # procedure parse(line,delims) static chars chars := &cset -- delims tokens := [] line ? while tab(upto(chars)) do put(tokens,tab(many(chars))) return tokens end # # this procedure finds the julian number of a day given MM/DD/YYYY # procedure julian(date) static months,shifts initial { months := [31,28,31,30,31,30,31,31,30,31,30,31] shifts := [0,31,59,90,120,151,181,212,243,273,304,334] } part := parse(date,'-/') (mm := integer(part[1])) | stop("julian(mm/dd/yyyy) format violation #1") (dd := integer(part[2])) | stop("julian(mm/dd/yyyy) format violation #2") (yyyy := integer(part[3])) | stop("julian(mm/dd/yyyy) format violation #3") (*part = 3) | stop("julian(mm/dd/yyyy) format violation #4") if yyyy%4 = 0 then { months[2] := 29 shifts := [0,31,60,91,121,152,182,213,244,274,305,335] } if (mm<1) | (mm>12) then stop("julian(MM/dd/yyyy) range error!") maxd := months[mm] if (dd<1) | (dd>maxd) then stop("julian (mm/DD/yyyy) range error!") if yyyy < 100 then yyyy +:= 1900 if (yyyy<1901) | (yyyy>2100) then stop("julian (mm/dd/YYYY) range error!") number := shifts[mm] + dd every i := 1901 to yyyy do { yl := if (i%4)=0 then 366 else 365 number +:= yl } return number end -- Chris Tenaglia (system manager) | tenaglia@mis.mcw.edu Medical College of Wisconsin | 8701 W. Watertown Plank Rd. | Ce que vous voyez est Milwaukee, WI 53226 (414)257-8765 | ce que vous obtenez ! From icon-group-sender Fri May 20 13:49:50 1994 Received: by cheltenham.cs.arizona.edu; Fri, 20 May 1994 15:53:11 MST From: Richard Hernandez Message-Id: <9405202049.AA07160@sv509.SanDiegoCA.ncr.com> Subject: How do I place a system editor in an icon region? To: icon-group@cs.arizona.edu Date: Fri, 20 May 1994 13:49:50 -0700 (PDT) X-Mailer: ELM [version 2.4 PL20] Content-Type: text Content-Length: 896 Status: R Errors-To: icon-group-errors@cs.arizona.edu Hi Group! I have just installed icon 8.10 and built my first program. For those of you that are interested, platforms are: MACHINE=NCR 3000 Family, OS=NCR System V Release 4 MACHINE=Solbourne Series5 OS=Solbourne/Sun Microsystems sun4 4.1B I have a question on how to add a system editor (vi,emacs) within an icon window, that is, frame an editor in icon. I would prefer not using icon to create an editor (why re-invent the wheel?). Any help would be appreciated. -- I do not represent AT&T or NCR and all correspondance regarding AT&T or NCR should be sent to those that do ... _ __ Richard "Rick" Hernandez MailStop: 1440 ' ) ) / c/o AT&T GLOBAL INFORMATION SOLUTIONS /--' o _. /_ 17095 VIA DEL CAMPO PHONE: (619) 485-3467 / \_(_(__/ <_ SAN DIEGO CA 92127-1711 FAX: (619) 485-3367 E-MAIL: Richard.Hernandez@SanDiegoCA.NCR.COM From icon-group-sender Sat May 21 07:30:56 1994 Received: by cheltenham.cs.arizona.edu; Sat, 21 May 1994 10:57:54 MST Date: Sat, 21 May 1994 07:30:56 -0600 (CST) From: Chris Tenaglia - 257-8765 Subject: Re: How do I place a system editor in an icon region? To: rick@sparc.sandiegoca.ncr.com Cc: icon-group@cs.arizona.edu Message-Id: <01HCLCIE6EGI8WW2SH@mis.mcw.edu> Organization: Medical College of Wisconsin (Milwaukee, WI) X-Vms-To: IN%"rick@sparc.sandiegoca.ncr.com" X-Vms-Cc: IN%"icon-group@cs.arizona.edu" Mime-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Status: R Errors-To: icon-group-errors@cs.arizona.edu It sounds like Xwindows are present? I wrote an X-based menu that needs to do something like that too. Mine called different character based apps. Assuming you know what filename you want to edit, here's the code segment I'd use. command := "/usr/bin/X11/xterm -e /usr/ucb/vi " || filename || " &" system(command) I do this on a DEC ultrix unix system. My display is an Xterminal. This runs the editor on the file and when the editor is exited "ZZ", the spawned window disappears automatically. Chris Tenaglia (System Manager) | "The past explained, Medical College of Wisconsin | the future fortold, 8701 W. Watertown Plank Rd. | the present largely appologized for." Milwaukee, WI 53226 | Organon to The Doctor (414)257-8765 | tenaglia@mis.mcw.edu > From: IN%"rick@sparc.sandiegoca.ncr.com" "Richard Hernandez" 20-MAY-1994 18:02:25.04 > To: IN%"icon-group@cs.arizona.edu" > Subj: How do I place a system editor in an icon region? > Hi Group! > I have just installed icon 8.10 and built my first program. > For those of you that are interested, platforms are: > MACHINE=NCR 3000 Family, OS=NCR System V Release 4 > MACHINE=Solbourne Series5 OS=Solbourne/Sun Microsystems sun4 4.1B > I have a question on how to add a system editor (vi,emacs) > within an icon window, that is, frame an editor in icon. I > would prefer not using icon to create an editor (why re-invent > the wheel?). Any help would be appreciated. > -- > I do not represent AT&T or NCR and all correspondance regarding > AT&T or NCR should be sent to those that do ... > _ __ Richard "Rick" Hernandez MailStop: 1440 > ' ) ) / c/o AT&T GLOBAL INFORMATION SOLUTIONS > /--' o _. /_ 17095 VIA DEL CAMPO PHONE: (619) 485-3467 > / \_(_(__/ <_ SAN DIEGO CA 92127-1711 FAX: (619) 485-3367 > E-MAIL: Richard.Hernandez@SanDiegoCA.NCR.COM From icon-group-sender Sat May 21 14:19:18 1994 Received: by cheltenham.cs.arizona.edu; Sat, 21 May 1994 22:24:43 MST From: Richard Hernandez Message-Id: <9405212119.AA27468@sv509.SanDiegoCA.ncr.com> Subject: Re: How do I place a system editor in an icon region? To: icon-group@cs.arizona.edu Date: Sat, 21 May 1994 14:19:18 -0700 (PDT) In-Reply-To: <01HCLCIE6EGI8WW2SH@mis.mcw.edu> from "Chris Tenaglia - 257-8765" at May 21, 94 07:30:56 am X-Mailer: ELM [version 2.4 PL20] Content-Type: text Content-Length: 3144 Status: R Errors-To: icon-group-errors@cs.arizona.edu > > It sounds like Xwindows are present? I wrote an X-based menu that > needs to do something like that too. Mine called different > character based apps. Assuming you know what filename you want > to edit, here's the code segment I'd use. > > command := "/usr/bin/X11/xterm -e /usr/ucb/vi " || filename || " &" > system(command) > Thanks, I have implemented the above. What I really want is what is below. Icon window ________________________________________________ | : | File Options : | ------------------------------------------- : | _________________________________________ | | |Editing a file with a system editor : : | |within an icon window. : : | |~ : : | |~ : : | |~ : : | |~ : : | |~ : : | |~ : : | |~ : : | |"filename" [New file] : : | ----------------------------------------- | | : ------------------------------------------------ > > I do this on a DEC ultrix unix system. My display is an Xterminal. This > runs the editor on the file and when the editor is exited "ZZ", the > spawned window disappears automatically. > > Chris Tenaglia (System Manager) | "The past explained, > Medical College of Wisconsin | the future fortold, > 8701 W. Watertown Plank Rd. | the present largely appologized for." > Milwaukee, WI 53226 | Organon to The Doctor > (414)257-8765 | > tenaglia@mis.mcw.edu > > > From: IN%"rick@sparc.sandiegoca.ncr.com" "Richard Hernandez" 20-MAY-1994 18:02:25.04 > > To: IN%"icon-group@cs.arizona.edu" > > Subj: How do I place a system editor in an icon region? > > > Hi Group! > > I have just installed icon 8.10 and built my first program. > > For those of you that are interested, platforms are: > > > MACHINE=NCR 3000 Family, OS=NCR System V Release 4 > > MACHINE=Solbourne Series5 OS=Solbourne/Sun Microsystems sun4 4.1B > > > I have a question on how to add a system editor (vi,emacs) > > within an icon window, that is, frame an editor in icon. I > > would prefer not using icon to create an editor (why re-invent > > the wheel?). Any help would be appreciated. -- I do not represent AT&T or NCR and all correspondance regarding AT&T or NCR should be sent to those that do ... _ __ Richard "Rick" Hernandez MailStop: 1440 ' ) ) / c/o AT&T GLOBAL INFORMATION SOLUTIONS /--' o _. /_ 17095 VIA DEL CAMPO PHONE: (619) 485-3467 / \_(_(__/ <_ SAN DIEGO CA 92127-1711 FAX: (619) 485-3367 E-MAIL: Richard.Hernandez@SanDiegoCA.NCR.COM From icon-group-sender Sun May 22 04:37:53 1994 Received: by cheltenham.cs.arizona.edu; Sun, 22 May 1994 08:38:59 MST Date: Sun, 22 May 94 04:37:53 CDT From: jeffery@ringer.cs.utsa.edu (Clinton L. Jeffery) Message-Id: <9405220937.AA03737@ringer.cs.utsa.edu.sunset> To: rick@sparc.sandiegoca.ncr.com Cc: icon-group@cs.arizona.edu In-Reply-To: Richard Hernandez's message of Sat, 21 May 1994 14:19:18 -0700 (PDT) <9405212119.AA27468@sv509.SanDiegoCA.ncr.com> Subject: How do I place a system editor in an icon region? Content-Length: 625 Status: R Errors-To: icon-group-errors@cs.arizona.edu What you want to do is interesting, but there is no way to do it in Icon right now. To do it you need an interface to UNIX pseudo-tty's and Icon doesn't presently have one. There are a lot of neat things like this that we'd like to do, but without industry sponsorship there are no resources for this kind of development. Given our limited resources, we add features directly relevant to our research and occasionally code is contributed from someone in the user community who has extended Icon in an important way. Clint Jeffery cjeffery@cs.arizona.edu, jeffery@ringer.cs.utsa.edu The University of Texas at San Antonio From icon-group-sender Sun May 22 09:23:36 1994 Received: by cheltenham.cs.arizona.edu; Sun, 22 May 1994 15:49:35 MST Date: Sun, 22 May 1994 09:23:36 MST From: "Ralph Griswold" Message-Id: <199405221623.AA25643@cheltenham.cs.arizona.edu> To: icon-group Subject: Icon program library Status: R Errors-To: icon-group-errors@cs.arizona.edu I'm in the process of preparing the next update to the Icon program library. If you have material to contribute, please send it to me within the next two weeks. If you've submitted material before and aren't sure if I have it, or if you're not sure I have the latest version, ask me or just send what you have and I'll sort it out. You can send material to me by e-mail (ralph@cs.arizona.edu), upload it to /incoming by FTP (cs.arizona.edu), or send a MS-DOS or Macintosh diskette. If you upload by FTP, please let me know by e-mail so that I can pick it up before it's garbage collected. Ralph E. Griswold ralph@cs.arizona.edu Department of Computer Science uunet!arizona!ralph The University of Arizona 602-621-6609 (voice) Tucson, AZ 85721 602-621-4246 (fax) From icon-group-sender Sun May 22 12:34:41 1994 Received: by cheltenham.cs.arizona.edu; Sun, 22 May 1994 15:50:21 MST Date: Sun, 22 May 94 12:34:41 PDT From: eric@star-semi.com (Eric Armstrong) Message-Id: <9405221934.AA13629@star-semi.com> To: icon-group@cs.arizona.edu Subject: wish list? Status: R Errors-To: icon-group-errors@cs.arizona.edu Has someone collected the ideas, suggestions, and wish-list items? My usual experience with a new language (system, product, etc.) is that what it WILL do is clearly documented, but what it WON'T do (that you might expect it to) is only discovered by using it and "bumping into the walls." An (annotated?) collection of wish-list features would help to establish the boundaries of the language and circumscribe the problem domain in which it is appropriate. thanks eric --new icon-ite. or is that "icontaket" as in "I con take it" (boo...) iconizer? icon-duit? iconC, iconC! (iconCede!) ------------------------------------------------------------------------------- Eric Armstrong eric@star-semi.com (408) 526-2160 x170 Star Semiconductor 2951 Zanker Road San Jose CA 95134 From icon-group-sender Mon May 23 06:42:32 1994 Received: by cheltenham.cs.arizona.edu; Mon, 23 May 1994 09:35:00 MST Date: Mon, 23 May 1994 06:42:32 -0600 (CST) From: Chris Tenaglia - 257-8765 Subject: Re: wishlist? To: icon-group@cs.arizona.edu Message-Id: <01HCO3T4LOX48WW45U@mis.mcw.edu> Organization: Medical College of Wisconsin (Milwaukee, WI) X-Vms-To: IN%"icon-group@cs.arizona.edu" Mime-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Status: R Errors-To: icon-group-errors@cs.arizona.edu > From: IN%"eric@star-semi.com" 22-MAY-1994 17:55:08.74 > To: IN%"icon-group@cs.arizona.edu" > Subj: wish list? > Has someone collected the ideas, suggestions, and wish-list items? > My usual experience with a new language (system, product, etc.) is that what > it WILL do is clearly documented, but what it WON'T do (that you might expect > it to) is only discovered by using it and "bumping into the walls." I've bumped into those walls. The most blatant is: every n := 0.0 to &pi*2.0 by &pi/180.0 do ... 'every' cannot increment by reals. It can only do integers, strings, and structures. My other complaints are OS deficiencies. A feature that works fine under SUNOS or HPUX doesn't work the same under Ultrix or VMS, and sometimes doesn't work at all. The Icon Project told me that since those aren't popular platforms at arizona.edu they really don't have the time or people to look into it. I've also had problems with the VMS versions unable to read files that contain char(255) or \377 in them. This has been broken since V8.7 of Icon. Under MS-DOS getch() was unbreakable in version 8.5, but is under 8.10, which weakened some password routines in my software. And it is also annoying that kbhit(), getch(), and getche() behave differently under VMS, UNIX, and DOS. The VMS version won't run unless your have X-windows or Motif installed, even if you rebuild it with the X-flags turned off. A lot of my gripes are because I write for so many different environments. If you only do DOS, or only do unix your life can stay simple. > An (annotated?) collection of wish-list features would help to establish > the boundaries of the language and circumscribe the problem domain in which > it is appropriate. Icon seems to have 2 goals. I/O (files, pipes, and windows), and portability. Icon's portability is achieved by having a run time 'system' (virtual machine) that offers the same services to the language across all platforms. This is achieved by having C and OS gurus define the interfaces to the internals of the OS. The more consistent the design of the interfaces and the services offered across OS's the more portable the language. The more they do to hide the internals of a CPU from us, the more energy we can devote to solving the problem, and less fighting with the architecture. They've begun this now on the windowing implementations. This will unify the windowing between X-Windows, MS-windows, and OS/2 (presentation mgr). One of my wishlist things is in this same category, but it could be done as a user developed procedure too. It would be to have a uniform file system notation. This would avoid stuff like: file := case OS of { "MS-DOS" : "C:\\ICON\\CFG.DAT" "VMS" : "DISK1:[ICON]CFG.DAT" "UNIX" : "/usr/lib/icon/cfg.dat" "AMIGA" : ???? "ATARI" : ???? "MAC" : ???? "MVS" : ???? } Another popular wish is for regular expression pattern matching although this could be written in user routines if someone had the time and patience to sink into it. Bidirectional pipes might be cool too to permit better interprocess communication. > thanks > eric --new icon-ite. or is that "icontaket" as in "I con take it" (boo...) > iconizer? icon-duit? iconC, iconC! (iconCede!) > ------------------------------------------------------------------------------- > Eric Armstrong eric@star-semi.com (408) 526-2160 x170 > Star Semiconductor 2951 Zanker Road San Jose CA 95134 From icon-group-sender Mon May 23 10:24:05 1994 Received: by cheltenham.cs.arizona.edu; Mon, 23 May 1994 09:39:33 MST Message-Id: <199405231424.AA17553@optima.cs.arizona.edu> Date: Mon, 23 May 94 10:24:05 -0400 From: Mark Keil To: icon-group@cs.arizona.edu Subject: Japanese text processing & Japanese word counting? Reply-To: keil@ch.hp.com Status: RO Errors-To: icon-group-errors@cs.arizona.edu Folks: Has anyone out there used Icon to process japanese text? I'm looking for pointers or code to handle JIS or EUC encoded japanese text with Icon. This is an interesting problem, because regular ascii can be intermixed with two byte encoded Japanese text. There are several different ways to encode the japanese, one of which uses shift-in shift-out (shift JIS) codes to mark the transition. Japanese text also doesn't have spaces to seperate the words, making word detection interesting. Anybody have any ideas? Thanks, Mark From icon-group-sender Tue May 24 08:13:20 1994 Received: by cheltenham.cs.arizona.edu; Tue, 24 May 1994 15:01:55 MST Date: Tue, 24 May 94 08:13:20 PDT From: kwalker@sirtur.premenos.com (Ken Walker) Message-Id: <9405241513.AA01092@sirtur.premenos.com> To: TENAGLIA@MIS.MCW.EDU, icon-group@cs.arizona.edu Subject: Re: wishlist? X-Sun-Charset: US-ASCII Content-Length: 1155 Status: R Errors-To: icon-group-errors@cs.arizona.edu > From: Chris Tenaglia - 257-8765 > > every n := 0.0 to &pi*2.0 by &pi/180.0 do ... > > 'every' cannot increment by reals. It can only do integers, strings, > and structures. Technically speaking the problem is not with 'every'; the problem is with 'to by'. This is illustrated by writing a toby() procedure that mimics 'to by', but works fine with reals: procedure toby(From, To, By) /By := 1 if From < To then { if By <= 0 then stop("infinite sequence specified for toby()") while From <= To do { suspend From From +:= By } } else { if By >= 0 then stop("infinite sequence specified for toby()") while From >= To do { suspend From From +:= By } } end procedure main() local From, To, By repeat { writes("from ") From := read() | stop() writes("to ") To := read() | stop() writes("by ") By := read() | stop() every write(" ", toby(From, To, By)) } end Ken Walker, kwalker@premenos.com From icon-group-sender Sun May 1 04:29:32 1994 Received: by cheltenham.cs.arizona.edu; Tue, 24 May 1994 15:03:54 MST Path: ucbvax!cis.ohio-state.edu!math.ohio-state.edu!cs.utexas.edu!swrinde!sgiblab!sgigate.sgi.com!olivea!koriel!decwrl!get.hooked.net!news.sprintlink.net!redstone.interpath.net!mercury!brady From: brady@mercury.interpath.net (Donald C Brady - Comintel Inc) Newsgroups: comp.lang.icon Subject: Re: Icon in May94 BYTE Magazine -- what else & Windows? Message-Id: <2pvb7c$hel@redstone.interpath.net> Date: 1 May 94 04:29:32 GMT References: <1994Apr28.181752.29607@ringer.cs.utsa.edu> Distribution: inet Organization: Interpath -- An Internet access provider Lines: 20 Nntp-Posting-Host: mercury.interpath.net X-Newsreader: TIN [version 1.2 PL2] Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu I also read the Byte article. I was very interested in it as I am a heavy user of Catspaw Spitbol/386, which is of course a SNOBOL4. When I last looked at Icon, I concluded SNOBOL4/ SPITBOL was still the better choice, because high-quality implementations were readily available. Icon seemed immature and less-widely used. Is this still the case? Or is Icon now starting to replace SNOBOL4? I currently run WIndows/NT mainly, but alos have UNIXWARE, OS/2, NExtStep. Is the NT version going to come out with the Windows version or are they separate? What version of UNIX is best now for running or trying out Icon? Or OS/2? Thanks. From icon-group-sender Tue May 24 17:58:06 1994 Received: by cheltenham.cs.arizona.edu; Tue, 24 May 1994 15:05:57 MST Path: ucbvax!agate!howland.reston.ans.net!gatech!concert!sas!mozart.unx.sas.com!sasghm From: sasghm@theseus.unx.sas.com (Gary Merrill) Newsgroups: comp.text.sgml,comp.text,comp.lang.misc,comp.lang.icon Subject: Re: Spitbol reference? Message-Id: Date: 24 May 94 17:58:06 GMT References: <1994May17.140242.27932@tin.monsanto.com> Sender: news@unx.sas.com (Noter of Newsworthy Events) Organization: SAS Institute Inc. Lines: 58 Originator: sasghm@theseus.unx.sas.com Nntp-Posting-Host: theseus.unx.sas.com Apparently-To: icon-group@cs.arizona.edu Status: R Errors-To: icon-group-errors@cs.arizona.edu In article , sgmlsh@world.std.com (John Smith) writes: |> Joel Finkle writes: |> |> >I'm looking for reference material on the Spitbol language. |> |> The vendor for Spitbol is: |> |> Catspaw Inc. |> PO Box 1123 |> Salida, CO 81201 USA |> 1-719-539-3884 |> |> cats!support@cs.arizona.edu I recall seeing the Catspaw SPITBOL environment some time ago, and though I never used it, it looked quite nice. |> -- |>