From icon-group-sender Wed Sep 11 14:48:19 1996 Received: by cheltenham.cs.arizona.edu; Wed, 11 Sep 1996 12:34:50 MST To: icon-group@cs.arizona.edu Date: 11 Sep 96 14:48:19 -0700 From: BIG_STEVE@msn.com (Guy Tellefsen) Message-Id: <00001a8c+000000fe@msn.com> Organization: The Microsoft Network (msn.com) Sender: icon-group-request@cs.arizona.edu Subject: ODBC and Icon? Errors-To: icon-group-errors@cs.arizona.edu At work, I encounter many applications for which Icon would be well suited, but they all involve database access. Can anyone suggest any resources that might help me figure out how to use Icon with ODBC? Thank you, Guy Tellefsen big_steve@msn.com From icon-group-sender Fri Sep 13 03:31:09 1996 Received: by cheltenham.cs.arizona.edu; Fri, 13 Sep 1996 08:13:05 MST Date: Fri, 13 Sep 1996 03:31:09 -0500 Message-Id: <199609130831.DAA31922@segfault.cs.utsa.edu> From: Clinton Jeffery To: shamim@Synopsys.COM Cc: icon-group@cs.arizona.edu In-Reply-To: <9609130231.AA15404@shetland-92.synopsys.com> (shamim@Synopsys.COM) Subject: Re: Yoo-hoo! Reply-To: jeffery@ringer.cs.utsa.edu Errors-To: icon-group-errors@cs.arizona.edu Shamim Mohamed asks: > I have a question: was that elf ld assertion on linking iconx on Linux > fixed, or is it still a problem? It turns out that many CD's containing the Slackware 3.0 ELF distribution have gcc version 2.7.0, and similarly out of date C library and binutils versions. A bug in gcc or ld causes the linking of iconx to fail. So, in addition to tweaking the i486-linux configuration to remove underscores from rswitch.s and adding a -fno-strength-reduce to the CFLAGS in the Makefiles (as suggested by steve@miranova.com, last I heard the files could be found at ftp://ftp.miranova.com/pub/icon.linux.elf.tar.gz), I recommend: IF you need to build Icon for Linux from sources on an ELF platform, check your GCC version by means of "gcc -v" and if it says 2.7.0 you will probably need to get the newer version of the compiler (and possibly libc and binutils). If this is not an option, you can install gcc a.out support and build an a.out binary that will run on your linux ELF system. Clint Jeffery jeffery@cs.utsa.edu Division of Computer Science, The University of Texas at San Antonio Research http://www.cs.utsa.edu/research/plss.html From icon-group-sender Tue Sep 17 04:27:32 1996 Received: by cheltenham.cs.arizona.edu; Tue, 17 Sep 1996 08:28:51 MST Date: 17 Sep 96 12:26:32 BST From: R J Hare Subject: Problem with Text Dialogues To: icon-group@cs.arizona.edu Reply-To: rjhare@ed.ac.uk Organisation: Edinburgh University Computing Services Message-Id: <9609171226.aa28475@uk.ac.ed.tattoo> Errors-To: icon-group-errors@cs.arizona.edu I am using a text dialogue to set font names, sizes and styles in a program I am writing. Let's say I set the font characteristics to "sans,bold,32". This can be done whenever I want, and whenever I do this, I temporarily reset the font characteristics to "mono,medium,12" for use in the dialogue box, but the data entry boxes in the dialogue box are spaced as if the 32 point size typeface were still in play. ANy ideas how to ensure that the data entry boxes in the dialogue box are 'correctly' spaced (ie: for 12 point size text)? Thanks. Roger Hare From icon-group-sender Thu Sep 26 01:56:43 1996 Received: by cheltenham.cs.arizona.edu; Fri, 27 Sep 1996 12:39:19 MST Date: 26 Sep 96 09:55:36 BST From: R J Hare Subject: Copying of irregular images To: icon-group@cs.arizona.edu Reply-To: rjhare@ed.ac.uk Organisation: Edinburgh University Computing Services Message-Id: <9609260955.aa11962@uk.ac.ed.tattoo> Errors-To: icon-group-errors@cs.arizona.edu I want to copy what is (effectively) an irregular shaped image onto an existing window. CopyArea only allows me to copy rectangular areas, so a rectangular area which included the irregular image would, if copied also overwrite parts of the existing window. Is there any way round this? Is there a "transparent" colour so that I can set the background this way before generating my irregular image, so that when copied onto the window, the "transparent" pixels in the image do not affect the corresonding pixels in the window? I cannot find any mention of this in the WWW pages. Should there be such a "transparent" colour or is the whole idea rubbish? Thanks. Roger Hare From icon-group-sender Fri Sep 27 21:49:30 1996 Received: by cheltenham.cs.arizona.edu; Mon, 30 Sep 1996 13:38:41 MST Date: Fri, 27 Sep 1996 21:49:30 -0500 Message-Id: <199609280249.VAA26822@segfault.cs.utsa.edu> From: Clinton Jeffery To: rjhare@ed.ac.uk Cc: icon-group@cs.arizona.edu In-Reply-To: <9609260955.aa11962@uk.ac.ed.tattoo> (message from R J Hare on 26 Sep 96 09:55:36 BST) Subject: Re: Copying of irregular images Reply-To: jeffery@ringer.cs.utsa.edu Errors-To: icon-group-errors@cs.arizona.edu [Roger Hare writes:] > I want to copy what is (effectively) an irregular shaped image... > Is there a "transparent" colour so that I can set the background this way > before generating my irregular image, so that when copied onto the window, > the "transparent" pixels in the image do not affect the corresonding > pixels in the window? I cannot find any mention of this in the WWW pages. > Should there be such a "transparent" colour or is the whole idea rubbish? Well, CopyArea() doesn't work this way. I believe the image processing functions do have a concept of a transparent color that might allow you to achieve the affect you are after...you might have to do a little bit of work to turn your drawn window into an image string, and then tweak that image string to change all pixels drawn in a certain color into the transparent color. It might be as simple as an IPL procedure call followed by a call to map(), but it might be a bit more work. Gregg Townsend is the ultimate authority on images and their manipulation in Icon. Clint Jeffery jeffery@cs.utsa.edu Division of Computer Science, The University of Texas at San Antonio Research http://www.cs.utsa.edu/research/plss.html From icon-group-sender Fri Sep 27 20:01:53 1996 Received: by cheltenham.cs.arizona.edu; Mon, 30 Sep 1996 13:38:56 MST Date: Fri, 27 Sep 1996 20:01:53 -0500 (CDT) From: "Chris D. Tenaglia" To: rjhare@ed.ac.uk Cc: icon-group@cs.arizona.edu Subject: Re: Copying of irregular images In-Reply-To: <9609260955.aa11962@uk.ac.ed.tattoo> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Errors-To: icon-group-errors@cs.arizona.edu Well there might not be an exact color called transparent, but that behavior may be obtained by tinkering with the drawing opmode. Usually it's set to "replace". But interesting effects can be had with "XOR exclusive or", or "AND" or "OR" or "NOT" or "INVERSE" etc,... I've used XOR a lot for animations. XOR has also been used to blink cursors and swap two items without a third. I sometimes wonder how to detect which pie slice a point is in given a circle and known, but not necessarily equal slices of it. Check out http://kspace.com/ Chris Tenaglia (system manager) | cdt@post.its.mcw.edu Medical College of Wisconsin | 8701 W. Watertown Plank Rd. | Ce que vous voyez est Milwaukee, WI 53226 (414)456-8765 | ce que vous obtenez ! On 26 Sep 1996, R J Hare wrote: > Date: 26 Sep 96 09:55:36 BST > From: R J Hare > To: icon-group@cs.arizona.edu > Subject: Copying of irregular images > > I want to copy what is (effectively) an irregular shaped image onto an > existing window. CopyArea only allows me to copy rectangular areas, so a > rectangular area which included the irregular image would, if copied also > overwrite parts of the existing window. > > Is there any way round this? > > Is there a "transparent" colour so that I can set the background this way > before generating my irregular image, so that when copied onto the window, the > "transparent" pixels in the image do not affect the corresonding pixels in the > window? I cannot find any mention of this in the WWW pages. > > Should there be such a "transparent" colour or is the whole idea rubbish? > > Thanks. > > Roger Hare > From icon-group-sender Mon Sep 30 14:23:10 1996 Received: by cheltenham.cs.arizona.edu; Tue, 1 Oct 1996 08:22:18 MST Date: Mon, 30 Sep 1996 14:23:10 -0700 From: Gregg Townsend Message-Id: <9609302123.AA32391@hawk.CS.Arizona.EDU> To: jeffery@ringer.cs.utsa.edu, rjhare@ed.ac.uk Subject: Re: Copying of irregular images Cc: icon-group@cs.arizona.edu Errors-To: icon-group-errors@cs.arizona.edu From: Clinton Jeffery ...you might have to do a little bit of work to turn your drawn window into an image string, and then tweak that image string to change all pixels drawn in a certain color into the transparent color.... That should work, although it will be orders of magnitude slower than using CopyArea(). Call Capture() to get a window portion as a string; call imsmap() to change pixels of one color to a transparent marker ("~" or "\377") used by DrawImage(); then call DrawImage() to write the pixels back. (Capture() and imsmap() are in the library; link graphics, link imscolor.) You'll need to be sure that the original "transparent" color remains distinct when mapped to a palette by Capture(). Gregg Townsend / gmt@CS.Arizona.EDU / +1 520 621 4325 / 32 13 45N 110 57 16W Computer Science / Univ of Arizona / 1040 E 4th St / Tucson AZ 85721-0077 From icon-group-sender Thu Oct 3 10:54:55 1996 Received: by cheltenham.cs.arizona.edu; Fri, 4 Oct 1996 11:05:16 MST From: ko@surya.ho.att.com Date: Thu, 3 Oct 1996 10:54:55 -0400 Message-Id: <9610031454.AA09880@spark.ho.att.com.spark> Original-From: Kostas Oikonomou To: icon-group@cs.arizona.edu Subject: Problem/question with procedures as values, Icon 9.1. Errors-To: icon-group-errors@cs.arizona.edu Hello, I am using Icon 9.1 in Unix (Sun). I read the 2nd ed. of the book, Ch. 8, ``Procedures and Operators as Values'', but I must not be understanding something. Will you please explain what is happening in the following program? --------------- File "testfile": ----------------- p1 p2 junk --------------- File "t.icn": ----------------- procedure main() local t, tf, p (tf := open("testfile")) | stop("Can't find file `testfile'!") while t := read(tf) do { write("t = ", t) p := proc(p1) # OK. Argument is a variable. p := p1 # OK. p := proc(t) # Not OK, because proc() doesn't accept strings as args? # But it accepts strings corresponding to operator names. "write"("hop!") # OK. Because ``write'' is built-in? "p1"() # Not OK. Because ``p1'' is not built-in? t() # Not OK. Shouldn't it be the same as the above? } end procedure p1() write("ok, p1") end procedure p2() write("ok, p2") end Thanks very much. Kostas Oikonomou From icon-group-sender Wed Oct 2 01:04:03 1996 Received: by cheltenham.cs.arizona.edu; Fri, 4 Oct 1996 11:05:07 MST Date: 02 Oct 96 09:03:32 BST From: R J Hare Subject: Re: Copying of irregular images To: Gregg Townsend Cc: jeffery@ringer.cs.utsa.edu, icon-group@cs.arizona.edu In-Reply-To: Your message <9609302123.AA32391@hawk.CS.Arizona.EDU> Message-Id: <9610020903.aa08093@uk.ac.ed.tattoo> Errors-To: icon-group-errors@cs.arizona.edu > ...you might have to do a little bit of work > to turn your drawn window into an image string, and then tweak that \ > image > string to change all pixels drawn in a certain color into the \ > transparent > color.... > > That should work, although it will be orders of magnitude slower than using > CopyArea(). True - I set up a regular grid (which I also have a need for) using an image string and DrawImage. It was slower than CopyArea, but once I had got the bugs (errors!) out, about the same as simply redrawing the grid every time using 'conventional' drawing procedures. I can't use CopyArea in practice because it overwrites everything in the area whereas I simply want to overlay the grid. > Call Capture() to get a window portion as a string; call imsmap() to change > pixels of one color to a transparent marker ("~" or "\377") used by > DrawImage(); then call DrawImage() to write the pixels back. > (Capture() and imsmap() are in the library; link graphics, link imscolor.) > > You'll need to be sure that the original "transparent" color remains > distinct when mapped to a palette by Capture(). Something else to look at when I get a cjance. I wasn't aware of the Capture() and imsmap() routines. I'll have a look. Thanks Roger Hare From icon-group-sender Thu Oct 3 11:10:04 1996 Received: by cheltenham.cs.arizona.edu; Fri, 4 Oct 1996 11:05:25 MST Date: 03 Oct 96 19:09:07 BST From: R J Hare Subject: Text & graphics To: icon-group@cs.arizona.edu Reply-To: rjhare@ed.ac.uk Organisation: Edinburgh University Computing Services Message-Id: <9610031909.aa16584@uk.ac.ed.tattoo> Errors-To: icon-group-errors@cs.arizona.edu I hope this will be the last daft question I have to ask about graphics for a while! I have a situation where I wish to type some text in a window on a line by line basis, and have that text copied to a second window also on a line by line basis, and to exactly the same point in the hidden window as on the visible window (the two are exactly the same size). Here is the code I am using to do this: procedure typetext() # get the x,y position of text start with left button. repeat {case Event(page) of {&lpress : {x:=&x y:=&y break}}} GotoXY(page,x,y) GotoXY(hpage,x,y) repeat{char:=WReads(page,1) if char == "\^c" then break if char == "\r" then {y+:=size+2 GotoXY(page,x,y) GotoXY(hpage,x,y)} WWrites(hpage,char)} return end What happens is that all is well in the visible window, but in the hidden window, when I save it and then look at it (or when I turn off the canvas="hidden" attribute), only the first line is in the correct position. All other lines are left justifed to the edge of the window, not the selected x position - like this: Visible window Hidden window ____________________________________ ____________________________________ | | | | | | | | | | | | | | | | | | | | | Some text typed in the visible | | Some text typed in the visible | | window is justified perfectly | |window is justified perfectly | | OK. The text is *not* laid | |OK. The text is *not* laid | | out properly in the hidden | |out properly in the hidden | | window. Why, Please? | |window. Why, Please? | | | | | | | | | | | | | | | | | | | | | | | | | |____________________________________| |___________________________________| Any ideas why this should be the case please? Thanks. Roger Hare From icon-group-sender Fri Oct 4 11:03:45 1996 Received: by cheltenham.cs.arizona.edu; Fri, 4 Oct 1996 13:10:46 MST To: icon-group@cs.arizona.edu Date: 4 Oct 1996 11:03:45 -0700 From: icon-project@cs.arizona.edu Message-Id: <533ji1$maa@cheltenham.CS.Arizona.EDU> Organization: University of Arizona CS Department, Tucson AZ Sender: icon-group-request@cs.arizona.edu Reply-To: icon-project@cs.arizona.edu Subject: Icon Programming Language FAQ Errors-To: icon-group-errors@cs.arizona.edu Archive-name: comp-lang-icon-faq Posting-Frequency: monthly Frequently Asked Questions About The Icon Programming Language Last updated: February 16, 1996 This FAQ answers various questions about the Icon programming language, ranging from what it is to how you can get it. The master copy of this FAQ is the Web page http://www.cs.arizona.edu/icon/www/faq.html. Other on-line documentation is available via the main Icon page at http://www.cs.arizona.edu/icon/www/. This FAQ is written by Ralph Griswold and Gregg Townsend, with help from Cliff Hathaway, Clint Jeffery, and Bob Alexander. * 1. What is Icon? * 2. What is Icon good for? * 3. Where did Icon come from? * 4. What does "Icon" stand for? * 5. On what computers does Icon run? * 6. Who did all these implementations? * 7. Are there other implementations in the works? * 8. What about different versions of Icon? * 9. Which implementations of Icon have graphics/window capabilities? * 10. Where can I get Icon? * 11. Where can I get documentation about Icon? * 12. How do I get started with Icon? * 13. What is the Icon Project? * 14. Where can I find examples of Icon programs? * 15. What is Idol? * 16. How often is material in Icon's FTP area updated? * 17. How do I stay up to date with what's going on with Icon? * 18. Is there a users' group for Icon? * 19. How do I get technical support? * 20. Should I use the Icon interpreter or compiler? * 21. What do I need to run the interpreter? * 22. What do I need to run the compiler? * 23. Can I build my own implementation of Icon for a new platform? ------------------------------------------------------------------------------- 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. 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. 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. 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. 5. On what computers does Icon run? The implementation of Icon is highly portable. Version 9 runs on UNIX, MS-DOS, Macintosh/MPW, VAX/VMS, and the Acorn Archimedes. There are older versions for the Amiga, the Atari ST, IBM CMS and MVS, the Macintosh, and OS/2. Icon programs also are highly portable. Most Icon programs can run on any platform that supports Icon. 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. 7. Are there other implementations in the works? Work is constantly underway on implementations of Icon for new platforms. Present projects include Microsoft Windows, Windows NT, and a new Macintosh implementation. 8. What about different versions of Icon? Icon has evolved through a series of versions with improved and extended capabilities. The latest major version number is 9. This version includes recent changes and additions, notably in the graphics area, and runs on UNIX, MS-DOS, Macintosh/MPW, VAX/VMS, and Acorn Archimedes. Other implementations presently are at Version 8. Almost all programs that run under Version 8 and that do not use graphics will run under Version 9. 9. Which implementations of Icon have graphics/window capabilities? Icon's graphics facilities presently are supported on UNIX and VAX/VMS. The Windows NT and Microsoft Windows implementations that support Icon's graphics facilities are in beta testing. A Macintosh implementation to support graphics also is in the works. 10. Where can I get Icon? Icon is available via anonymous FTP and on the Web. For FTP, use ftp.cs.arizona.edu and cd /icon. For the Web, use http://www.cs.arizona.edu/icon/www/ and check out the links there. For FTP, the directory /icon/binaries contains executable versions of Icon for several systems, including several popular UNIX platforms. The directory /icon/packages contains source code, test programs, related material, and, most cases, executable binaries as well. All directories have README files with additional information. Icon also is available on diskettes for prices ranging from $15 to $25. Contact: Icon Project Department of Computer Science The University of Arizona P.O. Box 210077 Tucson, AZ 85721-0077 520-621-6613 (voice) 520-621-4246 (fax) icon-orders@cs.arizona.edu Purchases can be made by credit card (MasterCard or Visa), postal money order, or check drawn on a bank with a branch in the United States and made payable to The University of Arizona. Icon is available on CD-ROM from Prime Time Freeware (http://www.ptf.com/, 408-433-9662). Contact them for details. 11. Where can I get documentation about Icon? The definitive work on Icon is the book The Icon Programming Language, Griswold and Griswold, second edition, Prentice Hall, 1990, 368 pages, ISBN 0-13-447889-4. This book is a complete description and reference manual for Version 8 of Icon. A technical report describes changes since that version. 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 considerably since then, the basic structure is the same. Technical reports describing recent implementation changes are included with copies of the book purchased from the Icon Project. These books are available from the Icon Project. Additional documentation is available via FTP in /icon/doc. Notable documents are: * IPD266: An Overview of Icon (text, PostScript, PDF) * IPD268: Graphics/window facilities (PostScript, PDF) * IPD267: Version 9.1 of Icon (text, PostScript, PDF) There are manual pages for Unix systems, and more documentation under the Icon web page, 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 and is available on the Web. There is a subscription fee for an on-going subscription by postal mail. 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 the Web. All back issues of both newsletters are available for purchase. 12. How do I get started with Icon? If you're running under Unix, check first in the /icon/binaries/unix FTP directory to see if there is a "starter kit" for your platform. Starter kits include executables, documentation, and other material. Otherwise, go to the /icon/packages directory and get the appropriate package. Packages include documentation and other material; see the README file in that directory for more details. There is a Unix package for platforms that lack starter kits. If the non-Unix package you pick up does not contain executable files, check /icon/binaries. You also may want to get the overview of Icon: /icon/doc/ipd266.doc or ipd266.ps.Z. You'll find pointers to other documents of interest in the package you pick up. 13. What is the Icon Project? The Icon Project is a name used by the group 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, revenue from the sale of program material and documentation, and user contributions. 14. 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. The library contains 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 in /icon/library and on diskettes from the Icon Project. 15. 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 support Icon. Additional Idol information is available from Clint Jeffery, jeffery@ringer.cs.utsa.edu. 16. How often is material in Icon's FTP area updated? New material is added when it's available. Established implementations usually are updated only when there's a major new release. This typically is every year or two. The Icon program library is updated on a similar schedule. 17. 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 read the Icon Newsletter. 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 twice a year. There also is a subscription service for updates to the Icon program library, which provides new material about twice a year. There is on-line information about subscribing to these services. 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, is less intrusive, but sometimes suffers from inappropriate postings. The Icon Project usually sends messages of interest to the Icon community to icon-group. 19. How do I get technical support? The Icon Project is not a commercial organization, and its capacity for providing technical support is limited. Please use the appropriate resource when you need assistance: Ordering Icon Material mail: Icon Project Department of Computer Science The University of Arizona P.O. Box 210077 Tucson, Arizona 85721-0077 U.S.A. fax: (520) 621-4246 voice: (520) 621-6613 e-mail: icon-orders@cs.arizona.edu Getting On-Line Information and Material web: http://www.cs.arizona.edu/icon/www/ ftp: ftp.cs.arizona.edu (cd /icon) e-mail: ftpmail@cs.arizona.edu Send a message consisting of the word help. Assistance with Installing Icon e-mail: icon-project@cs.arizona.edu Bug Reports e-mail: icon-project@cs.arizona.edu fax: (520) 621-4246 Assistance with Programming Problems e-mail: icon-group@cs.arizona.edu news: comp.lang.icon Uploading Files ftp: ftp.cs.arizona.edu (cd /incoming) After uploading, send e-mail to icon-project@cs.arizona.edu. 20. Should I use the Icon interpreter or compiler? As the question indicates, there are two forms of the implementation of Icon, an interpreter and a compiler. The interpreter gets a program into execution quickly and is recommended for program development, debugging, and most production situations. The compiler produces code that executes somewhat faster than interpreted code (a factor of 2 or 3 is typical), but the compiler requires a large amount of resources and is very slow in producing executable code. It also requires additional time and effort at installation time. The compiler is recommended only for small programs where execution speed is the paramount concern. 21. What do I need to run the interpreter? The Icon interpreter will run on most computers. Under MS-DOS, the Icon interpreter needs 500 KB of application RAM to work well. 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 personal computers. 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. 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 architectures 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 Sun Oct 6 22:14:25 1996 Received: by cheltenham.cs.arizona.edu; Mon, 7 Oct 1996 10:16:12 MST To: icon-group@cs.arizona.edu Date: 6 Oct 1996 22:14:25 -0400 From: bsa@kf8nh.apk.net (Brandon S. Allbery KF8NH) Message-Id: <539p21$u2e@kf8nh.apk.net> Organization: Brandon's Own LAN (OS/2 and Linux) in Parma, OH, USA Sender: icon-group-request@cs.arizona.edu References: Subject: Re: Parsing the Icon command line Errors-To: icon-group-errors@cs.arizona.edu Also sprach bezeau@jupiter.csd.unb.ca (Larry Bezeau) (): +----- | h:\>cmdline.exe "A B" \"C D\" | A | B | C D | | I am doing all this in a DOS window in OS/2 2.1 with the 4DOS command +--->8 Using the latest (beta) OS/2 Icon in OS/2 v4, I get: [C:\Staging]cmdline.exe "A B \"C D\" A B "C D" Have you made sure that it does the same thing with COMMAND.COM? -- ++brandon s. allbery flying with merlin! bsa@kf8nh.apk.net telotech's "loup-guru" :-) FORZA CREW! bsa@telotech.com From icon-group-sender Sun Oct 6 20:16:45 1996 Received: by cheltenham.cs.arizona.edu; Mon, 7 Oct 1996 10:15:52 MST To: icon-group@cs.arizona.edu Date: Sun, 6 Oct 1996 20:16:45 GMT From: bezeau@jupiter.sun.csd.unb.ca (Larry Bezeau) Message-Id: Organization: New Brunswick Centre for Educational Administration Sender: icon-group-request@cs.arizona.edu Subject: Parsing the Icon command line Errors-To: icon-group-errors@cs.arizona.edu I have been using the Icon language extensively in recent months and have found it to be a significant improvement over Snobol4 which I had used previously for several decades. But there is one apparent anomaly that confuses me, and that is how Icon parses the command line. The problem arose in a program that functions somewhat like the DOS find command but the simple three- liner below illustrates it quite readily. If the unescaped quotes on the command line are not really quotes, then where did they go? What happend to the three spaces on the command line between "C" and "D"? I was unable to come up with a string on the command line that would be written out as follows: *cd \ h:\>type c:\libicon\cmdline.icn procedure main(C) every write(&output,C[1 to *C]) end h:\>cmdline.exe "A B" \"C D\" A B C D I am doing all this in a DOS window in OS/2 2.1 with the 4DOS command processor. Note that 4DOS does not strip double quotation marks from the command line. Larry Bezeau@UNB.Ca From icon-group-sender Mon Oct 7 14:00:48 1996 Received: by cheltenham.cs.arizona.edu; Mon, 7 Oct 1996 10:16:32 MST To: icon-group@cs.arizona.edu Date: Mon, 7 Oct 1996 14:00:48 GMT From: bezeau@jupiter.sun.csd.unb.ca (Larry Bezeau) Message-Id: Organization: New Brunswick Centre for Educational Administration Sender: icon-group-request@cs.arizona.edu Subject: Re: Parsing the Icon command line Errors-To: icon-group-errors@cs.arizona.edu Below are the results of the simple program CMDLINE.ICN with the DOS (not 4DOS) command processor. They are exactly the same as for 4DOS. The same reduction of the three embedded spaces in the CD string to one occurred as can be seen below. Here again, there seems to be no command line argument that will output the string: *cd \ h:\>type v:\cmdline.icn procedure main(C) every write(&output,C[1 to *C]) end h:\>c:\dos\command.com /c v:\cmdline.exe "A B" \"C D\" A B C D Larry Bezeau@UNB.Ca From icon-group-sender Mon Oct 7 13:32:00 1996 Received: by cheltenham.cs.arizona.edu; Mon, 7 Oct 1996 10:17:36 MST To: icon-group@cs.arizona.edu Date: Mon, 7 Oct 1996 13:32:00 GMT From: bezeau@jupiter.sun.csd.unb.ca (Larry Bezeau) Message-Id: Organization: New Brunswick Centre for Educational Administration Sender: icon-group-request@cs.arizona.edu Subject: Re: Parsing the Icon command line Errors-To: icon-group-errors@cs.arizona.edu >+----- >| h:\>cmdline.exe "A B" \"C D\" >| A >| B >| C D >| >| I am doing all this in a DOS window in OS/2 2.1 with the 4DOS command >+--->8 > >Using the latest (beta) OS/2 Icon in OS/2 v4, I get: > >[C:\Staging]cmdline.exe "A B \"C D\" >A B >"C >D" > >Have you made sure that it does the same thing with COMMAND.COM? Note that your command line is not exactly the same as mine, since one of the quotation marks has been left out. That being so, what you got is also very confusing. The three spaces between A and B were preserved, but what ended that field? Not the escaped quotation mark because that appears as part of the second field. I will give COMMAND.COM a try. One potential difficulty here is that not all command processors necessarily pass the same characters to the program. From icon-group-sender Tue Oct 8 11:02:58 1996 Received: by cheltenham.cs.arizona.edu; Tue, 8 Oct 1996 12:22:18 MST To: icon-group@cs.arizona.edu Date: Tue, 8 Oct 1996 11:02:58 GMT From: seldon@eskimo.com (Will Mengarini) Message-Id: Organization: Eskimo North (206) For-Ever Sender: icon-group-request@cs.arizona.edu References: Subject: Re: Parsing the Icon command line Errors-To: icon-group-errors@cs.arizona.edu bezeau@jupiter.csd.unb.ca (Larry Bezeau) writes: >h:\>type v:\cmdline.icn >procedure main(C) > every write(&output,C[1 to *C]) >end >h:\>c:\dos\command.com /c v:\cmdline.exe "A B" \"C D\" >A >B >C D That doesn't perform the test you want, since by invoking command.com with /c on your shell's command line, you're giving your shell a chance to munge the arguments *before* it passes them to command.com, which then munges them further before passing them to Icon, which then munges them further before passing them to your cmdline program. To test command.com for real, just invoke it as a subshell (use the command command to get into it, & the command exit to get out). Then try cmdline \"A" "B\" etc but don't ask me why it preserves the spaces in between A & B; I just found it by random hacking. Icon is clearly making serious improvements to the args before you see them, as the batch job Echo %1 %2 %3 %4 %5 %6 %7 %8 %9 will let you see; command.com preserves the quotes. Will Mengarini "We are beginning to perceive how free world populations move with a ghostly sixth sense to nurture group survival. Consider a presidential election where the choice is between two second-rate candidates. The [U.S.] election of 1988 is a good example. An objective observer is struck by the fact that the people give the Presidency to one party and deliver the Congress to the opposition, thereby rendering to a minimum the damage potential of an incompetent." --from p124 of /Let Us Prey/ by Bill Branon From icon-group-sender Thu Oct 10 18:02:15 1996 Received: by cheltenham.cs.arizona.edu; Fri, 11 Oct 1996 16:30:29 MST To: icon-group@cs.arizona.edu Date: Thu, 10 Oct 1996 18:02:15 GMT From: bezeau@jupiter.sun.csd.unb.ca (Larry Bezeau) Message-Id: Organization: New Brunswick Centre for Educational Administration Sender: icon-group-request@cs.arizona.edu Subject: Re: Parsing the Icon command line Errors-To: icon-group-errors@cs.arizona.edu >>h:\>c:\dos\command.com /c v:\cmdline.exe "A B" \"C D\" >That doesn't perform the test you want, since by invoking command.com >with /c on your shell's command line, you're giving your shell a chance >to munge the arguments *before* it passes them to command.com, which >then munges them further before passing them to Icon, which then munges >them further before passing them to your cmdline program. To test >command.com for real, just invoke it as a subshell (use the command > command Agreed, now that you point it out. I therefore repeated the test as you suggested and got the same results as shown below. This test was done on a different computer that is strictly DOS, no OS/2. h:\>command Microsoft(R) MS-DOS(R) Version 6.20 (C)Copyright Microsoft Corp 1981-1993. H:\>v:\cmdline.exe "A B" \"C D\" A B C D This should not be surprising since 4DOS is supposed to be compatible with and a superset of MS-DOS. For reference purposes, the only operative statement of the ICON program, cmdline, is as follows: every write(&output,C[1 to *C]) where C is the list of command line arguments. The concern among others is the reduction of the three blanks between C and D to one. Larry Bezeau@UNB.Ca From icon-group-sender Sat Oct 12 12:10:04 1996 Received: by cheltenham.cs.arizona.edu; Mon, 14 Oct 1996 09:47:22 MST Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Sat, 12 Oct 1996 12:10:04 -0600 To: icon-group@cs.arizona.edu From: carl@bitstream.net (Carl Sturtivant) Subject: Re: Parsing the Icon command line Errors-To: icon-group-errors@cs.arizona.edu > >Agreed, now that you point it out. I therefore repeated the test >as you suggested and got the same results as shown below. This test >was done on a different computer that is strictly DOS, no OS/2. > >h:\>command > >Microsoft(R) MS-DOS(R) Version 6.20 > (C)Copyright Microsoft Corp 1981-1993. > >H:\>v:\cmdline.exe "A B" \"C D\" >A >B >C D > >This should not be surprising since 4DOS is supposed to be compatible >with and a superset of MS-DOS. For reference purposes, the only >operative statement of the ICON program, cmdline, is as follows: > every write(&output,C[1 to *C]) >where C is the list of command line arguments. The concern among >others is the reduction of the three blanks between C and D to one. > > Larry Bezeau@UNB.Ca I ran the following program on a DOS 6.20 machine, using a DOS/386 implementation of icon 9.1, with very different results. ------------------------------- C:\>type arg.icn #program arg.icn procedure main(arg) every write(!arg) end C:\>arg "A B" \"C D\" A B \"C D\" C:\> ------------------------------- This behaviour was repeated under the ndos shell, and when the main program line was replaced by "every write(arg[1 to *arg])". It would be nice if the backslashes had disappeared, but aside from this it seems OK. So may I suggest that the command line behaviour that you are getting is a property not of icon, but of the compiler that built the particular implementation that you are using. The command line parameters received by the icon runtime system are doubtless passed in to the main C procedure in whatever form the startup code for the compiler sees fit. Carl Sturtivant carl@bitstream.net From icon-group-sender Sat Oct 12 18:23:07 1996 Received: by cheltenham.cs.arizona.edu; Mon, 14 Oct 1996 09:47:34 MST To: icon-group@cs.arizona.edu Date: 12 Oct 1996 18:23:07 -0400 From: bsa@kf8nh.apk.net (Brandon S. Allbery KF8NH) Message-Id: <53p5ob$74n@kf8nh.apk.net> Organization: Brandon's Own LAN (OS/2 and Linux) in Parma, OH, USA Sender: icon-group-request@cs.arizona.edu References: Subject: Re: Parsing the Icon command line Errors-To: icon-group-errors@cs.arizona.edu Also sprach bezeau@jupiter.csd.unb.ca (Larry Bezeau) (): +----- | >[C:\Staging]cmdline.exe "A B \"C D\" | >A B | >"C | >D" | >Have you made sure that it does the same thing with COMMAND.COM? | | Note that your command line is not exactly the same as mine, +--->8 Typo; I did *not* cut and paste that (I keep forgetting how to paste into whichever comm program I'm using at the time --- which may be CKermit, ZOC, HAPro, or an xterm via eXceed/OS2). The test did have the quotes correct. -- ++brandon s. allbery flying with merlin! bsa@kf8nh.apk.net telotech's "loup-guru" :-) FORZA CREW! bsa@telotech.com From icon-group-sender Mon Oct 14 11:45:38 1996 Received: by cheltenham.cs.arizona.edu; Mon, 14 Oct 1996 09:47:49 MST To: icon-group@cs.arizona.edu Date: Mon, 14 Oct 1996 11:45:38 +0100 From: Edward C Henderson Message-Id: <326219D2.41C67EA6@cee.hw.ac.uk> Organization: Heriot-Watt University Sender: icon-group-request@cs.arizona.edu Subject: Pattern Matching Errors-To: icon-group-errors@cs.arizona.edu Hello, I am looking for some info on Pattern Matching in Icon, if any one could help by e-mailing me privately I would be very grateful. Thanks Ed -- ---------------------- Ed C Henderson ceeech@cee.hw.ac.uk Heriot-Watt University ---------------------- From icon-group-sender Mon Oct 14 12:29:19 1996 Received: by cheltenham.cs.arizona.edu; Mon, 14 Oct 1996 09:48:22 MST To: icon-group@cs.arizona.edu Date: Mon, 14 Oct 1996 12:29:19 +0100 From: Paul Andrew Hornsey Message-Id: Organization: Heriot-Watt University Sender: icon-group-request@cs.arizona.edu Subject: Heriot-Watt ICON interest Errors-To: icon-group-errors@cs.arizona.edu Here at Heriot-Watt University, the 4th year computer scientists have been set the following task: Compare pattern matching facilities in ICON and Miranda(TM). Are there any ICON F.A.Q's out there? Book recommendations would be useful. ----------------- Please mail any replies to the news group, as private replies (as asked for by another HW student, in this news group), kind of defeats the object of news groups! ----------------- Thanks! --- Paul From icon-group-sender Mon Oct 14 12:13:54 1996 Received: by cheltenham.cs.arizona.edu; Mon, 14 Oct 1996 12:20:57 MST Date: Mon, 14 Oct 1996 12:13:54 -0500 Message-Id: <199610141713.MAA15477@ns1.computek.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit From: gep2@computek.net Subject: Re: Heriot-Watt ICON interest To: Paul Andrew Hornsey , icon-group@cs.arizona.edu In-Reply-To: X-Mailer: SPRY Mail Version: 04.00.06.17 Errors-To: icon-group-errors@cs.arizona.edu >...4th year computer scientists have been set the following task: Compare pattern matching facilities in ICON and Miranda(TM). >Are there any ICON F.A.Q's out there? Yes indeed. You can find links to several worthwhile ICON sites from my Web page: http://www.computek.net/public/gep2/icon.html >Book recommendations would be useful. The best book of course is "The Icon Programming Language" by Ralph and Madge Griswold. If you're having trouble locating it there in the UK, you can always order it through the Web at http://www.amazon.com (the most amazing online bookshop). You can also order it directly from The ICON Project at the University of Arizona; ordering it directly from them has the added advantage that they virtually always have the book in stock, and usually will throw in some other technical reports along with the book. :-) Gordon Peterson http://www.computek.net/public/gep2/ From icon-group-sender Mon Oct 14 09:55:17 1996 Received: by cheltenham.cs.arizona.edu; Mon, 14 Oct 1996 12:21:07 MST Date: Mon, 14 Oct 1996 09:55:17 -0700 From: kwalker@orville.premenos.com (Ken Walker) Message-Id: <199610141655.JAA00282@varda.premenos.com> To: icon-group@cs.arizona.edu Subject: Re: Heriot-Watt ICON interest Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Md5: lGeCQvBMEm746RMNtu5YVw== Errors-To: icon-group-errors@cs.arizona.edu > From: Paul Andrew Hornsey > ... > Are there any ICON F.A.Q's out there? > > Book recommendations would be useful. If you have a WEB browser, check out http://www.cs.arizona.edu/icon/www/index.html It has F.A.Q's and more. Ken Walker, kwalker@premenos.com Premenos Coporation, Concord, Ca. 94520 From icon-group-sender Tue Oct 15 07:44:15 1996 Received: by cheltenham.cs.arizona.edu; Tue, 15 Oct 1996 08:25:52 MST Date: Tue, 15 Oct 1996 07:44:15 -0500 Message-Id: <199610151244.HAA11060@segfault.cs.utsa.edu> From: Clinton Jeffery To: icon-group@cs.arizona.edu Subject: MS Windows Icon status update Reply-To: jeffery@cs.utsa.edu Errors-To: icon-group-errors@cs.arizona.edu Microsoft Windows users of Icon will be interested to know that we are "nearing" the next major release of Windows Icon. The main new features are an integrated development environment (a native Windows application for editing, compiling and running Icon programs) and a set of on-line Icon reference materials in MS Windows Help format. These new tools are what I consider alpha-test level, and I expect bugs. I'd like some volunteers to try them out before we do a general beta release. Interestingly, the development environment was written by Steve Schiavo, a graduate student here, using Borland's Delphi product :-). As for the future: I plan to support Windows-native enhancements, including playing multi-media files and certain native interface controls such as menus and dialogs. The multi-media support is largely implemented already, using the standard Windows MCI interface; a compatible set of facilities (for audio only) have been implemented for X11 using the network audio server (NAS). The user interface extensions are not yet being coded. They will be made in such a way that they remain source-compatible with facilities described in the references on graphics programming in Icon. Cross-platform portability for Icon sources will remain a top priority; I just think we can make Icon apps look a bit more "at home" under Windows. I welcome comments and suggestions. Clint Jeffery jeffery@cs.utsa.edu Division of Computer Science, The University of Texas at San Antonio Research http://www.cs.utsa.edu/research/plss.html From icon-group-sender Tue Oct 15 03:16:10 1996 Received: by cheltenham.cs.arizona.edu; Tue, 15 Oct 1996 08:26:24 MST Date: 15 Oct 96 11:15:15 BST From: R J Hare Subject: A question of style To: icon-group@cs.arizona.edu Reply-To: rjhare@ed.ac.uk Organisation: Edinburgh University Computing Services Message-Id: <9610151115.aa17886@uk.ac.ed.tattoo> Errors-To: icon-group-errors@cs.arizona.edu I have a program in which I have several routines which open by flashing a dialogue window at the user asking them to set values, etc. All the dialogue windows have default values set and also have the usual "OK", "Cancel" buttoms at the bottom. If I elect to change my mind and cancel the operation, should the way out of the routine be via 'return' or 'fail'? Note that in no case will I be actually using the returned value of the routine. This seems to be question of programming style and I can't decide which is 'best'... Any opinions gratefully received... Roger Hare From icon-group-sender Wed Oct 16 09:47:20 1996 Received: by cheltenham.cs.arizona.edu; Wed, 16 Oct 1996 12:17:43 MST Date: Wed, 16 Oct 1996 09:47:20 -0700 From: Gregg Townsend Message-Id: <9610161647.AA03034@hawk.CS.Arizona.EDU> To: icon-group@cs.arizona.edu, rjhare@ed.ac.uk Subject: Re: A question of style Errors-To: icon-group-errors@cs.arizona.edu Date: 15 Oct 96 11:15:15 BST From: R J Hare I have a program in which I have several routines which open by flashing a dialogue window at the user asking them to set values, etc. All the dialogue windows have default values set and also have the usual "OK", "Cancel" buttoms at the bottom. If I elect to change my mind and cancel the operation, should the way out of the routine be via 'return' or 'fail'? Note that in no case will I be actually using the returned value of the routine. This seems to be question of programming style and I can't decide which is 'best'... The dialogue routines in the library return the name of the button that was pressed. This works especially well for procedures such as SaveDialog where there are more than two buttons (Yes, No, Cancel) and the return/fail model isn't sufficient. I'd suggest that you do the same in your own routines, both for consistency with the library and because I think it makes sense. Gregg Townsend / gmt@CS.Arizona.EDU / +1 520 621 4325 / 32 13 45N 110 57 16W Computer Science / Univ of Arizona / 1040 E 4th St / Tucson AZ 85721-0077 From icon-group-sender Thu Oct 17 17:09:36 1996 Received: by cheltenham.cs.arizona.edu; Thu, 17 Oct 1996 09:41:43 MST Message-Id: <3.0b26.32.19961017170430.0068bb20@inforoute.cgs.fr> X-Sender: grodzens@inforoute.cgs.fr (Unverified) X-Mailer: Windows Eudora Pro Version 3.0b26 (32) X-Priority: 1 (Highest) Date: Thu, 17 Oct 1996 17:09:36 +0100 To: jeffery@cs.utsa.edu From: Cognitive OCR Subject: Re: MS Windows Icon status update Cc: icon-group@cs.arizona.edu Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Errors-To: icon-group-errors@cs.arizona.edu At 07:44 AM 10/15/96 -0500, you wrote: > >As for the future: I plan to support Windows-native enhancements, including >playing multi-media files and certain native interface controls such as >menus and dialogs. Good news for Windows95/NT users! (And consequently bad news for those who prefer Perl, mostly addict Unix ayatollahs, he-he-he) Besides the Windows interface control (menus & dialogs), there's a Windows feature I personaly would appreciate: Copy-Paste through Clipboard. Unless you allow some OLE control which will take another couple of years to be implemented :-) Best regards, Vladimir ================================================= Cognitive Technology Corp. (Europe) Phone: +33 1 43375920; Fax: +33 1 43370512 Compuserve: 100700,526 Home Page: http://www.ocr.com FTP: ftp://ftp.ocr.com/ocr ================================================= From icon-group-sender Thu Oct 17 16:28:19 1996 Received: by cheltenham.cs.arizona.edu; Thu, 17 Oct 1996 09:42:02 MST Date: Thu, 17 Oct 1996 16:28:19 -0500 Message-Id: <199610172128.QAA28874@segfault.cs.utsa.edu> From: Clinton Jeffery To: grodzens@inforoute.cgs.fr Cc: icon-group@cs.arizona.edu In-Reply-To: <3.0b26.32.19961017170430.0068bb20@inforoute.cgs.fr> (message from Cognitive OCR on Thu, 17 Oct 1996 17:09:36 +0100) Subject: Re: MS Windows Icon status update Reply-To: jeffery@cs.utsa.edu Errors-To: icon-group-errors@cs.arizona.edu [Vladimir writes:] > Besides the Windows interface control (menus & dialogs), there's a Windows > feature I personaly would appreciate: Copy-Paste through Clipboard. Well, a limited form of cross-application copy-paste via clipboard or DDE would be a good addition to Windows. I would not expect it very soon; we are trying not to add any such bona-fide new language features, so that the graphics book can be completed. As an aside, the X selection mechanism provides a similar capability, for which I have an Icon interface consisting of an attribute from which plain text can be read (pasted from) or written (copied to). So it can be portable. Clint Jeffery jeffery@cs.utsa.edu Division of Computer Science, The University of Texas at San Antonio Research http://www.cs.utsa.edu/research/plss.html From icon-group-sender Thu Oct 17 13:15:38 1996 Received: by cheltenham.cs.arizona.edu; Thu, 17 Oct 1996 13:19:58 MST To: icon-group@cs.arizona.edu Date: Thu, 17 Oct 1996 13:15:38 +0100 From: Ed Message-Id: Organization: Heriot-Watt University Sender: icon-group-request@cs.arizona.edu References: <326219D2.41C67EA6@cee.hw.ac.uk>, <9610171307.aa21786@uk.ac.ed.tattoo> Subject: Re: Pattern Matching Errors-To: icon-group-errors@cs.arizona.edu I have the book and plent of stuff to be getting on with. Thanks to everyone for their help. Ed --------------------- Ed C Henderson ceeech@cee.hw.ac.uk Heriot-Watt University ---------------------- On Thu, 17 Oct 1996 eddie@tattoo.ed.ac.uk wrote: > In comp.lang.icon you write: > > >Hello, I am looking for some info on Pattern Matching in Icon, if any > >one could help by e-mailing me privately I would be very grateful. > > Well I suppose you really need the official Icon book. There is very little > else out there other than potted summaries which I don't think really give > enough idea. On the other hand the book really only explains the language and > doesn't have enough tutorial sections so you have to spend rather a lot of > time reading about it before you can understand the power of the language. > The problem is that the language is not well enough known for authors to write > 'Idiots guide' etc. You have not been given an easy task I would say. > > If no-one else comes up with anything, the book is called "The ICON > programming language (second ed)" by Griswold & Griswold (my copy is at home > so I can't give the exact reference just now). You may be lucky enough to get > one from your library (ours doesn't have the 2nd edition). If not you can > order it from Waterstones (takes a while usually). Failing that I may be > persuaded to lend you my copy. > > I don't know Miranda (I'm assuming your referring to the same project as your > colleague who doesn't appear to understand news) so can't give any direct > comparisons. Neither am I a complete expert on Icon but I do know it > reasonably well and can possibly answer specific questions. > > Eddie > From icon-group-sender Fri Oct 18 10:39:48 1996 Received: by cheltenham.cs.arizona.edu; Fri, 18 Oct 1996 10:10:40 MST Date: Fri, 18 Oct 1996 10:39:48 -0500 Message-Id: <199610181539.KAA10689@ns1.computek.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit From: gep2@computek.net Subject: Re: MS Windows Icon status update To: vladimir.grodzenski@inforoute.cgs.fr Cc: icon-group@cs.arizona.edu X-Mailer: SPRY Mail Version: 04.00.06.17 Errors-To: icon-group-errors@cs.arizona.edu >Where can I pick up SNOBOL4+ on_the_net? The FTP address is: ftp://rmi.net/pub2/marke/snobol4/snobol4p.zip The last I heard the documentation wasn't quite finished... I don't know if it's done yet or not (but the documentation for Vanilla SNOBOL4 obviously is pretty close... you just don't have all the documentation for all the more advanced features). >PS. What the weather like in Dallas? Pretty rainy over here, brrrr:-) It's rather cool today, actually... though sunny... high around 20C and low tonight about 8C. This is what we Texans call a "blue norther", but we should be back up to a more typical temperature for this time of the year (about 28C) in a few days. Some other online friends and I are going this weekend to near Houston for their annual Renaissance Faire... I hope it's warmer there (too bad we don't have some sort of "goal-directed thermometer" so the desired weather would match up with our plans for the weekends, huh?) :-) Gordon Peterson http://www.computek.net/public/gep2/ From icon-group-sender Fri Oct 18 09:43:27 1996 Received: by cheltenham.cs.arizona.edu; Fri, 18 Oct 1996 10:10:29 MST Message-Id: <3.0b26.32.19961018094249.0068c080@inforoute.cgs.fr> X-Sender: grodzens@inforoute.cgs.fr (Unverified) X-Mailer: Windows Eudora Pro Version 3.0b26 (32) X-Priority: 1 (Highest) Date: Fri, 18 Oct 1996 09:43:27 +0100 To: gep2@computek.net From: Vladimir Subject: Re: MS Windows Icon status update Cc: icon-group@cs.arizona.edu Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Errors-To: icon-group-errors@cs.arizona.edu Hi Gordon, Where can I pick up SNOBOL4+ on_the_net? Vladimir PS. What the weather like in Dallas? Pretty rainy over here, brrrr:-) Best regards ================================================= Compuserve: 100700,526 Home Page: http://www.ocr.com FTP: ftp://ftp.ocr.com/ocr ================================================= From icon-group-sender Thu Oct 17 12:21:46 1996 Received: by cheltenham.cs.arizona.edu; Fri, 18 Oct 1996 16:39:40 MST To: icon-group@cs.arizona.edu Date: Thu, 17 Oct 1996 12:21:46 +0100 From: "Lloyd M. Uhler, Jr." Message-Id: <326616CA.44CE@khis.kodak.com> Organization: Eastman Kodak Sender: icon-group-request@cs.arizona.edu Reply-To: "Lloyd M. Uhler, Jr." Subject: Saving Records, Lists, etc. to disk Errors-To: icon-group-errors@cs.arizona.edu Is it possible to save one of advanced data types such as Record, List, Table, Set, ... to disk? Then in another session, read this back in to an Icon program. For the tree structure illustrated on pages 189-192,it is possible to convert this to a string. What I am looking for is disk storage of the structure in its "native" form and then later access to this structure. It would seem this would be a good feature for Icon. From icon-group-sender Wed Oct 16 21:47:52 1996 Received: by cheltenham.cs.arizona.edu; Mon, 21 Oct 1996 10:17:06 MST To: icon-group@cs.arizona.edu Date: Wed, 16 Oct 1996 21:47:52 GMT From: wilsonpm@gamewood.net (Pete M. Wilson) Message-Id: <326556f5.0@news.gamewood.net> Organization: Danville Regional Medical Center Sender: icon-group-request@cs.arizona.edu References: Subject: Re: Heriot-Watt ICON interest Errors-To: icon-group-errors@cs.arizona.edu Paul Andrew Hornsey wrote: >Are there any ICON F.A.Q's out there? You should be able to find it at http://www.cs.arizona.edu/icon/www/faq.html (according to the FAQ, posted 10/4). From icon-group-sender Sat Oct 19 02:27:54 1996 Received: by cheltenham.cs.arizona.edu; Mon, 21 Oct 1996 10:16:54 MST Message-Id: <3.0b26.32.19961019022749.00690d54@inforoute.cgs.fr> X-Sender: grodzens@inforoute.cgs.fr (Unverified) X-Mailer: Windows Eudora Pro Version 3.0b26 (32) X-Priority: 1 (Highest) Date: Sat, 19 Oct 1996 02:27:54 +0100 To: "Lloyd M. Uhler, Jr." From: Vladimir Subject: Re: Saving Records, Lists, etc. to disk Cc: icon-group@cs.arizona.edu Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Errors-To: icon-group-errors@cs.arizona.edu At 12:21 PM 10/17/96 +0100, you wrote: >Is it possible to save one of advanced data types >such as Record, List, Table, Set, ... to disk? > >Then in another session, read this back in to an >Icon program. I remember there's a couple of procedures in IPL collection, Xencode() and Xdecode()... Best regards ================================================= Compuserve: 100700,526 Home Page: http://www.ocr.com FTP: ftp://ftp.ocr.com/ocr ================================================= From icon-group-sender Sat Oct 19 10:49:14 1996 Received: by cheltenham.cs.arizona.edu; Mon, 21 Oct 1996 10:17:18 MST To: icon-group@cs.arizona.edu Date: 19 Oct 1996 10:49:14 -0700 From: dps@azstarnet.com (dave schaumann) Message-Id: <54b4aq$cc9@web.azstarnet.com> Organization: Starnet, Tucson, Az. Sender: icon-group-request@cs.arizona.edu References: <326616CA.44CE@khis.kodak.com> Subject: Re: Saving Records, Lists, etc. to disk Errors-To: icon-group-errors@cs.arizona.edu In article <326616CA.44CE@khis.kodak.com>, Lloyd M. Uhler, Jr. wrote: >Is it possible to save one of advanced data types >such as Record, List, Table, Set, ... to disk? AFAIK, not directly, that is in internal binary format. You could create a text format along with the necessary conversion routines without too much trouble, though. -Dave -- No matter how much we ask after the truth, self-awareness is often unpleasant. We do not feel kindly toward the Truthsayer. -- Frank Herbert From icon-group-sender Sun Oct 20 14:17:10 1996 Received: by cheltenham.cs.arizona.edu; Mon, 21 Oct 1996 10:19:04 MST Message-Id: <3.0b26.32.19961020141622.00687264@inforoute.cgs.fr> X-Sender: grodzens@inforoute.cgs.fr (Unverified) X-Mailer: Windows Eudora Pro Version 3.0b26 (32) X-Priority: 1 (Highest) Date: Sun, 20 Oct 1996 14:17:10 +0100 To: Gordon Peterson From: Vladimir Subject: Cute nightmare Cc: icon-group@cs.arizona.edu Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Errors-To: icon-group-errors@cs.arizona.edu Hi Gordon, Look at this fantastic program source I found on Compuserve! (Of course I replaced the author's name and ID by ***) I also hope you will appreciate that the guy offers his program in celebration of July 4th and July 14th... I'd rather say 'Halloween' :-))))) ====================== CUT HERE ================= * By Richard O***: *****,*** * This is freeware (in celebration of July 4th! and July 14th!) * This function accepts a string containing a credit card number and * returns .T. or .F. depending on its validity. Dashes and spaces are * accepted within the string, and are ignored. The last character must * be a number, or the card will be rejected. * This code is based on a checksum function found in the Cobb group forum. PARAMETER theCardNum PRIVATE isValid,checkSum,mult,i,theNumLen,theChar,theDigit,sumDigit isValid=.f. IF PARAMETERS()=0 OR LEN(theCardNum)<=1 ** a one char string can inadvertantly return a correct result RETURN .f. ENDIF checkSum=0 && start with 0 for checksum mult=2 ** process from right to left theCardNum=ALLTRIM(theCardNum) IF ASC(RIGHT(theCardNum,1))<48 or ASC(RIGHT(theCardNum,1))>57 ** last character must be a number RETURN .f. ENDIF theNumLen=-1*len(theCardNum) ** last character is ignored in the loop FOR i=theNumLen+1 TO -1 theChar=SUBST(theCardNum,(-1*i),1) IF ASC(theChar)<48 or ASC(theChar)>57 IF theChar=' ' or theChar='-' ** ignore this character ELSE RETURN .F. ENDIF ELSE theDigit=VAL(theChar) theDigit=theDigit*mult mult=3-mult IF theDigit>9 sumDigit=TRANS(theDigit,"99") theDigit=VAL(SUBST(sumDigit,1,1))+VAL(SUBST(sumDigit,2,1)) ENDIF checkSum=checkSum+theDigit ENDIF ENDFOR ** see if the resulting checksum is equal to the last digit of the card ** checksum = the next greater multiple of 10, minus the current checksum value checksum=int((checksum+9)/10)*10-checksum IF checksum=val(right(theCardNum,1)) isValid=.t. ENDIF RETURN isValid ====================== CUT HERE ================= Isn't that nice? :-) Vladimir Best regards ================================================= Cognitive Technology (Europe) Phone: +33 1 43375920; Fax: +33 1 43370512 Compuserve: 100700,526 Home Page: http://www.ocr.com FTP: ftp://ftp.ocr.com/ocr ================================================= From icon-group-sender Sun Oct 20 19:17:45 1996 Received: by cheltenham.cs.arizona.edu; Mon, 21 Oct 1996 10:19:14 MST Message-Id: <3.0b26.32.19961020191730.0068ec34@inforoute.cgs.fr> X-Sender: grodzens@inforoute.cgs.fr (Unverified) X-Mailer: Windows Eudora Pro Version 3.0b26 (32) X-Priority: 1 (Highest) Date: Sun, 20 Oct 1996 19:17:45 +0100 To: Gordon Peterson From: Vladimir Subject: re: cute nightmare Cc: icon-group@cs.arizona.edu Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Errors-To: icon-group-errors@cs.arizona.edu Hi Gordon, I finally rewrite in Icon a procedure that checks the Credit Card number as it desribed on http://beachnet.com/~hstiles/cardtype.html procedure CheckSum(s) local ccard, checksum if *( cset(s) -- &digits -- ' -' ) > 0 then fail ccard:= list() every put(ccard, integer(!ccard) ) every i:= *ccard-1 to 1 by -2 do ccard[i]*:= 2 checksum:= 0 every checksum +:= !!X return checksum end Less than 5 min. in all, including the access to the home page mentioned above. Actually, the Internet connection was pretty fast :-) Vladimir Best regards ================================================= Cognitive Technology (Europe) Phone: +33 1 43375920; Fax: +33 1 43370512 Compuserve: 100700,526 Home Page: http://www.ocr.com FTP: ftp://ftp.ocr.com/ocr ================================================= From icon-group-sender Sun Oct 20 19:47:01 1996 Received: by cheltenham.cs.arizona.edu; Mon, 21 Oct 1996 10:19:25 MST Message-Id: <3.0b26.32.19961020194626.00694d3c@inforoute.cgs.fr> X-Sender: grodzens@inforoute.cgs.fr (Unverified) X-Mailer: Windows Eudora Pro Version 3.0b26 (32) X-Priority: 1 (Highest) Date: Sun, 20 Oct 1996 19:47:01 +0100 To: Gordon Peterson From: Vladimir Subject: re: cute nightmare Cc: icon-group@cs.arizona.edu Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Errors-To: icon-group-errors@cs.arizona.edu Well, there's an error, The expression every put(ccard, integer(!ccard)) must be every put(ccard, integer(!s)) Writing faster than thinking :-))) >procedure CheckSum(s) >local ccard, checksum > if *( cset(s) -- &digits -- ' -' ) > 0 then fail > ccard:= list() > every put(ccard, integer(!ccard) ) > > every i:= *ccard-1 to 1 by -2 do ccard[i]*:= 2 > checksum:= 0 > every checksum +:= !!X > return checksum >end From icon-group-sender Sun Oct 20 20:55:01 1996 Received: by cheltenham.cs.arizona.edu; Mon, 21 Oct 1996 10:19:36 MST Date: Sun, 20 Oct 1996 20:55:01 -0500 Message-Id: <199610210155.UAA17336@ns1.computek.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit From: gep2@computek.net Subject: Saving Records, Lists, etc. to disk To: icon-group@cs.arizona.edu X-Mailer: SPRY Mail Version: 04.00.06.17 Errors-To: icon-group-errors@cs.arizona.edu >Is it possible to save one of advanced data types such as Record, List, Table, Set, ... to disk? Then in another session, read this back in to an Icon program. >For the tree structure illustrated on pages 189-192,it is possible to convert this to a string. Yes, that works for tree structures but not for a generalized linked structure. Nor does it solve the problem if you want to store tables, lists, character sets, user defined data types or the like. It's a non-trivial problem! >What I am looking for is disk storage of the structure in its "native" form and then later access to this structure. It would seem this would be a good feature for Icon. In many implementations of SNOBOL4 (SNOBOL4+ for example) you can do this, IF you're wanting to reload the structure into a reload the SAME program that saved it, by using the SAVE() function. That function saves the program, along with all currently active data structures and values in a way that can be restored later. Gordon Peterson http://www.computek.net/public/gep2/ From icon-group-sender Mon Oct 21 08:27:33 1996 Received: by cheltenham.cs.arizona.edu; Mon, 21 Oct 1996 10:19:52 MST Message-Id: X-Mailer: Novell GroupWise 4.1 Date: Mon, 21 Oct 1996 08:27:33 -0600 From: Charlie Hethcoat Cc: icon-group@cs.arizona.edu Subject: Saving Records, Lists, etc. to disk -Reply Encoding: 35 Text Errors-To: icon-group-errors@cs.arizona.edu (For distribution to the Icon group.) Let me second that question! I have been using Icon to experiment with interactive calculator programs of various types. I have often wanted to save a ''workspace'' (a la APL), which is a snapshot of my session with variables, binary data structures, and various flag settings intact. That way, I would be able to put a ''save'' instruction or command in my program's repertoire, and use it to drop what I'm working on the moment someone runs in and says ''Pizza!!''--secure in the knowledge that I can ''resume'' that session later. There are ''images'' of icon data structures, but they are strings. That might work, but I sort of doubt they were implemented for that purpose. And they put a hit on your string storage region. I haven't tried them for that purpose, because it seems there must be a better way. There is also the ''save'' function, which saves an executable image of the program containing the call. This seems to be similar to what is needed, but is only for re-running a program from scratch, and facility is only available to the Icon interpreter, not to the Icon programmer. Charlie Hethcoat chethcoa@oss.oceaneering.com >>> "Lloyd M. Uhler, Jr." 1996 Oct 17, 06:21am >>> Is it possible to save one of advanced data types such as Record, List, Table, Set, ... to disk? Then in another session, read this back in to an Icon program. For the tree structure illustrated on pages 189-192,it is possible to convert this to a string. What I am looking for is disk storage of the structure in its "native" form and then later access to this structure. It would seem this would be a good feature for Icon. From icon-group-sender Mon Oct 21 13:26:34 1996 Received: by cheltenham.cs.arizona.edu; Mon, 21 Oct 1996 16:28:00 MST X-Sender: bobalex@popd.ix.netcom.com Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Mon, 21 Oct 1996 13:26:34 -0700 To: icon-group@cs.arizona.edu, "Lloyd M. Uhler, Jr." From: bobalex@ix.netcom.com (Bob Alexander) Subject: Re: Saving Records, Lists, etc. to disk Errors-To: icon-group-errors@cs.arizona.edu >Is it possible to save one of advanced data types >such as Record, List, Table, Set, ... to disk? > >Then in another session, read this back in to an >Icon program. There is a procedure in the "Icon Program Library" called "xcode.icn" that can "flatten" arbitrary Icon structures (even circular) to a file and later reconstruct them from the file. It works for almost everything, but has limited success with certain difficult things like open files, procedures (only works if procedure by the same name is in the reconstructing program), co-expressions, and thing like that. The Program Library can be downloaded from U of Arizona. -- Bob From icon-group-sender Thu Oct 24 16:24:44 1996 Received: by cheltenham.cs.arizona.edu; Fri, 25 Oct 1996 10:28:07 MST To: icon-group@cs.arizona.edu Date: Thu, 24 Oct 1996 16:24:44 GMT From: nr@viper.cs.Virginia.EDU (Norman Ramsey) Message-Id: <54o58c$j5r@viper.cs.Virginia.EDU> Organization: University of Virginia Computer Science Department Sender: icon-group-request@cs.arizona.edu Subject: Icon code for working with HTML Errors-To: icon-group-errors@cs.arizona.edu I use Icon heavily, especially for string stuff, but I'm going nuts trying to handle HTML. Even simple operations, like add an anchor to an HTML file without breaking existing anchors or the nesting structure is fraught with peril. Has anybody got any good Icon code for dealing with SGML or HTML? Has anybody got other recommendations? N Ramsey I've narrowed followups. -- Norman Ramsey http://www.cs.virginia.edu/~nr From icon-group-sender Fri Oct 25 11:00:09 1996 Received: by cheltenham.cs.arizona.edu; Fri, 25 Oct 1996 12:58:04 MST Date: Fri, 25 Oct 1996 11:00:09 -0700 From: Gregg Townsend Message-Id: <9610251800.AA12975@hawk.CS.Arizona.EDU> To: nr@viper.cs.Virginia.EDU Subject: Re: Icon code for working with HTML Cc: icon-group Errors-To: icon-group-errors@cs.arizona.edu Here's some code for parsing HTML files. It isn't exactly what you're looking for, but it may help. Gregg Townsend / gmt@CS.Arizona.EDU / +1 520 621 4325 / 32 13 45N 110 57 16W Computer Science / Univ of Arizona / 1040 E 4th St / Tucson AZ 85721-0077 ############################################################################ # # File: html.icn # # Subject: Procedures for parsing HTML # # Author: Gregg M. Townsend # # Date: August 12, 1996 # ############################################################################ # # These procedures parse HTML files: # # htchunks(f) generates the basic chunks -- tags and text -- # that compose an HTML file. # # htrefs(f) generates the tagname/keyword/value combinations # that reference other files. # # These procedures process strings from HTML files: # # httag(s) extracts the name of a tag. # # htvals(s) generates the keyword/value pairs from a tag. # # urlmerge(base,new) interprets a new URL in the context of a base. # ############################################################################ # # htchunks(f) generates the HTML chunks from file f. # It returns strings beginning with # # ') + 3) then fail # normal case: discard comment s ||:= tab(0) &subject := (read(f) || "\n") | break } &subject := s # rescan unclosed comment return "